Browse Source
Merge pull request 'fix/back' (#37) from fix/back into develop
Merge pull request 'fix/back' (#37) from fix/back into develop
Reviewed-on: https://git.nwhco.ir/amirreza.chegini/hade_hoda_flutter/pulls/37pull/38/head
11 changed files with 153 additions and 89 deletions
-
3lib/core/routers/my_routes.dart
-
40lib/core/widgets/dialog/hadith_dialog.dart
-
26lib/core/widgets/pop_scope/my_pop_scope.dart
-
6lib/features/home/presentation/bloc/home_bloc.dart
-
7lib/features/home/presentation/ui/home_page.dart
-
5lib/features/level/presentation/ui/level_page.dart
-
5lib/features/question/presentation/ui/question_page.dart
-
2lib/features/question/presentation/ui/screens/diamond_screen.dart
-
3lib/l10n/app_en.arb
-
6lib/l10n/app_localizations.dart
-
3lib/l10n/app_localizations_en.dart
@ -0,0 +1,26 @@ |
|||
import 'package:flutter/material.dart'; |
|||
import 'package:hadi_hoda_flutter/core/widgets/dialog/exit_dialog.dart'; |
|||
|
|||
class MyPopScope extends StatelessWidget { |
|||
const MyPopScope({super.key, required this.child}); |
|||
|
|||
final Widget child; |
|||
|
|||
void onPopInvokedWithResult( |
|||
bool didPop, |
|||
dynamic result, |
|||
BuildContext context, |
|||
) { |
|||
showExitDialog(context: context); |
|||
} |
|||
|
|||
@override |
|||
Widget build(BuildContext context) { |
|||
return PopScope( |
|||
canPop: false, |
|||
onPopInvokedWithResult: (didPop, result) => |
|||
onPopInvokedWithResult(didPop, result, context), |
|||
child: child, |
|||
); |
|||
} |
|||
} |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue