feat: remove WillPopScope in category.dart

This commit is contained in:
zymxxxs
2019-11-08 13:07:18 +08:00
parent fa2e77687d
commit 8ccab6fe71

View File

@ -43,15 +43,6 @@ class _CategoryHome extends State<CategoryHome> {
searchCatOrWidget(); searchCatOrWidget();
} }
Future<bool> back() {
// if (catHistory.length == 1) {
// return Future<bool>.value(true);
// }
// catHistory.removeLast();
// searchCatOrWidget();
return Future<bool>.value(true);
}
void go(CommonItem cat) { void go(CommonItem cat) {
catHistory.add(cat); catHistory.add(cat);
searchCatOrWidget(); searchCatOrWidget();
@ -93,18 +84,11 @@ class _CategoryHome extends State<CategoryHome> {
appBar: AppBar( appBar: AppBar(
title: Text("$title"), title: Text("$title"),
), ),
body: WillPopScope( body: ListView(
onWillPop: () {
return back();
},
child: ListView(
children: <Widget>[ children: <Widget>[
_buildContent(), _buildContent(),
], ],
), ),
// child: Container(color: Colors.blue,child: Text('123'),),
),
); );
} }
} }