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,
listener: (context, state) {
if (state.selectedView != null) {
WidgetsBinding.instance.addPostFrameCallback((_) {
WidgetsBinding.instance?.addPostFrameCallback((_) {
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
// hide the arrows when the window gets a new size and thus the toolbar
// becomes scrollable/unscrollable.
WidgetsBinding.instance.addObserver(this);
WidgetsBinding.instance!.addObserver(this);
// Workaround to allow the scroll controller attach to our ListView so that
// we can detect if overflow arrows need to be shown on init.
@ -226,7 +226,7 @@ class _ToolbarButtonListState extends State<ToolbarButtonList> with WidgetsBindi
@override
void dispose() {
_controller.dispose();
WidgetsBinding.instance.removeObserver(this);
WidgetsBinding.instance!.removeObserver(this);
super.dispose();
}

View File

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

View File

@ -8,9 +8,6 @@ list(APPEND FLUTTER_PLUGIN_LIST
window_size
)
list(APPEND FLUTTER_FFI_PLUGIN_LIST
)
set(PLUGIN_BUNDLED_LIBRARIES)
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 ${${plugin}_bundled_libraries})
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
url: "https://pub.dartlang.org"
source: hosted
version: "1.16.0"
version: "1.15.0"
connectivity_plus:
dependency: "direct main"
description:
@ -357,7 +357,7 @@ packages:
name: fake_async
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.0"
version: "1.2.0"
ffi:
dependency: transitive
description:
@ -645,7 +645,7 @@ packages:
name: js
url: "https://pub.dartlang.org"
source: hosted
version: "0.6.4"
version: "0.6.3"
json_annotation:
dependency: transitive
description:
@ -708,7 +708,7 @@ packages:
name: material_color_utilities
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.4"
version: "0.1.3"
meta:
dependency: transitive
description:
@ -806,7 +806,7 @@ packages:
name: path
url: "https://pub.dartlang.org"
source: hosted
version: "1.8.1"
version: "1.8.0"
path_drawing:
dependency: transitive
description:
@ -1091,7 +1091,7 @@ packages:
name: source_span
url: "https://pub.dartlang.org"
source: hosted
version: "1.8.2"
version: "1.8.1"
sprintf:
dependency: transitive
description:
@ -1161,21 +1161,21 @@ packages:
name: test
url: "https://pub.dartlang.org"
source: hosted
version: "1.20.2"
version: "1.19.5"
test_api:
dependency: transitive
description:
name: test_api
url: "https://pub.dartlang.org"
source: hosted
version: "0.4.9"
version: "0.4.8"
test_core:
dependency: transitive
description:
name: test_core
url: "https://pub.dartlang.org"
source: hosted
version: "0.4.11"
version: "0.4.9"
textfield_tags:
dependency: "direct main"
description:
@ -1294,7 +1294,7 @@ packages:
name: vector_math
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.2"
version: "2.1.1"
video_player:
dependency: transitive
description:
@ -1389,5 +1389,5 @@ packages:
source: hosted
version: "8.0.0"
sdks:
dart: ">=2.17.0-0 <3.0.0"
dart: ">=2.15.0-116.0.dev <3.0.0"
flutter: ">=2.5.0"