Skip to content

Commit 2698fb4

Browse files
committed
chore: upgrade to flutter 3.0
1 parent 1ca602f commit 2698fb4

File tree

12 files changed

+158
-121
lines changed

12 files changed

+158
-121
lines changed

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

frontend/app_flowy/lib/workspace/presentation/widgets/emoji_picker/src/emoji_picker.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ class _EmojiPickerState extends State<EmojiPicker> {
135135
if (!loaded) {
136136
// Load emojis
137137
updateEmojiFuture.then(
138-
(value) => WidgetsBinding.instance!.addPostFrameCallback((_) {
138+
(value) => WidgetsBinding.instance.addPostFrameCallback((_) {
139139
if (!mounted) return;
140140
setState(() {
141141
loaded = true;

frontend/app_flowy/lib/workspace/presentation/widgets/float_bubble/question_bubble.dart

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,9 @@ class QuestionBubble extends StatelessWidget {
6262
}
6363

6464
_launchURL(String url) async {
65-
if (await canLaunch(url)) {
66-
await launch(url);
65+
final uri = Uri.parse(url);
66+
if (await canLaunchUrl(uri)) {
67+
await launchUrl(uri);
6768
} else {
6869
throw 'Could not launch $url';
6970
}

frontend/app_flowy/linux/flutter/generated_plugins.cmake

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ list(APPEND FLUTTER_PLUGIN_LIST
88
window_size
99
)
1010

11+
list(APPEND FLUTTER_FFI_PLUGIN_LIST
12+
)
13+
1114
set(PLUGIN_BUNDLED_LIBRARIES)
1215

1316
foreach(plugin ${FLUTTER_PLUGIN_LIST})
@@ -16,3 +19,8 @@ foreach(plugin ${FLUTTER_PLUGIN_LIST})
1619
list(APPEND PLUGIN_BUNDLED_LIBRARIES $<TARGET_FILE:${plugin}_plugin>)
1720
list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries})
1821
endforeach(plugin)
22+
23+
foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST})
24+
add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/linux plugins/${ffi_plugin})
25+
list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries})
26+
endforeach(ffi_plugin)

frontend/app_flowy/macos/Runner.xcodeproj/project.pbxproj

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -421,6 +421,7 @@
421421
CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements;
422422
CODE_SIGN_STYLE = Automatic;
423423
COMBINE_HIDPI_IMAGES = YES;
424+
EXCLUDED_ARCHS = arm64;
424425
INFOPLIST_FILE = Runner/Info.plist;
425426
LD_RUNPATH_SEARCH_PATHS = (
426427
"$(inherited)",
@@ -552,6 +553,7 @@
552553
CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements;
553554
CODE_SIGN_STYLE = Automatic;
554555
COMBINE_HIDPI_IMAGES = YES;
556+
EXCLUDED_ARCHS = arm64;
555557
INFOPLIST_FILE = Runner/Info.plist;
556558
LD_RUNPATH_SEARCH_PATHS = (
557559
"$(inherited)",
@@ -575,6 +577,7 @@
575577
CODE_SIGN_ENTITLEMENTS = Runner/Release.entitlements;
576578
CODE_SIGN_STYLE = Automatic;
577579
COMBINE_HIDPI_IMAGES = YES;
580+
EXCLUDED_ARCHS = arm64;
578581
INFOPLIST_FILE = Runner/Info.plist;
579582
LD_RUNPATH_SEARCH_PATHS = (
580583
"$(inherited)",

0 commit comments

Comments
 (0)