Skip to content

Commit d331a68

Browse files
authored
Merge pull request #506 from AppFlowy-IO/flutter_3.0
chore: upgrade to flutter 3.0
2 parents 1ca602f + aad33f6 commit d331a68

File tree

16 files changed

+163
-122
lines changed

16 files changed

+163
-122
lines changed

.github/workflows/ci.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ jobs:
3434
with:
3535
channel: 'stable'
3636
cache: true
37+
flutter-version: '3.0.0'
3738

3839
- name: Cache Cargo
3940
uses: actions/cache@v2

.github/workflows/dart_lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
uses: actions/checkout@v2
2424
- uses: subosito/flutter-action@v1
2525
with:
26-
flutter-version: '2.10.0'
26+
flutter-version: '3.0.0'
2727
channel: "stable"
2828
- name: Deps Flutter
2929
run: flutter packages pub get

.github/workflows/dart_test.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ jobs:
2525
- uses: subosito/flutter-action@v2
2626
with:
2727
channel: 'stable'
28+
flutter-version: '3.0.0'
2829
cache: true
2930

3031
- name: Cache Cargo

.github/workflows/release.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ jobs:
5050
uses: subosito/flutter-action@v2
5151
with:
5252
channel: 'stable'
53+
flutter-version: '3.0.0'
5354

5455
- name: Pre build
5556
working-directory: frontend
@@ -98,6 +99,7 @@ jobs:
9899
uses: subosito/flutter-action@v2
99100
with:
100101
channel: 'stable'
102+
flutter-version: '3.0.0'
101103

102104
- name: Pre build
103105
working-directory: frontend

frontend/app_flowy/lib/user/presentation/skip_log_in_screen.dart

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,9 @@ class _SkipLogInScreenState extends State<SkipLogInScreen> {
8888
}
8989

9090
_launchURL(String url) async {
91-
if (await canLaunch(url)) {
92-
await launch(url);
91+
final uri = Uri.parse(url);
92+
if (await canLaunchUrl(uri)) {
93+
await launchUrl(uri);
9394
} else {
9495
throw 'Could not launch $url';
9596
}

frontend/app_flowy/lib/workspace/application/app/app_bloc.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import 'dart:collection';
2+
13
import 'package:app_flowy/plugin/plugin.dart';
24
import 'package:app_flowy/startup/startup.dart';
35
import 'package:app_flowy/workspace/application/app/app_listener.dart';

frontend/app_flowy/lib/workspace/application/grid/cell/select_option_editor_bloc.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import 'package:flutter_bloc/flutter_bloc.dart';
66
import 'package:freezed_annotation/freezed_annotation.dart';
77
import 'package:app_flowy/workspace/application/grid/cell/cell_service/cell_service.dart';
88
import 'select_option_service.dart';
9+
import 'package:collection/collection.dart';
910

1011
part 'select_option_editor_bloc.freezed.dart';
1112

frontend/app_flowy/lib/workspace/application/grid/grid_service.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import 'dart:collection';
2+
13
import 'package:app_flowy/workspace/application/grid/field/grid_listenr.dart';
24
import 'package:dartz/dartz.dart';
35
import 'package:flowy_sdk/dispatch/dispatch.dart';
@@ -6,8 +8,6 @@ import 'package:flowy_sdk/protobuf/flowy-error/errors.pb.dart';
68
import 'package:flowy_sdk/protobuf/flowy-folder-data-model/view.pb.dart';
79
import 'package:flowy_sdk/protobuf/flowy-grid-data-model/grid.pb.dart';
810
import 'package:flutter/foundation.dart';
9-
import 'package:freezed_annotation/freezed_annotation.dart';
10-
1111
import 'cell/cell_service/cell_service.dart';
1212
import 'row/row_service.dart';
1313

frontend/app_flowy/lib/workspace/presentation/home/menu/app/section/section.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class ViewSection extends StatelessWidget {
2626
listenWhen: (p, c) => p.selectedView != c.selectedView,
2727
listener: (context, state) {
2828
if (state.selectedView != null) {
29-
WidgetsBinding.instance?.addPostFrameCallback((_) {
29+
WidgetsBinding.instance.addPostFrameCallback((_) {
3030
getIt<HomeStackManager>().setPlugin(state.selectedView!.plugin());
3131
});
3232
}

frontend/app_flowy/lib/workspace/presentation/plugins/doc/src/widget/toolbar/tool_bar.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ class _ToolbarButtonListState extends State<ToolbarButtonList> with WidgetsBindi
184184
// Listening to the WidgetsBinding instance is necessary so that we can
185185
// hide the arrows when the window gets a new size and thus the toolbar
186186
// becomes scrollable/unscrollable.
187-
WidgetsBinding.instance!.addObserver(this);
187+
WidgetsBinding.instance.addObserver(this);
188188

189189
// Workaround to allow the scroll controller attach to our ListView so that
190190
// we can detect if overflow arrows need to be shown on init.
@@ -226,7 +226,7 @@ class _ToolbarButtonListState extends State<ToolbarButtonList> with WidgetsBindi
226226
@override
227227
void dispose() {
228228
_controller.dispose();
229-
WidgetsBinding.instance!.removeObserver(this);
229+
WidgetsBinding.instance.removeObserver(this);
230230
super.dispose();
231231
}
232232

0 commit comments

Comments
 (0)