modify:toast and andrid apk label

This commit is contained in:
xiaojia22326@163.com
2019-01-25 20:54:12 +08:00
parent a77af3728a
commit baecc158a9
5 changed files with 39 additions and 78 deletions

View File

@ -5,7 +5,6 @@
* @Last Modified time: 2018-12-27 15:39:35
*/
import 'package:flutter/material.dart';
import 'package:fluttertoast/fluttertoast.dart';
class PopupMenuButtonDemo extends StatefulWidget {
_PopupMenuButtonDemoState createState() => _PopupMenuButtonDemoState();
@ -20,18 +19,11 @@ class _PopupMenuButtonDemoState extends State<PopupMenuButtonDemo> {
void showMenuSelection(String value) {
if (<String>[_simpleValue1, _simpleValue2, _simpleValue3].contains(value))
_simpleValue = value;
showInSnackBar('You selected: $value');
Scaffold.of(context).showSnackBar(new SnackBar(
content: new Text('You selected: $value')));
}
void showInSnackBar(String value) {
Fluttertoast.instance.showToast(
msg: value,
toastLength: Toast.LENGTH_SHORT,
gravity: ToastGravity.CENTER,
timeInSecForIos: 1,
backgroundColor: Colors.grey,
textColor: Colors.white);
}
@override
void initState() {