diff --git a/covas_mobile/lib/classes/MyDrawer.dart b/covas_mobile/lib/classes/MyDrawer.dart index 4161c00..d8b6748 100644 --- a/covas_mobile/lib/classes/MyDrawer.dart +++ b/covas_mobile/lib/classes/MyDrawer.dart @@ -1,6 +1,7 @@ import 'package:flutter/material.dart'; +import 'alert.dart'; -class MyDrawer extends StatelessWidget { +class MyDrawer extends StatelessWidget with ShowAlertDialog { @override Widget build(BuildContext context) { return Drawer( @@ -39,7 +40,8 @@ class MyDrawer extends StatelessWidget { leading: Icon(Icons.info), title: Text('About'), onTap: () { - Navigator.pop(context); // Close the drawer + showAlertDialog( + context, 'About', "Version 0.0.1"); // Close the drawer }, ), ], diff --git a/covas_mobile/lib/classes/alert.dart b/covas_mobile/lib/classes/alert.dart index 28a03e9..ed83093 100644 --- a/covas_mobile/lib/classes/alert.dart +++ b/covas_mobile/lib/classes/alert.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; -mixin ShowAlertDialog on State { +mixin ShowAlertDialog { void showAlertDialog(BuildContext context, String title, String text) { // Create AlertDialog AlertDialog dialog = AlertDialog(