Revert "chore: upgrade to flutter 3.0"

This reverts commit 3307e2f8fd.
This commit is contained in:
appflowy 2022-05-14 18:10:08 +08:00
parent 3307e2f8fd
commit f8d6aa3c74
5 changed files with 15 additions and 23 deletions

View file

@ -26,7 +26,7 @@ class ViewSection extends StatelessWidget {
listenWhen: (p, c) => p.selectedView != c.selectedView, listenWhen: (p, c) => p.selectedView != c.selectedView,
listener: (context, state) { listener: (context, state) {
if (state.selectedView != null) { if (state.selectedView != null) {
WidgetsBinding.instance.addPostFrameCallback((_) { WidgetsBinding.instance?.addPostFrameCallback((_) {
getIt<HomeStackManager>().setPlugin(state.selectedView!.plugin()); getIt<HomeStackManager>().setPlugin(state.selectedView!.plugin());
}); });
} }

View file

@ -184,7 +184,7 @@ class _ToolbarButtonListState extends State<ToolbarButtonList> with WidgetsBindi
// Listening to the WidgetsBinding instance is necessary so that we can // Listening to the WidgetsBinding instance is necessary so that we can
// hide the arrows when the window gets a new size and thus the toolbar // hide the arrows when the window gets a new size and thus the toolbar
// becomes scrollable/unscrollable. // becomes scrollable/unscrollable.
WidgetsBinding.instance.addObserver(this); WidgetsBinding.instance!.addObserver(this);
// Workaround to allow the scroll controller attach to our ListView so that // Workaround to allow the scroll controller attach to our ListView so that
// we can detect if overflow arrows need to be shown on init. // we can detect if overflow arrows need to be shown on init.
@ -226,7 +226,7 @@ class _ToolbarButtonListState extends State<ToolbarButtonList> with WidgetsBindi
@override @override
void dispose() { void dispose() {
_controller.dispose(); _controller.dispose();
WidgetsBinding.instance.removeObserver(this); WidgetsBinding.instance!.removeObserver(this);
super.dispose(); super.dispose();
} }

View file

@ -135,7 +135,7 @@ class _EmojiPickerState extends State<EmojiPicker> {
if (!loaded) { if (!loaded) {
// Load emojis // Load emojis
updateEmojiFuture.then( updateEmojiFuture.then(
(value) => WidgetsBinding.instance.addPostFrameCallback((_) { (value) => WidgetsBinding.instance!.addPostFrameCallback((_) {
if (!mounted) return; if (!mounted) return;
setState(() { setState(() {
loaded = true; loaded = true;

View file

@ -8,9 +8,6 @@ list(APPEND FLUTTER_PLUGIN_LIST
window_size window_size
) )
list(APPEND FLUTTER_FFI_PLUGIN_LIST
)
set(PLUGIN_BUNDLED_LIBRARIES) set(PLUGIN_BUNDLED_LIBRARIES)
foreach(plugin ${FLUTTER_PLUGIN_LIST}) foreach(plugin ${FLUTTER_PLUGIN_LIST})
@ -19,8 +16,3 @@ foreach(plugin ${FLUTTER_PLUGIN_LIST})
list(APPEND PLUGIN_BUNDLED_LIBRARIES $<TARGET_FILE:${plugin}_plugin>) list(APPEND PLUGIN_BUNDLED_LIBRARIES $<TARGET_FILE:${plugin}_plugin>)
list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries})
endforeach(plugin) endforeach(plugin)
foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST})
add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/linux plugins/${ffi_plugin})
list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries})
endforeach(ffi_plugin)

View file

@ -168,7 +168,7 @@ packages:
name: collection name: collection
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.16.0" version: "1.15.0"
connectivity_plus: connectivity_plus:
dependency: "direct main" dependency: "direct main"
description: description:
@ -357,7 +357,7 @@ packages:
name: fake_async name: fake_async
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.3.0" version: "1.2.0"
ffi: ffi:
dependency: transitive dependency: transitive
description: description:
@ -645,7 +645,7 @@ packages:
name: js name: js
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.6.4" version: "0.6.3"
json_annotation: json_annotation:
dependency: transitive dependency: transitive
description: description:
@ -708,7 +708,7 @@ packages:
name: material_color_utilities name: material_color_utilities
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.1.4" version: "0.1.3"
meta: meta:
dependency: transitive dependency: transitive
description: description:
@ -806,7 +806,7 @@ packages:
name: path name: path
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.8.1" version: "1.8.0"
path_drawing: path_drawing:
dependency: transitive dependency: transitive
description: description:
@ -1091,7 +1091,7 @@ packages:
name: source_span name: source_span
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.8.2" version: "1.8.1"
sprintf: sprintf:
dependency: transitive dependency: transitive
description: description:
@ -1161,21 +1161,21 @@ packages:
name: test name: test
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.20.2" version: "1.19.5"
test_api: test_api:
dependency: transitive dependency: transitive
description: description:
name: test_api name: test_api
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.4.9" version: "0.4.8"
test_core: test_core:
dependency: transitive dependency: transitive
description: description:
name: test_core name: test_core
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.4.11" version: "0.4.9"
textfield_tags: textfield_tags:
dependency: "direct main" dependency: "direct main"
description: description:
@ -1294,7 +1294,7 @@ packages:
name: vector_math name: vector_math
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.1.2" version: "2.1.1"
video_player: video_player:
dependency: transitive dependency: transitive
description: description:
@ -1389,5 +1389,5 @@ packages:
source: hosted source: hosted
version: "8.0.0" version: "8.0.0"
sdks: sdks:
dart: ">=2.17.0-0 <3.0.0" dart: ">=2.15.0-116.0.dev <3.0.0"
flutter: ">=2.5.0" flutter: ">=2.5.0"