mirror of
https://github.com/alibaba/flutter-go.git
synced 2025-07-04 07:18:11 +08:00
feat: remove WillPopScope in category.dart
This commit is contained in:
@ -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'),),
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user