mirror of
https://github.com/lollipopkit/flutter_server_box.git
synced 2026-02-21 23:54:44 +01:00
fix: IME awayls float
This commit is contained in:
@@ -63,6 +63,7 @@ class _ConvertPageState extends State<ConvertPage>
|
||||
}
|
||||
},
|
||||
tooltip: s.convert,
|
||||
heroTag: 'convert fab',
|
||||
child: const Icon(Icons.send),
|
||||
),
|
||||
);
|
||||
|
||||
@@ -87,15 +87,16 @@ class _MyHomePageState extends State<MyHomePage>
|
||||
Widget build(BuildContext context) {
|
||||
super.build(context);
|
||||
return WillPopScope(
|
||||
child: _buildMain(context),
|
||||
onWillPop: () {
|
||||
final scaffold = Scaffold.of(context);
|
||||
if (scaffold.isDrawerOpen) {
|
||||
scaffold.closeDrawer();
|
||||
return Future.value(false);
|
||||
}
|
||||
return Future.value(true);
|
||||
});
|
||||
child: _buildMain(context),
|
||||
onWillPop: () {
|
||||
final scaffold = Scaffold.of(context);
|
||||
if (scaffold.isDrawerOpen) {
|
||||
scaffold.closeDrawer();
|
||||
return Future.value(false);
|
||||
}
|
||||
return Future.value(true);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildMain(BuildContext context) {
|
||||
@@ -116,7 +117,7 @@ class _MyHomePageState extends State<MyHomePage>
|
||||
physics: const ClampingScrollPhysics(),
|
||||
controller: _pageController,
|
||||
onPageChanged: (i) {
|
||||
FocusScope.of(context).unfocus();
|
||||
FocusScope.of(context).requestFocus(FocusNode());
|
||||
_selectIndex = i;
|
||||
setState(() {});
|
||||
},
|
||||
|
||||
@@ -71,7 +71,7 @@ class _PingPageState extends State<PingPage>
|
||||
),
|
||||
])),
|
||||
floatingActionButton: FloatingActionButton(
|
||||
child: const Icon(Icons.play_arrow),
|
||||
heroTag: 'ping fab',
|
||||
onPressed: () {
|
||||
try {
|
||||
doPing();
|
||||
@@ -79,6 +79,7 @@ class _PingPageState extends State<PingPage>
|
||||
showSnackBar(context, Text('Error: \n$e'));
|
||||
}
|
||||
},
|
||||
child: const Icon(Icons.play_arrow),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user