mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
deps(mobile): flutter 3.16 (#6677)
* dep(mobile): update flutter and deps * chore: dart analyzer * chore: update flutter workflow version * chore: dart format * fix: gallery_viewer PopScope --------- Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
This commit is contained in:
parent
0522058fdf
commit
27488ceb67
116 changed files with 627 additions and 624 deletions
|
|
@ -13,7 +13,7 @@ import 'package:immich_mobile/shared/providers/tab.provider.dart';
|
|||
|
||||
@RoutePage()
|
||||
class TabControllerPage extends HookConsumerWidget {
|
||||
const TabControllerPage({Key? key}) : super(key: key);
|
||||
const TabControllerPage({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
|
|
@ -168,15 +168,6 @@ class TabControllerPage extends HookConsumerWidget {
|
|||
);
|
||||
}
|
||||
|
||||
Future<bool> returnBackToHome(TabsRouter tabsRouter) async {
|
||||
bool atHomeTab = tabsRouter.activeIndex == 0;
|
||||
if (!atHomeTab) {
|
||||
tabsRouter.setActiveIndex(0);
|
||||
}
|
||||
|
||||
return atHomeTab;
|
||||
}
|
||||
|
||||
final multiselectEnabled = ref.watch(multiselectProvider);
|
||||
return AutoTabsRouter(
|
||||
routes: [
|
||||
|
|
@ -192,8 +183,10 @@ class TabControllerPage extends HookConsumerWidget {
|
|||
),
|
||||
builder: (context, child) {
|
||||
final tabsRouter = AutoTabsRouter.of(context);
|
||||
return WillPopScope(
|
||||
onWillPop: () => returnBackToHome(tabsRouter),
|
||||
return PopScope(
|
||||
canPop: tabsRouter.activeIndex == 0,
|
||||
onPopInvoked: (didPop) =>
|
||||
!didPop ? tabsRouter.setActiveIndex(0) : null,
|
||||
child: LayoutBuilder(
|
||||
builder: (context, constraints) {
|
||||
const medium = 600;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue