fix : injection and base page

This commit is contained in:
2025-09-27 13:52:54 +03:30
parent 0a98c57d75
commit be83996a02
5 changed files with 48 additions and 25 deletions

View File

@@ -85,12 +85,34 @@ class BasePage extends GetView<BaseLogic> {
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: AppColor.bgLight,
appBar: appBar,
body: _buildBody(),
floatingActionButtonLocation: floatingActionButtonLocation,
floatingActionButton: floatingActionButton,
);
return _pageBuilder();
}
Widget _pageBuilder() {
if (onPopScopTaped != null) {
return PopScope(
canPop: false,
onPopInvokedWithResult: (didPop, result) {
if (!didPop) {
onPopScopTaped!();
}
},
child: Scaffold(
backgroundColor: AppColor.bgLight,
appBar: appBar,
body: _buildBody(),
floatingActionButtonLocation: floatingActionButtonLocation,
floatingActionButton: floatingActionButton,
),
);
} else {
return Scaffold(
backgroundColor: AppColor.bgLight,
appBar: appBar,
body: _buildBody(),
floatingActionButtonLocation: floatingActionButtonLocation,
floatingActionButton: floatingActionButton,
);
}
}
}