TF-2387 Handle system back button on login view mobile

This commit is contained in:
dab246
2024-01-02 19:55:21 +07:00
committed by Dat H. Pham
parent 4667d43f50
commit 6d643881dd
@@ -26,7 +26,12 @@ class LoginView extends BaseLoginView {
Widget build(BuildContext context) { Widget build(BuildContext context) {
ThemeUtils.setSystemDarkUIStyle(); ThemeUtils.setSystemDarkUIStyle();
return Scaffold( return PopScope(
canPop: false,
onPopInvoked: (didPop) => !didPop
? controller.handleBackButtonAction(context)
: null,
child: Scaffold(
backgroundColor: AppColor.primaryLightColor, backgroundColor: AppColor.primaryLightColor,
body: GestureDetector( body: GestureDetector(
onTap: () => FocusScope.of(context).unfocus(), onTap: () => FocusScope.of(context).unfocus(),
@@ -63,7 +68,8 @@ class LoginView extends BaseLoginView {
]), ]),
), ),
), ),
)); )),
);
} }
Widget _buildCenterForm(BuildContext context) { Widget _buildCenterForm(BuildContext context) {