message about
This commit is contained in:
parent
43d77f778b
commit
8adcd80306
@ -1,6 +1,7 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'alert.dart';
|
||||||
|
|
||||||
class MyDrawer extends StatelessWidget {
|
class MyDrawer extends StatelessWidget with ShowAlertDialog {
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Drawer(
|
return Drawer(
|
||||||
@ -39,7 +40,8 @@ class MyDrawer extends StatelessWidget {
|
|||||||
leading: Icon(Icons.info),
|
leading: Icon(Icons.info),
|
||||||
title: Text('About'),
|
title: Text('About'),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
Navigator.pop(context); // Close the drawer
|
showAlertDialog(
|
||||||
|
context, 'About', "Version 0.0.1"); // Close the drawer
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
mixin ShowAlertDialog<T extends StatefulWidget> on State<T> {
|
mixin ShowAlertDialog {
|
||||||
void showAlertDialog(BuildContext context, String title, String text) {
|
void showAlertDialog(BuildContext context, String title, String text) {
|
||||||
// Create AlertDialog
|
// Create AlertDialog
|
||||||
AlertDialog dialog = AlertDialog(
|
AlertDialog dialog = AlertDialog(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user