mirror of
https://github.com/alibaba/flutter-go.git
synced 2025-05-31 22:18:48 +08:00
modify:toast and andrid apk label
This commit is contained in:
@ -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() {
|
||||
|
Reference in New Issue
Block a user