Skip to content

Commit 87ea62e

Browse files
committed
Adjustments for flutter 2.8+
1 parent ca30f8c commit 87ea62e

File tree

8 files changed

+28
-30
lines changed

8 files changed

+28
-30
lines changed

.fvm/fvm_config.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"flutterSdkVersion": "2.5.3",
2+
"flutterSdkVersion": "stable",
33
"flavors": {}
44
}

.vscode/settings.json

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
{
2-
"dart.flutterSdkPath":"/Users/leofarias/fvm/versions/stable",
2+
"dart.flutterSdkPath": ".fvm/flutter_sdk",
3+
// Remove .fvm files from search
34
"search.exclude": {
45
"**/.fvm": true
6+
},
7+
// Remove from file watching
8+
"files.watcherExclude": {
9+
"**/.fvm": true
510
}
611
}

lib/src/components/atoms/console.dart

+2-2
Original file line numberDiff line numberDiff line change
@@ -66,13 +66,13 @@ class Console extends HookWidget {
6666
children: [
6767
Container(
6868
width: MediaQuery.of(context).size.width - 100,
69-
child: ConsoleText(lines.value.first)
70-
),
69+
child: ConsoleText(lines.value.first)),
7170
],
7271
),
7372
),
7473
secondChild: CupertinoScrollbar(
7574
child: ListView.builder(
75+
primary: false,
7676
shrinkWrap: true,
7777
reverse: true,
7878
padding: const EdgeInsets.fromLTRB(20, 10, 20, 10),

lib/src/components/organisms/shortcut_manager.dart

+7-12
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ class SkShortcutManager extends StatelessWidget {
3333
context.read(navigationProvider.notifier).goTo(route);
3434
}
3535

36-
return Shortcuts(
36+
return FocusableActionDetector(
37+
autofocus: true,
3738
shortcuts: <LogicalKeySet, Intent>{
3839
LogicalKeySet(
3940
LogicalKeyboardKey.metaLeft,
@@ -52,17 +53,11 @@ class SkShortcutManager extends StatelessWidget {
5253
LogicalKeyboardKey.keyF,
5354
): const NavigationIntent(route: NavigationRoutes.searchScreen),
5455
},
55-
child: Actions(
56-
actions: <Type, Action<Intent>>{
57-
NavigationIntent: CallbackAction<NavigationIntent>(
58-
onInvoke: (intent) => handleRouteChange(intent.route)),
59-
},
60-
child: Focus(
61-
autofocus: true,
62-
focusNode: focusNode,
63-
child: child,
64-
),
65-
),
56+
actions: <Type, Action<Intent>>{
57+
NavigationIntent: CallbackAction<NavigationIntent>(
58+
onInvoke: (intent) => handleRouteChange(intent.route)),
59+
},
60+
child: child,
6661
);
6762
}
6863
}

lib/src/modules/common/app_shell.dart

+4-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,10 @@ import 'package:flutter_hooks/flutter_hooks.dart';
55
import 'package:hooks_riverpod/hooks_riverpod.dart';
66
import 'package:i18next/i18next.dart';
77
import 'package:material_design_icons_flutter/material_design_icons_flutter.dart';
8+
import 'package:sidekick/src/components/organisms/app_bottom_bar.dart';
89
import 'package:sidekick/src/modules/common/utils/indexed_transition_switcher.dart';
910
import 'package:sidekick/src/modules/search/components/search_bar.dart';
11+
import 'package:sidekick/src/modules/selected_detail/components/info_drawer.dart';
1012

1113
import '../../components/molecules/top_app_bar.dart';
1214
import '../../components/organisms/shortcut_manager.dart';
@@ -85,8 +87,8 @@ class AppShell extends HookWidget {
8587
focusNode: focusNode,
8688
child: Scaffold(
8789
appBar: const SkAppBar(),
88-
// bottomNavigationBar: const AppBottomBar(),
89-
// endDrawer: const SelectedDetailDrawer(),
90+
bottomNavigationBar: const AppBottomBar(),
91+
endDrawer: const SelectedDetailDrawer(),
9092
backgroundColor: platformBackgroundColor(context),
9193
key: _scaffoldKey,
9294
body: Row(

lib/src/modules/fvm/fvm.provider.dart

-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ class FvmCacheProvider extends StateNotifier<List<CacheVersion>> {
5959
// Load State again while listening to directory
6060
directoryWatcher = Watcher(
6161
FVMClient.context.cacheDir.path,
62-
pollingDelay: Duration(seconds: 20),
6362
).events.listen((event) {
6463
if (event.type == ChangeType.ADD || event.type == ChangeType.REMOVE) {
6564
_debouncer.run(reloadState);

lib/src/modules/releases/releases.screen.dart

+7-3
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ class ReleasesScreen extends HookWidget {
2525
extendBody: false,
2626
title: I18Next.of(context).t('modules:releases.releases'),
2727
child: CustomScrollView(
28+
primary: false,
2829
slivers: [
2930
SliverToBoxAdapter(
3031
child: AnimatedContainer(
@@ -143,9 +144,12 @@ class ReleasesScreen extends HookWidget {
143144
),
144145
),
145146
SliverList(
146-
delegate: SliverChildBuilderDelegate((context, index) {
147-
return ReleaseListItem(versions[index]);
148-
}, childCount: versions.length),
147+
delegate: SliverChildBuilderDelegate(
148+
(context, index) {
149+
return ReleaseListItem(versions[index]);
150+
},
151+
childCount: versions.length,
152+
),
149153
),
150154
],
151155
),

pubspec.lock

+1-8
Original file line numberDiff line numberDiff line change
@@ -492,13 +492,6 @@ packages:
492492
url: "https://pub.dartlang.org"
493493
source: hosted
494494
version: "0.12.11"
495-
material_color_utilities:
496-
dependency: transitive
497-
description:
498-
name: material_color_utilities
499-
url: "https://pub.dartlang.org"
500-
source: hosted
501-
version: "0.1.2"
502495
material_design_icons_flutter:
503496
dependency: "direct main"
504497
description:
@@ -832,7 +825,7 @@ packages:
832825
name: test_api
833826
url: "https://pub.dartlang.org"
834827
source: hosted
835-
version: "0.4.8"
828+
version: "0.4.3"
836829
timing:
837830
dependency: transitive
838831
description:

0 commit comments

Comments
 (0)