mirror of
https://github.com/alibaba/flutter-go.git
synced 2025-06-02 07:47:08 +08:00
modify:toast and andrid apk label
This commit is contained in:
@ -16,7 +16,7 @@
|
|||||||
FlutterApplication and put your custom class here. -->
|
FlutterApplication and put your custom class here. -->
|
||||||
<application
|
<application
|
||||||
android:name="io.flutter.app.FlutterApplication"
|
android:name="io.flutter.app.FlutterApplication"
|
||||||
android:label="菜鸟手册"
|
android:label="flutter go"
|
||||||
android:icon="@drawable/logo">
|
android:icon="@drawable/logo">
|
||||||
<activity
|
<activity
|
||||||
android:name=".MainActivity"
|
android:name=".MainActivity"
|
||||||
|
@ -10,7 +10,6 @@
|
|||||||
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
|
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
|
||||||
333E5DAE7FC10AC69FEC26C0 /* libPods-Runner.a in Frameworks */ = {isa = PBXBuildFile; fileRef = DDA792F029EDD7A11295D192 /* libPods-Runner.a */; };
|
333E5DAE7FC10AC69FEC26C0 /* libPods-Runner.a in Frameworks */ = {isa = PBXBuildFile; fileRef = DDA792F029EDD7A11295D192 /* libPods-Runner.a */; };
|
||||||
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
|
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
|
||||||
2D5378261FAA1A9400D5DBA9 /* flutter_assets in Resources */ = {isa = PBXBuildFile; fileRef = 2D5378251FAA1A9400D5DBA9 /* flutter_assets */; };
|
|
||||||
3B80C3941E831B6300D905FE /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; };
|
3B80C3941E831B6300D905FE /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; };
|
||||||
3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
|
3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
|
||||||
9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; };
|
9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; };
|
||||||
@ -41,7 +40,6 @@
|
|||||||
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; };
|
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; };
|
||||||
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
|
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
|
||||||
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
|
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
|
||||||
2D5378251FAA1A9400D5DBA9 /* flutter_assets */ = {isa = PBXFileReference; lastKnownFileType = folder; name = flutter_assets; path = Flutter/flutter_assets; sourceTree = SOURCE_ROOT; };
|
|
||||||
3B80C3931E831B6300D905FE /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/App.framework; sourceTree = "<group>"; };
|
3B80C3931E831B6300D905FE /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/App.framework; sourceTree = "<group>"; };
|
||||||
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
|
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
|
||||||
7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
|
7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
|
||||||
@ -92,7 +90,6 @@
|
|||||||
children = (
|
children = (
|
||||||
3B80C3931E831B6300D905FE /* App.framework */,
|
3B80C3931E831B6300D905FE /* App.framework */,
|
||||||
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
|
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
|
||||||
2D5378251FAA1A9400D5DBA9 /* flutter_assets */,
|
|
||||||
9740EEBA1CF902C7004384FC /* Flutter.framework */,
|
9740EEBA1CF902C7004384FC /* Flutter.framework */,
|
||||||
9740EEB21CF90195004384FC /* Debug.xcconfig */,
|
9740EEB21CF90195004384FC /* Debug.xcconfig */,
|
||||||
7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
|
7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
|
||||||
@ -209,7 +206,6 @@
|
|||||||
files = (
|
files = (
|
||||||
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
|
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
|
||||||
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
|
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
|
||||||
2D5378261FAA1A9400D5DBA9 /* flutter_assets in Resources */,
|
|
||||||
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
|
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
|
||||||
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
|
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
|
||||||
);
|
);
|
||||||
|
@ -26,27 +26,18 @@ class _CheckedPopupMenuItemDemoState extends State<CheckedPopupMenuItemDemo> {
|
|||||||
_checkedValues = <String>[_checkedValue3];
|
_checkedValues = <String>[_checkedValue3];
|
||||||
}
|
}
|
||||||
|
|
||||||
void showInSnackBar(String value){
|
|
||||||
Fluttertoast.instance.showToast(
|
|
||||||
msg: value,
|
|
||||||
toastLength: Toast.LENGTH_SHORT,
|
|
||||||
gravity: ToastGravity.CENTER,
|
|
||||||
timeInSecForIos: 1,
|
|
||||||
backgroundColor: Colors.grey,
|
|
||||||
textColor: Colors.white
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool isChecked(String value) => _checkedValues.contains(value);
|
bool isChecked(String value) => _checkedValues.contains(value);
|
||||||
|
|
||||||
|
|
||||||
void showCheckedMenuSelections(String value){
|
void showCheckedMenuSelections(String value){
|
||||||
if(_checkedValues.contains(value)){
|
if(_checkedValues.contains(value)){
|
||||||
_checkedValues.remove(value);
|
_checkedValues.remove(value);
|
||||||
}else{
|
}else{
|
||||||
_checkedValues.add(value);
|
_checkedValues.add(value);
|
||||||
}
|
}
|
||||||
showInSnackBar('Checked $_checkedValues');
|
|
||||||
|
Scaffold.of(context).showSnackBar(new SnackBar(
|
||||||
|
content: new Text('Checked $_checkedValues')));
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
@ -5,7 +5,6 @@
|
|||||||
* @Last Modified time: 2018-12-27 15:39:35
|
* @Last Modified time: 2018-12-27 15:39:35
|
||||||
*/
|
*/
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:fluttertoast/fluttertoast.dart';
|
|
||||||
|
|
||||||
class PopupMenuButtonDemo extends StatefulWidget {
|
class PopupMenuButtonDemo extends StatefulWidget {
|
||||||
_PopupMenuButtonDemoState createState() => _PopupMenuButtonDemoState();
|
_PopupMenuButtonDemoState createState() => _PopupMenuButtonDemoState();
|
||||||
@ -20,18 +19,11 @@ class _PopupMenuButtonDemoState extends State<PopupMenuButtonDemo> {
|
|||||||
void showMenuSelection(String value) {
|
void showMenuSelection(String value) {
|
||||||
if (<String>[_simpleValue1, _simpleValue2, _simpleValue3].contains(value))
|
if (<String>[_simpleValue1, _simpleValue2, _simpleValue3].contains(value))
|
||||||
_simpleValue = 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
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
|
@ -5,65 +5,47 @@
|
|||||||
* @Last Modified time: 2018-12-27 15:45:26
|
* @Last Modified time: 2018-12-27 15:45:26
|
||||||
*/
|
*/
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:fluttertoast/fluttertoast.dart';
|
|
||||||
|
|
||||||
|
class PopupMenuDividerDemo extends StatefulWidget {
|
||||||
|
_PopupMenuDividerDemoState createState() => _PopupMenuDividerDemoState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _PopupMenuDividerDemoState extends State<PopupMenuDividerDemo> {
|
||||||
class PopupMenuDividerDemo extends StatelessWidget {
|
void showInSnackBar(String 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
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Container(
|
return Container(
|
||||||
child:ListTile(
|
child: ListTile(
|
||||||
title: const Text('An item with a sectioned menu'),
|
title: const Text('An item with a sectioned menu'),
|
||||||
trailing: PopupMenuButton<String>(
|
trailing: PopupMenuButton<String>(
|
||||||
padding: EdgeInsets.zero,
|
padding: EdgeInsets.zero,
|
||||||
onSelected: showInSnackBar,
|
onSelected: showInSnackBar,
|
||||||
itemBuilder: (BuildContext context) => <PopupMenuEntry<String>>[
|
itemBuilder: (BuildContext context) => <PopupMenuEntry<String>>[
|
||||||
const PopupMenuItem<String>(
|
const PopupMenuItem<String>(
|
||||||
value: 'Preview',
|
value: 'Preview',
|
||||||
child: ListTile(
|
child: ListTile(
|
||||||
leading: Icon(Icons.visibility),
|
leading: Icon(Icons.visibility),
|
||||||
title: Text('Preview')
|
title: Text('Preview'))),
|
||||||
)
|
const PopupMenuItem<String>(
|
||||||
),
|
value: 'Share',
|
||||||
const PopupMenuItem<String>(
|
child: ListTile(
|
||||||
value: 'Share',
|
leading: Icon(Icons.person_add),
|
||||||
child: ListTile(
|
title: Text('Share'))),
|
||||||
leading: Icon(Icons.person_add),
|
const PopupMenuItem<String>(
|
||||||
title: Text('Share')
|
value: 'Get Link',
|
||||||
)
|
child: ListTile(
|
||||||
),
|
leading: Icon(Icons.link),
|
||||||
const PopupMenuItem<String>(
|
title: Text('Get link'))),
|
||||||
value: 'Get Link',
|
const PopupMenuDivider(),
|
||||||
child: ListTile(
|
const PopupMenuItem<String>(
|
||||||
leading: Icon(Icons.link),
|
value: 'Remove',
|
||||||
title: Text('Get link')
|
child: ListTile(
|
||||||
)
|
leading: Icon(Icons.delete), title: Text('Remove')))
|
||||||
),
|
])),
|
||||||
const PopupMenuDivider(),
|
|
||||||
const PopupMenuItem<String>(
|
|
||||||
value: 'Remove',
|
|
||||||
child: ListTile(
|
|
||||||
leading: Icon(Icons.delete),
|
|
||||||
title: Text('Remove')
|
|
||||||
)
|
|
||||||
)
|
|
||||||
]
|
|
||||||
)
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user