mirror of
https://git.meshkee.com/applications/cssd.git
synced 2026-10-13 14:48:55 +03:30
Back button of other pages navigate to home
This commit is contained in:
@@ -115,13 +115,16 @@ class _ItemAddScreenState extends State<ItemAddScreen> {
|
||||
final double _devicewidth = _media.size.width;
|
||||
final double _deviceBlockSize = _devicewidth / 100;
|
||||
final itemProviderObject = Provider.of<ItemProvider>(context);
|
||||
return WillPopScope(
|
||||
onWillPop: () async {
|
||||
Navigator.pushReplacementNamed(
|
||||
context,
|
||||
Routes.itemResultScreen,
|
||||
);
|
||||
return true;
|
||||
return PopScope(
|
||||
canPop: false,
|
||||
onPopInvoked: (didPop) {
|
||||
if (didPop) return;
|
||||
Navigator.of(context).pushNamed(Routes.homePage);
|
||||
// Navigator.pushReplacementNamed(
|
||||
// context,
|
||||
// Routes.itemResultScreen,
|
||||
// );
|
||||
// return true;
|
||||
},
|
||||
child: SafeArea(
|
||||
child: GestureDetector(
|
||||
|
||||
Reference in New Issue
Block a user