diff --git a/.fvmrc b/.fvmrc index 3cff2599..a6427fd2 100644 --- a/.fvmrc +++ b/.fvmrc @@ -1,4 +1,4 @@ { - "flutter": "3.19.0", + "flutter": "stable", "flavors": {} } \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json index ffbfcf84..a4b2e23a 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,5 +1,5 @@ { - "dart.flutterSdkPath": ".fvm/versions/3.19.0", + "dart.flutterSdkPath": ".fvm/versions/stable", "files.exclude": { "**/.fvm/versions": true, "**/.fvm/flutter_sdk": true diff --git a/example/firebase.json b/example/firebase.json index 94c4d648..e35b0799 100644 --- a/example/firebase.json +++ b/example/firebase.json @@ -1,11 +1,7 @@ { "hosting": { "source": ".", - "ignore": [ - "firebase.json", - "**/.*", - "**/node_modules/**" - ], + "ignore": ["firebase.json", "**/.*", "**/node_modules/**"], "frameworksBackend": { "region": "us-east1" } diff --git a/example/superdeck/generated/thumb_aShu2Vm6.png b/example/superdeck/generated/thumb_aShu2Vm6.png index 0b0696ef..5051e7fd 100644 Binary files a/example/superdeck/generated/thumb_aShu2Vm6.png and b/example/superdeck/generated/thumb_aShu2Vm6.png differ diff --git a/example/superdeck/generated/thumb_zXfqPfVD.png b/example/superdeck/generated/thumb_zXfqPfVD.png index 279a0a0a..6b42d5ef 100644 Binary files a/example/superdeck/generated/thumb_zXfqPfVD.png and b/example/superdeck/generated/thumb_zXfqPfVD.png differ diff --git a/lib/components/molecules/split_view.dart b/lib/components/molecules/split_view.dart index dee8c14d..2bb4c461 100644 --- a/lib/components/molecules/split_view.dart +++ b/lib/components/molecules/split_view.dart @@ -80,7 +80,7 @@ class _SplitViewState extends State final currentSlide = navigation.currentSlide.watch(context); final sideIsOpen = navigation.sideIsOpen.watch(context); - final isSmall = context.isMobile; + final isSmall = context.isSmall || context.isMobileLandscape; final sidePanel = SlideThumbnailList( scrollDirection: isSmall ? Axis.horizontal : Axis.vertical, diff --git a/lib/components/superdeck_app.dart b/lib/components/superdeck_app.dart index 428ee002..53afe633 100644 --- a/lib/components/superdeck_app.dart +++ b/lib/components/superdeck_app.dart @@ -86,39 +86,34 @@ class _SuperDeckAppState extends State { ); } - return MediaQuery( - data: const MediaQueryData( - size: kResolution, - ), - child: Theme( - data: theme, - child: Builder(builder: (context) { - return MixTheme( - data: MixThemeData.withMaterial(), - child: MaterialApp.router( - debugShowCheckedModeBanner: false, - title: 'Superdeck', - routerConfig: _router, - theme: Theme.of(context), - key: kAppKey, - builder: (context, child) { - final result = _initialize.watch(context); - - return result.map( - data: (_) => child!, - loading: () => renderLoading(), - error: (error, _) { - return ExceptionWidget( - error, - onRetry: _initialize.reload, - ); - }, - ); - }, - ), - ); - }), - ), + return Theme( + data: theme, + child: Builder(builder: (context) { + return MixTheme( + data: MixThemeData.withMaterial(), + child: MaterialApp.router( + debugShowCheckedModeBanner: false, + title: 'Superdeck', + routerConfig: _router, + theme: Theme.of(context), + key: kAppKey, + builder: (context, child) { + final result = _initialize.watch(context); + + return result.map( + data: (_) => child!, + loading: () => renderLoading(), + error: (error, _) { + return ExceptionWidget( + error, + onRetry: _initialize.reload, + ); + }, + ); + }, + ), + ); + }), ); } } diff --git a/lib/helpers/utils.dart b/lib/helpers/utils.dart index 95fa93aa..c5ce0801 100644 --- a/lib/helpers/utils.dart +++ b/lib/helpers/utils.dart @@ -83,8 +83,6 @@ extension BuildContextExt on BuildContext { bool get isExtraLarge => size.width >= 1440; - bool get isMobile => isSmall || isMobileLandscape; - bool get isMobileLandscape { return size.shortestSide < 600 && isLandscape; }