Przeglądaj źródła

fix: use window_manager to set minimum window size (#1791)

* fix: use window_manager to set minimum window size

Resolves #762
Resolves #1559

* refactor: only init WidgetsFlutterBinding once

* fix: set window minimum size

Was meant to be setMinimumSize not setSize

* fix: windows manager crash on macOS

---------

Co-authored-by: Lucas.Xu <[email protected]>
Kristen McWilliam 2 lat temu
rodzic
commit
6b8c7d7bc6

+ 15 - 2
frontend/app_flowy/lib/main.dart

@@ -1,6 +1,7 @@
 import 'package:easy_localization/easy_localization.dart';
 import 'package:easy_localization/easy_localization.dart';
 import 'package:flutter/material.dart';
 import 'package:flutter/material.dart';
 import 'package:hotkey_manager/hotkey_manager.dart';
 import 'package:hotkey_manager/hotkey_manager.dart';
+import 'package:window_manager/window_manager.dart';
 
 
 import 'startup/launch_configuration.dart';
 import 'startup/launch_configuration.dart';
 import 'startup/startup.dart';
 import 'startup/startup.dart';
@@ -17,10 +18,22 @@ class FlowyApp implements EntryPoint {
 
 
 Future<void> main() async {
 Future<void> main() async {
   WidgetsFlutterBinding.ensureInitialized();
   WidgetsFlutterBinding.ensureInitialized();
-  await EasyLocalization.ensureInitialized();
 
 
-  WidgetsFlutterBinding.ensureInitialized();
+  await EasyLocalization.ensureInitialized();
   await hotKeyManager.unregisterAll();
   await hotKeyManager.unregisterAll();
+  await windowManager.ensureInitialized();
+
+  await setWindowOptions();
 
 
   await FlowyRunner.run(FlowyApp());
   await FlowyRunner.run(FlowyApp());
 }
 }
+
+Future<void> setWindowOptions() async {
+  WindowOptions windowOptions = const WindowOptions(
+    minimumSize: Size(600, 400),
+  );
+  return windowManager.waitUntilReadyToShow(windowOptions, () async {
+    await windowManager.show();
+    await windowManager.focus();
+  });
+}

+ 0 - 5
frontend/app_flowy/lib/startup/tasks/app_widget.dart

@@ -5,7 +5,6 @@ import 'package:appflowy_backend/log.dart';
 import 'package:appflowy_backend/protobuf/flowy-user/protobuf.dart';
 import 'package:appflowy_backend/protobuf/flowy-user/protobuf.dart';
 import 'package:flutter/material.dart';
 import 'package:flutter/material.dart';
 import 'package:flutter_bloc/flutter_bloc.dart';
 import 'package:flutter_bloc/flutter_bloc.dart';
-import 'package:window_size/window_size.dart';
 
 
 import '../../user/application/user_settings_service.dart';
 import '../../user/application/user_settings_service.dart';
 import '../../workspace/application/appearance.dart';
 import '../../workspace/application/appearance.dart';
@@ -71,10 +70,6 @@ class ApplicationWidget extends StatelessWidget {
 
 
   @override
   @override
   Widget build(BuildContext context) {
   Widget build(BuildContext context) {
-    const ratio = 1.73;
-    const minWidth = 600.0;
-    setWindowMinSize(const Size(minWidth, minWidth / ratio));
-
     final cubit = AppearanceSettingsCubit(appearanceSetting)
     final cubit = AppearanceSettingsCubit(appearanceSetting)
       ..readLocaleWhenAppLaunch(context);
       ..readLocaleWhenAppLaunch(context);
 
 

+ 8 - 4
frontend/app_flowy/linux/flutter/generated_plugin_registrant.cc

@@ -9,8 +9,9 @@
 #include <flowy_infra_ui/flowy_infra_u_i_plugin.h>
 #include <flowy_infra_ui/flowy_infra_u_i_plugin.h>
 #include <hotkey_manager/hotkey_manager_plugin.h>
 #include <hotkey_manager/hotkey_manager_plugin.h>
 #include <rich_clipboard_linux/rich_clipboard_plugin.h>
 #include <rich_clipboard_linux/rich_clipboard_plugin.h>
+#include <screen_retriever/screen_retriever_plugin.h>
 #include <url_launcher_linux/url_launcher_plugin.h>
 #include <url_launcher_linux/url_launcher_plugin.h>
-#include <window_size/window_size_plugin.h>
+#include <window_manager/window_manager_plugin.h>
 
 
 void fl_register_plugins(FlPluginRegistry* registry) {
 void fl_register_plugins(FlPluginRegistry* registry) {
   g_autoptr(FlPluginRegistrar) flowy_infra_ui_registrar =
   g_autoptr(FlPluginRegistrar) flowy_infra_ui_registrar =
@@ -22,10 +23,13 @@ void fl_register_plugins(FlPluginRegistry* registry) {
   g_autoptr(FlPluginRegistrar) rich_clipboard_linux_registrar =
   g_autoptr(FlPluginRegistrar) rich_clipboard_linux_registrar =
       fl_plugin_registry_get_registrar_for_plugin(registry, "RichClipboardPlugin");
       fl_plugin_registry_get_registrar_for_plugin(registry, "RichClipboardPlugin");
   rich_clipboard_plugin_register_with_registrar(rich_clipboard_linux_registrar);
   rich_clipboard_plugin_register_with_registrar(rich_clipboard_linux_registrar);
+  g_autoptr(FlPluginRegistrar) screen_retriever_registrar =
+      fl_plugin_registry_get_registrar_for_plugin(registry, "ScreenRetrieverPlugin");
+  screen_retriever_plugin_register_with_registrar(screen_retriever_registrar);
   g_autoptr(FlPluginRegistrar) url_launcher_linux_registrar =
   g_autoptr(FlPluginRegistrar) url_launcher_linux_registrar =
       fl_plugin_registry_get_registrar_for_plugin(registry, "UrlLauncherPlugin");
       fl_plugin_registry_get_registrar_for_plugin(registry, "UrlLauncherPlugin");
   url_launcher_plugin_register_with_registrar(url_launcher_linux_registrar);
   url_launcher_plugin_register_with_registrar(url_launcher_linux_registrar);
-  g_autoptr(FlPluginRegistrar) window_size_registrar =
-      fl_plugin_registry_get_registrar_for_plugin(registry, "WindowSizePlugin");
-  window_size_plugin_register_with_registrar(window_size_registrar);
+  g_autoptr(FlPluginRegistrar) window_manager_registrar =
+      fl_plugin_registry_get_registrar_for_plugin(registry, "WindowManagerPlugin");
+  window_manager_plugin_register_with_registrar(window_manager_registrar);
 }
 }

+ 2 - 1
frontend/app_flowy/linux/flutter/generated_plugins.cmake

@@ -6,8 +6,9 @@ list(APPEND FLUTTER_PLUGIN_LIST
   flowy_infra_ui
   flowy_infra_ui
   hotkey_manager
   hotkey_manager
   rich_clipboard_linux
   rich_clipboard_linux
+  screen_retriever
   url_launcher_linux
   url_launcher_linux
-  window_size
+  window_manager
 )
 )
 
 
 list(APPEND FLUTTER_FFI_PLUGIN_LIST
 list(APPEND FLUTTER_FFI_PLUGIN_LIST

+ 6 - 4
frontend/app_flowy/macos/Flutter/GeneratedPluginRegistrant.swift

@@ -11,11 +11,12 @@ import device_info_plus_macos
 import flowy_infra_ui
 import flowy_infra_ui
 import hotkey_manager
 import hotkey_manager
 import package_info_plus_macos
 import package_info_plus_macos
-import path_provider_macos
+import path_provider_foundation
 import rich_clipboard_macos
 import rich_clipboard_macos
-import shared_preferences_macos
+import screen_retriever
+import shared_preferences_foundation
 import url_launcher_macos
 import url_launcher_macos
-import window_size
+import window_manager
 
 
 func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
 func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
   AppFlowyBackendPlugin.register(with: registry.registrar(forPlugin: "AppFlowyBackendPlugin"))
   AppFlowyBackendPlugin.register(with: registry.registrar(forPlugin: "AppFlowyBackendPlugin"))
@@ -26,7 +27,8 @@ func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
   FLTPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: "FLTPackageInfoPlusPlugin"))
   FLTPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: "FLTPackageInfoPlusPlugin"))
   PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
   PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
   RichClipboardPlugin.register(with: registry.registrar(forPlugin: "RichClipboardPlugin"))
   RichClipboardPlugin.register(with: registry.registrar(forPlugin: "RichClipboardPlugin"))
+  ScreenRetrieverPlugin.register(with: registry.registrar(forPlugin: "ScreenRetrieverPlugin"))
   SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin"))
   SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin"))
   UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin"))
   UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin"))
-  WindowSizePlugin.register(with: registry.registrar(forPlugin: "WindowSizePlugin"))
+  WindowManagerPlugin.register(with: registry.registrar(forPlugin: "WindowManagerPlugin"))
 }
 }

+ 106 - 122
frontend/app_flowy/pubspec.lock

@@ -7,21 +7,21 @@ packages:
       name: _fe_analyzer_shared
       name: _fe_analyzer_shared
       url: "https://pub.dartlang.org"
       url: "https://pub.dartlang.org"
     source: hosted
     source: hosted
-    version: "46.0.0"
+    version: "47.0.0"
   analyzer:
   analyzer:
     dependency: transitive
     dependency: transitive
     description:
     description:
       name: analyzer
       name: analyzer
       url: "https://pub.dartlang.org"
       url: "https://pub.dartlang.org"
     source: hosted
     source: hosted
-    version: "4.6.0"
+    version: "4.7.0"
   animations:
   animations:
     dependency: transitive
     dependency: transitive
     description:
     description:
       name: animations
       name: animations
       url: "https://pub.dartlang.org"
       url: "https://pub.dartlang.org"
     source: hosted
     source: hosted
-    version: "2.0.3"
+    version: "2.0.7"
   appflowy_backend:
   appflowy_backend:
     dependency: "direct main"
     dependency: "direct main"
     description:
     description:
@@ -72,7 +72,7 @@ packages:
       name: args
       name: args
       url: "https://pub.dartlang.org"
       url: "https://pub.dartlang.org"
     source: hosted
     source: hosted
-    version: "2.3.1"
+    version: "2.3.2"
   async:
   async:
     dependency: transitive
     dependency: transitive
     description:
     description:
@@ -93,7 +93,7 @@ packages:
       name: bloc_test
       name: bloc_test
       url: "https://pub.dartlang.org"
       url: "https://pub.dartlang.org"
     source: hosted
     source: hosted
-    version: "9.0.3"
+    version: "9.1.0"
   boolean_selector:
   boolean_selector:
     dependency: transitive
     dependency: transitive
     description:
     description:
@@ -107,14 +107,14 @@ packages:
       name: build
       name: build
       url: "https://pub.dartlang.org"
       url: "https://pub.dartlang.org"
     source: hosted
     source: hosted
-    version: "2.3.0"
+    version: "2.3.1"
   build_config:
   build_config:
     dependency: transitive
     dependency: transitive
     description:
     description:
       name: build_config
       name: build_config
       url: "https://pub.dartlang.org"
       url: "https://pub.dartlang.org"
     source: hosted
     source: hosted
-    version: "1.1.0"
+    version: "1.1.1"
   build_daemon:
   build_daemon:
     dependency: transitive
     dependency: transitive
     description:
     description:
@@ -128,21 +128,21 @@ packages:
       name: build_resolvers
       name: build_resolvers
       url: "https://pub.dartlang.org"
       url: "https://pub.dartlang.org"
     source: hosted
     source: hosted
-    version: "2.0.9"
+    version: "2.0.10"
   build_runner:
   build_runner:
     dependency: "direct dev"
     dependency: "direct dev"
     description:
     description:
       name: build_runner
       name: build_runner
       url: "https://pub.dartlang.org"
       url: "https://pub.dartlang.org"
     source: hosted
     source: hosted
-    version: "2.2.0"
+    version: "2.3.0"
   build_runner_core:
   build_runner_core:
     dependency: transitive
     dependency: transitive
     description:
     description:
       name: build_runner_core
       name: build_runner_core
       url: "https://pub.dartlang.org"
       url: "https://pub.dartlang.org"
     source: hosted
     source: hosted
-    version: "7.2.3"
+    version: "7.2.7"
   built_collection:
   built_collection:
     dependency: transitive
     dependency: transitive
     description:
     description:
@@ -156,14 +156,14 @@ packages:
       name: built_value
       name: built_value
       url: "https://pub.dartlang.org"
       url: "https://pub.dartlang.org"
     source: hosted
     source: hosted
-    version: "8.3.2"
+    version: "8.4.3"
   calendar_view:
   calendar_view:
     dependency: "direct main"
     dependency: "direct main"
     description:
     description:
       name: calendar_view
       name: calendar_view
       url: "https://pub.dartlang.org"
       url: "https://pub.dartlang.org"
     source: hosted
     source: hosted
-    version: "1.0.1"
+    version: "1.0.2"
   characters:
   characters:
     dependency: transitive
     dependency: transitive
     description:
     description:
@@ -184,7 +184,7 @@ packages:
       name: checked_yaml
       name: checked_yaml
       url: "https://pub.dartlang.org"
       url: "https://pub.dartlang.org"
     source: hosted
     source: hosted
-    version: "2.0.1"
+    version: "2.0.2"
   clipboard:
   clipboard:
     dependency: "direct main"
     dependency: "direct main"
     description:
     description:
@@ -205,7 +205,7 @@ packages:
       name: code_builder
       name: code_builder
       url: "https://pub.dartlang.org"
       url: "https://pub.dartlang.org"
     source: hosted
     source: hosted
-    version: "4.1.0"
+    version: "4.4.0"
   collection:
   collection:
     dependency: "direct main"
     dependency: "direct main"
     description:
     description:
@@ -219,21 +219,21 @@ packages:
       name: connectivity_plus
       name: connectivity_plus
       url: "https://pub.dartlang.org"
       url: "https://pub.dartlang.org"
     source: hosted
     source: hosted
-    version: "2.3.6+1"
+    version: "2.3.9"
   connectivity_plus_linux:
   connectivity_plus_linux:
     dependency: transitive
     dependency: transitive
     description:
     description:
       name: connectivity_plus_linux
       name: connectivity_plus_linux
       url: "https://pub.dartlang.org"
       url: "https://pub.dartlang.org"
     source: hosted
     source: hosted
-    version: "1.3.0"
+    version: "1.3.1"
   connectivity_plus_macos:
   connectivity_plus_macos:
     dependency: transitive
     dependency: transitive
     description:
     description:
       name: connectivity_plus_macos
       name: connectivity_plus_macos
       url: "https://pub.dartlang.org"
       url: "https://pub.dartlang.org"
     source: hosted
     source: hosted
-    version: "1.2.4"
+    version: "1.2.6"
   connectivity_plus_platform_interface:
   connectivity_plus_platform_interface:
     dependency: "direct main"
     dependency: "direct main"
     description:
     description:
@@ -247,7 +247,7 @@ packages:
       name: connectivity_plus_web
       name: connectivity_plus_web
       url: "https://pub.dartlang.org"
       url: "https://pub.dartlang.org"
     source: hosted
     source: hosted
-    version: "1.2.3"
+    version: "1.2.5"
   connectivity_plus_windows:
   connectivity_plus_windows:
     dependency: transitive
     dependency: transitive
     description:
     description:
@@ -261,7 +261,7 @@ packages:
       name: convert
       name: convert
       url: "https://pub.dartlang.org"
       url: "https://pub.dartlang.org"
     source: hosted
     source: hosted
-    version: "3.0.1"
+    version: "3.1.1"
   coverage:
   coverage:
     dependency: transitive
     dependency: transitive
     description:
     description:
@@ -282,21 +282,21 @@ packages:
       name: csslib
       name: csslib
       url: "https://pub.dartlang.org"
       url: "https://pub.dartlang.org"
     source: hosted
     source: hosted
-    version: "0.17.1"
+    version: "0.17.2"
   cupertino_icons:
   cupertino_icons:
     dependency: "direct main"
     dependency: "direct main"
     description:
     description:
       name: cupertino_icons
       name: cupertino_icons
       url: "https://pub.dartlang.org"
       url: "https://pub.dartlang.org"
     source: hosted
     source: hosted
-    version: "1.0.4"
+    version: "1.0.5"
   dart_style:
   dart_style:
     dependency: transitive
     dependency: transitive
     description:
     description:
       name: dart_style
       name: dart_style
       url: "https://pub.dartlang.org"
       url: "https://pub.dartlang.org"
     source: hosted
     source: hosted
-    version: "2.2.3"
+    version: "2.2.4"
   dartz:
   dartz:
     dependency: "direct main"
     dependency: "direct main"
     description:
     description:
@@ -317,7 +317,7 @@ packages:
       name: device_info_plus
       name: device_info_plus
       url: "https://pub.dartlang.org"
       url: "https://pub.dartlang.org"
     source: hosted
     source: hosted
-    version: "3.2.3"
+    version: "3.2.4"
   device_info_plus_linux:
   device_info_plus_linux:
     dependency: transitive
     dependency: transitive
     description:
     description:
@@ -338,7 +338,7 @@ packages:
       name: device_info_plus_platform_interface
       name: device_info_plus_platform_interface
       url: "https://pub.dartlang.org"
       url: "https://pub.dartlang.org"
     source: hosted
     source: hosted
-    version: "2.3.0+1"
+    version: "2.6.1"
   device_info_plus_web:
   device_info_plus_web:
     dependency: transitive
     dependency: transitive
     description:
     description:
@@ -380,7 +380,7 @@ packages:
       name: equatable
       name: equatable
       url: "https://pub.dartlang.org"
       url: "https://pub.dartlang.org"
     source: hosted
     source: hosted
-    version: "2.0.3"
+    version: "2.0.5"
   expandable:
   expandable:
     dependency: "direct main"
     dependency: "direct main"
     description:
     description:
@@ -462,7 +462,7 @@ packages:
       name: flutter_bloc
       name: flutter_bloc
       url: "https://pub.dartlang.org"
       url: "https://pub.dartlang.org"
     source: hosted
     source: hosted
-    version: "8.0.1"
+    version: "8.1.1"
   flutter_colorpicker:
   flutter_colorpicker:
     dependency: "direct main"
     dependency: "direct main"
     description:
     description:
@@ -500,14 +500,14 @@ packages:
       name: flutter_plugin_android_lifecycle
       name: flutter_plugin_android_lifecycle
       url: "https://pub.dartlang.org"
       url: "https://pub.dartlang.org"
     source: hosted
     source: hosted
-    version: "2.0.6"
+    version: "2.0.7"
   flutter_svg:
   flutter_svg:
     dependency: transitive
     dependency: transitive
     description:
     description:
       name: flutter_svg
       name: flutter_svg
       url: "https://pub.dartlang.org"
       url: "https://pub.dartlang.org"
     source: hosted
     source: hosted
-    version: "1.1.4"
+    version: "1.1.6"
   flutter_test:
   flutter_test:
     dependency: "direct dev"
     dependency: "direct dev"
     description: flutter
     description: flutter
@@ -524,21 +524,21 @@ packages:
       name: fluttertoast
       name: fluttertoast
       url: "https://pub.dartlang.org"
       url: "https://pub.dartlang.org"
     source: hosted
     source: hosted
-    version: "8.0.9"
+    version: "8.1.2"
   freezed:
   freezed:
     dependency: "direct dev"
     dependency: "direct dev"
     description:
     description:
       name: freezed
       name: freezed
       url: "https://pub.dartlang.org"
       url: "https://pub.dartlang.org"
     source: hosted
     source: hosted
-    version: "2.1.0+1"
+    version: "2.2.0"
   freezed_annotation:
   freezed_annotation:
     dependency: "direct main"
     dependency: "direct main"
     description:
     description:
       name: freezed_annotation
       name: freezed_annotation
       url: "https://pub.dartlang.org"
       url: "https://pub.dartlang.org"
     source: hosted
     source: hosted
-    version: "2.1.0"
+    version: "2.2.0"
   frontend_server_client:
   frontend_server_client:
     dependency: transitive
     dependency: transitive
     description:
     description:
@@ -564,7 +564,7 @@ packages:
       name: glob
       name: glob
       url: "https://pub.dartlang.org"
       url: "https://pub.dartlang.org"
     source: hosted
     source: hosted
-    version: "2.0.2"
+    version: "2.1.0"
   google_fonts:
   google_fonts:
     dependency: "direct main"
     dependency: "direct main"
     description:
     description:
@@ -578,7 +578,7 @@ packages:
       name: graphs
       name: graphs
       url: "https://pub.dartlang.org"
       url: "https://pub.dartlang.org"
     source: hosted
     source: hosted
-    version: "2.1.0"
+    version: "2.2.0"
   highlight:
   highlight:
     dependency: transitive
     dependency: transitive
     description:
     description:
@@ -599,28 +599,28 @@ packages:
       name: html
       name: html
       url: "https://pub.dartlang.org"
       url: "https://pub.dartlang.org"
     source: hosted
     source: hosted
-    version: "0.15.0"
+    version: "0.15.1"
   http:
   http:
     dependency: transitive
     dependency: transitive
     description:
     description:
       name: http
       name: http
       url: "https://pub.dartlang.org"
       url: "https://pub.dartlang.org"
     source: hosted
     source: hosted
-    version: "0.13.4"
+    version: "0.13.5"
   http_multi_server:
   http_multi_server:
     dependency: transitive
     dependency: transitive
     description:
     description:
       name: http_multi_server
       name: http_multi_server
       url: "https://pub.dartlang.org"
       url: "https://pub.dartlang.org"
     source: hosted
     source: hosted
-    version: "3.2.0"
+    version: "3.2.1"
   http_parser:
   http_parser:
     dependency: transitive
     dependency: transitive
     description:
     description:
       name: http_parser
       name: http_parser
       url: "https://pub.dartlang.org"
       url: "https://pub.dartlang.org"
     source: hosted
     source: hosted
-    version: "4.0.1"
+    version: "4.0.2"
   integration_test:
   integration_test:
     dependency: "direct dev"
     dependency: "direct dev"
     description: flutter
     description: flutter
@@ -646,7 +646,7 @@ packages:
       name: io
       name: io
       url: "https://pub.dartlang.org"
       url: "https://pub.dartlang.org"
     source: hosted
     source: hosted
-    version: "1.0.3"
+    version: "1.0.4"
   isolates:
   isolates:
     dependency: transitive
     dependency: transitive
     description:
     description:
@@ -667,7 +667,7 @@ packages:
       name: json_annotation
       name: json_annotation
       url: "https://pub.dartlang.org"
       url: "https://pub.dartlang.org"
     source: hosted
     source: hosted
-    version: "4.5.0"
+    version: "4.8.0"
   linked_scroll_controller:
   linked_scroll_controller:
     dependency: "direct main"
     dependency: "direct main"
     description:
     description:
@@ -681,14 +681,14 @@ packages:
       name: lint
       name: lint
       url: "https://pub.dartlang.org"
       url: "https://pub.dartlang.org"
     source: hosted
     source: hosted
-    version: "1.8.2"
+    version: "1.10.0"
   lints:
   lints:
     dependency: transitive
     dependency: transitive
     description:
     description:
       name: lints
       name: lints
       url: "https://pub.dartlang.org"
       url: "https://pub.dartlang.org"
     source: hosted
     source: hosted
-    version: "2.0.0"
+    version: "2.0.1"
   loading_indicator:
   loading_indicator:
     dependency: transitive
     dependency: transitive
     description:
     description:
@@ -709,7 +709,7 @@ packages:
       name: logging
       name: logging
       url: "https://pub.dartlang.org"
       url: "https://pub.dartlang.org"
     source: hosted
     source: hosted
-    version: "1.0.2"
+    version: "1.1.1"
   markdown:
   markdown:
     dependency: transitive
     dependency: transitive
     description:
     description:
@@ -744,7 +744,7 @@ packages:
       name: mime
       name: mime
       url: "https://pub.dartlang.org"
       url: "https://pub.dartlang.org"
     source: hosted
     source: hosted
-    version: "1.0.2"
+    version: "1.0.4"
   mocktail:
   mocktail:
     dependency: transitive
     dependency: transitive
     description:
     description:
@@ -779,7 +779,7 @@ packages:
       name: package_config
       name: package_config
       url: "https://pub.dartlang.org"
       url: "https://pub.dartlang.org"
     source: hosted
     source: hosted
-    version: "2.0.2"
+    version: "2.1.0"
   package_info_plus:
   package_info_plus:
     dependency: "direct main"
     dependency: "direct main"
     description:
     description:
@@ -814,7 +814,7 @@ packages:
       name: package_info_plus_web
       name: package_info_plus_web
       url: "https://pub.dartlang.org"
       url: "https://pub.dartlang.org"
     source: hosted
     source: hosted
-    version: "1.0.5"
+    version: "1.0.6"
   package_info_plus_windows:
   package_info_plus_windows:
     dependency: transitive
     dependency: transitive
     description:
     description:
@@ -849,49 +849,42 @@ packages:
       name: path_provider
       name: path_provider
       url: "https://pub.dartlang.org"
       url: "https://pub.dartlang.org"
     source: hosted
     source: hosted
-    version: "2.0.10"
+    version: "2.0.12"
   path_provider_android:
   path_provider_android:
     dependency: transitive
     dependency: transitive
     description:
     description:
       name: path_provider_android
       name: path_provider_android
       url: "https://pub.dartlang.org"
       url: "https://pub.dartlang.org"
     source: hosted
     source: hosted
-    version: "2.0.14"
-  path_provider_ios:
+    version: "2.0.22"
+  path_provider_foundation:
     dependency: transitive
     dependency: transitive
     description:
     description:
-      name: path_provider_ios
+      name: path_provider_foundation
       url: "https://pub.dartlang.org"
       url: "https://pub.dartlang.org"
     source: hosted
     source: hosted
-    version: "2.0.9"
+    version: "2.1.1"
   path_provider_linux:
   path_provider_linux:
     dependency: transitive
     dependency: transitive
     description:
     description:
       name: path_provider_linux
       name: path_provider_linux
       url: "https://pub.dartlang.org"
       url: "https://pub.dartlang.org"
     source: hosted
     source: hosted
-    version: "2.1.6"
-  path_provider_macos:
-    dependency: transitive
-    description:
-      name: path_provider_macos
-      url: "https://pub.dartlang.org"
-    source: hosted
-    version: "2.0.6"
+    version: "2.1.7"
   path_provider_platform_interface:
   path_provider_platform_interface:
     dependency: transitive
     dependency: transitive
     description:
     description:
       name: path_provider_platform_interface
       name: path_provider_platform_interface
       url: "https://pub.dartlang.org"
       url: "https://pub.dartlang.org"
     source: hosted
     source: hosted
-    version: "2.0.4"
+    version: "2.0.5"
   path_provider_windows:
   path_provider_windows:
     dependency: transitive
     dependency: transitive
     description:
     description:
       name: path_provider_windows
       name: path_provider_windows
       url: "https://pub.dartlang.org"
       url: "https://pub.dartlang.org"
     source: hosted
     source: hosted
-    version: "2.0.6"
+    version: "2.0.7"
   percent_indicator:
   percent_indicator:
     dependency: "direct main"
     dependency: "direct main"
     description:
     description:
@@ -905,7 +898,7 @@ packages:
       name: petitparser
       name: petitparser
       url: "https://pub.dartlang.org"
       url: "https://pub.dartlang.org"
     source: hosted
     source: hosted
-    version: "5.0.0"
+    version: "5.1.0"
   platform:
   platform:
     dependency: transitive
     dependency: transitive
     description:
     description:
@@ -926,7 +919,7 @@ packages:
       name: pool
       name: pool
       url: "https://pub.dartlang.org"
       url: "https://pub.dartlang.org"
     source: hosted
     source: hosted
-    version: "1.5.0"
+    version: "1.5.1"
   process:
   process:
     dependency: transitive
     dependency: transitive
     description:
     description:
@@ -947,28 +940,21 @@ packages:
       name: provider
       name: provider
       url: "https://pub.dartlang.org"
       url: "https://pub.dartlang.org"
     source: hosted
     source: hosted
-    version: "6.0.3"
+    version: "6.0.5"
   pub_semver:
   pub_semver:
     dependency: transitive
     dependency: transitive
     description:
     description:
       name: pub_semver
       name: pub_semver
       url: "https://pub.dartlang.org"
       url: "https://pub.dartlang.org"
     source: hosted
     source: hosted
-    version: "2.1.1"
+    version: "2.1.3"
   pubspec_parse:
   pubspec_parse:
     dependency: transitive
     dependency: transitive
     description:
     description:
       name: pubspec_parse
       name: pubspec_parse
       url: "https://pub.dartlang.org"
       url: "https://pub.dartlang.org"
     source: hosted
     source: hosted
-    version: "1.2.0"
-  quiver:
-    dependency: transitive
-    description:
-      name: quiver
-      url: "https://pub.dartlang.org"
-    source: hosted
-    version: "3.1.0"
+    version: "1.2.1"
   reorderables:
   reorderables:
     dependency: "direct main"
     dependency: "direct main"
     description:
     description:
@@ -1003,7 +989,7 @@ packages:
       name: rich_clipboard_linux
       name: rich_clipboard_linux
       url: "https://pub.dartlang.org"
       url: "https://pub.dartlang.org"
     source: hosted
     source: hosted
-    version: "1.0.0"
+    version: "1.0.1"
   rich_clipboard_macos:
   rich_clipboard_macos:
     dependency: transitive
     dependency: transitive
     description:
     description:
@@ -1024,56 +1010,56 @@ packages:
       name: rich_clipboard_web
       name: rich_clipboard_web
       url: "https://pub.dartlang.org"
       url: "https://pub.dartlang.org"
     source: hosted
     source: hosted
-    version: "1.0.0"
+    version: "1.0.2"
   rich_clipboard_windows:
   rich_clipboard_windows:
     dependency: transitive
     dependency: transitive
     description:
     description:
       name: rich_clipboard_windows
       name: rich_clipboard_windows
       url: "https://pub.dartlang.org"
       url: "https://pub.dartlang.org"
     source: hosted
     source: hosted
-    version: "1.0.0"
+    version: "1.0.1"
+  screen_retriever:
+    dependency: transitive
+    description:
+      name: screen_retriever
+      url: "https://pub.dartlang.org"
+    source: hosted
+    version: "0.1.5"
   shared_preferences:
   shared_preferences:
     dependency: "direct main"
     dependency: "direct main"
     description:
     description:
       name: shared_preferences
       name: shared_preferences
       url: "https://pub.dartlang.org"
       url: "https://pub.dartlang.org"
     source: hosted
     source: hosted
-    version: "2.0.15"
+    version: "2.0.17"
   shared_preferences_android:
   shared_preferences_android:
     dependency: transitive
     dependency: transitive
     description:
     description:
       name: shared_preferences_android
       name: shared_preferences_android
       url: "https://pub.dartlang.org"
       url: "https://pub.dartlang.org"
     source: hosted
     source: hosted
-    version: "2.0.12"
-  shared_preferences_ios:
+    version: "2.0.15"
+  shared_preferences_foundation:
     dependency: transitive
     dependency: transitive
     description:
     description:
-      name: shared_preferences_ios
+      name: shared_preferences_foundation
       url: "https://pub.dartlang.org"
       url: "https://pub.dartlang.org"
     source: hosted
     source: hosted
-    version: "2.1.1"
+    version: "2.1.3"
   shared_preferences_linux:
   shared_preferences_linux:
     dependency: transitive
     dependency: transitive
     description:
     description:
       name: shared_preferences_linux
       name: shared_preferences_linux
       url: "https://pub.dartlang.org"
       url: "https://pub.dartlang.org"
     source: hosted
     source: hosted
-    version: "2.1.1"
-  shared_preferences_macos:
-    dependency: transitive
-    description:
-      name: shared_preferences_macos
-      url: "https://pub.dartlang.org"
-    source: hosted
-    version: "2.0.4"
+    version: "2.1.3"
   shared_preferences_platform_interface:
   shared_preferences_platform_interface:
     dependency: transitive
     dependency: transitive
     description:
     description:
       name: shared_preferences_platform_interface
       name: shared_preferences_platform_interface
       url: "https://pub.dartlang.org"
       url: "https://pub.dartlang.org"
     source: hosted
     source: hosted
-    version: "2.0.0"
+    version: "2.1.0"
   shared_preferences_web:
   shared_preferences_web:
     dependency: transitive
     dependency: transitive
     description:
     description:
@@ -1087,35 +1073,35 @@ packages:
       name: shared_preferences_windows
       name: shared_preferences_windows
       url: "https://pub.dartlang.org"
       url: "https://pub.dartlang.org"
     source: hosted
     source: hosted
-    version: "2.1.1"
+    version: "2.1.3"
   shelf:
   shelf:
     dependency: transitive
     dependency: transitive
     description:
     description:
       name: shelf
       name: shelf
       url: "https://pub.dartlang.org"
       url: "https://pub.dartlang.org"
     source: hosted
     source: hosted
-    version: "1.3.0"
+    version: "1.4.0"
   shelf_packages_handler:
   shelf_packages_handler:
     dependency: transitive
     dependency: transitive
     description:
     description:
       name: shelf_packages_handler
       name: shelf_packages_handler
       url: "https://pub.dartlang.org"
       url: "https://pub.dartlang.org"
     source: hosted
     source: hosted
-    version: "3.0.0"
+    version: "3.0.1"
   shelf_static:
   shelf_static:
     dependency: transitive
     dependency: transitive
     description:
     description:
       name: shelf_static
       name: shelf_static
       url: "https://pub.dartlang.org"
       url: "https://pub.dartlang.org"
     source: hosted
     source: hosted
-    version: "1.1.0"
+    version: "1.1.1"
   shelf_web_socket:
   shelf_web_socket:
     dependency: transitive
     dependency: transitive
     description:
     description:
       name: shelf_web_socket
       name: shelf_web_socket
       url: "https://pub.dartlang.org"
       url: "https://pub.dartlang.org"
     source: hosted
     source: hosted
-    version: "1.0.1"
+    version: "1.0.3"
   simple_gesture_detector:
   simple_gesture_detector:
     dependency: transitive
     dependency: transitive
     description:
     description:
@@ -1141,21 +1127,21 @@ packages:
       name: source_gen
       name: source_gen
       url: "https://pub.dartlang.org"
       url: "https://pub.dartlang.org"
     source: hosted
     source: hosted
-    version: "1.2.2"
+    version: "1.2.6"
   source_map_stack_trace:
   source_map_stack_trace:
     dependency: transitive
     dependency: transitive
     description:
     description:
       name: source_map_stack_trace
       name: source_map_stack_trace
       url: "https://pub.dartlang.org"
       url: "https://pub.dartlang.org"
     source: hosted
     source: hosted
-    version: "2.1.0"
+    version: "2.1.1"
   source_maps:
   source_maps:
     dependency: transitive
     dependency: transitive
     description:
     description:
       name: source_maps
       name: source_maps
       url: "https://pub.dartlang.org"
       url: "https://pub.dartlang.org"
     source: hosted
     source: hosted
-    version: "0.10.10"
+    version: "0.10.11"
   source_span:
   source_span:
     dependency: transitive
     dependency: transitive
     description:
     description:
@@ -1183,7 +1169,7 @@ packages:
       name: stream_transform
       name: stream_transform
       url: "https://pub.dartlang.org"
       url: "https://pub.dartlang.org"
     source: hosted
     source: hosted
-    version: "2.0.0"
+    version: "2.1.0"
   string_scanner:
   string_scanner:
     dependency: transitive
     dependency: transitive
     description:
     description:
@@ -1211,7 +1197,7 @@ packages:
       name: table_calendar
       name: table_calendar
       url: "https://pub.dartlang.org"
       url: "https://pub.dartlang.org"
     source: hosted
     source: hosted
-    version: "3.0.5"
+    version: "3.0.8"
   term_glyph:
   term_glyph:
     dependency: transitive
     dependency: transitive
     description:
     description:
@@ -1260,21 +1246,21 @@ packages:
       name: time
       name: time
       url: "https://pub.dartlang.org"
       url: "https://pub.dartlang.org"
     source: hosted
     source: hosted
-    version: "2.1.0"
+    version: "2.1.3"
   timing:
   timing:
     dependency: transitive
     dependency: transitive
     description:
     description:
       name: timing
       name: timing
       url: "https://pub.dartlang.org"
       url: "https://pub.dartlang.org"
     source: hosted
     source: hosted
-    version: "1.0.0"
+    version: "1.0.1"
   tuple:
   tuple:
     dependency: "direct main"
     dependency: "direct main"
     description:
     description:
       name: tuple
       name: tuple
       url: "https://pub.dartlang.org"
       url: "https://pub.dartlang.org"
     source: hosted
     source: hosted
-    version: "2.0.0"
+    version: "2.0.1"
   typed_data:
   typed_data:
     dependency: transitive
     dependency: transitive
     description:
     description:
@@ -1295,63 +1281,63 @@ packages:
       name: url_launcher
       name: url_launcher
       url: "https://pub.dartlang.org"
       url: "https://pub.dartlang.org"
     source: hosted
     source: hosted
-    version: "6.1.5"
+    version: "6.1.8"
   url_launcher_android:
   url_launcher_android:
     dependency: transitive
     dependency: transitive
     description:
     description:
       name: url_launcher_android
       name: url_launcher_android
       url: "https://pub.dartlang.org"
       url: "https://pub.dartlang.org"
     source: hosted
     source: hosted
-    version: "6.0.17"
+    version: "6.0.23"
   url_launcher_ios:
   url_launcher_ios:
     dependency: transitive
     dependency: transitive
     description:
     description:
       name: url_launcher_ios
       name: url_launcher_ios
       url: "https://pub.dartlang.org"
       url: "https://pub.dartlang.org"
     source: hosted
     source: hosted
-    version: "6.0.17"
+    version: "6.0.18"
   url_launcher_linux:
   url_launcher_linux:
     dependency: transitive
     dependency: transitive
     description:
     description:
       name: url_launcher_linux
       name: url_launcher_linux
       url: "https://pub.dartlang.org"
       url: "https://pub.dartlang.org"
     source: hosted
     source: hosted
-    version: "3.0.1"
+    version: "3.0.2"
   url_launcher_macos:
   url_launcher_macos:
     dependency: transitive
     dependency: transitive
     description:
     description:
       name: url_launcher_macos
       name: url_launcher_macos
       url: "https://pub.dartlang.org"
       url: "https://pub.dartlang.org"
     source: hosted
     source: hosted
-    version: "3.0.1"
+    version: "3.0.2"
   url_launcher_platform_interface:
   url_launcher_platform_interface:
     dependency: transitive
     dependency: transitive
     description:
     description:
       name: url_launcher_platform_interface
       name: url_launcher_platform_interface
       url: "https://pub.dartlang.org"
       url: "https://pub.dartlang.org"
     source: hosted
     source: hosted
-    version: "2.1.0"
+    version: "2.1.1"
   url_launcher_web:
   url_launcher_web:
     dependency: transitive
     dependency: transitive
     description:
     description:
       name: url_launcher_web
       name: url_launcher_web
       url: "https://pub.dartlang.org"
       url: "https://pub.dartlang.org"
     source: hosted
     source: hosted
-    version: "2.0.11"
+    version: "2.0.14"
   url_launcher_windows:
   url_launcher_windows:
     dependency: transitive
     dependency: transitive
     description:
     description:
       name: url_launcher_windows
       name: url_launcher_windows
       url: "https://pub.dartlang.org"
       url: "https://pub.dartlang.org"
     source: hosted
     source: hosted
-    version: "3.0.1"
+    version: "3.0.3"
   uuid:
   uuid:
     dependency: transitive
     dependency: transitive
     description:
     description:
       name: uuid
       name: uuid
       url: "https://pub.dartlang.org"
       url: "https://pub.dartlang.org"
     source: hosted
     source: hosted
-    version: "3.0.6"
+    version: "3.0.7"
   vector_math:
   vector_math:
     dependency: transitive
     dependency: transitive
     description:
     description:
@@ -1372,14 +1358,14 @@ packages:
       name: watcher
       name: watcher
       url: "https://pub.dartlang.org"
       url: "https://pub.dartlang.org"
     source: hosted
     source: hosted
-    version: "1.0.1"
+    version: "1.0.2"
   web_socket_channel:
   web_socket_channel:
     dependency: transitive
     dependency: transitive
     description:
     description:
       name: web_socket_channel
       name: web_socket_channel
       url: "https://pub.dartlang.org"
       url: "https://pub.dartlang.org"
     source: hosted
     source: hosted
-    version: "2.2.0"
+    version: "2.3.0"
   webdriver:
   webdriver:
     dependency: transitive
     dependency: transitive
     description:
     description:
@@ -1393,7 +1379,7 @@ packages:
       name: webkit_inspection_protocol
       name: webkit_inspection_protocol
       url: "https://pub.dartlang.org"
       url: "https://pub.dartlang.org"
     source: hosted
     source: hosted
-    version: "1.1.0"
+    version: "1.2.0"
   win32:
   win32:
     dependency: transitive
     dependency: transitive
     description:
     description:
@@ -1401,22 +1387,20 @@ packages:
       url: "https://pub.dartlang.org"
       url: "https://pub.dartlang.org"
     source: hosted
     source: hosted
     version: "2.6.1"
     version: "2.6.1"
-  window_size:
+  window_manager:
     dependency: "direct main"
     dependency: "direct main"
     description:
     description:
-      path: "plugins/window_size"
-      ref: e48abe7c3e9ebfe0b81622167c5201d4e783bb81
-      resolved-ref: e48abe7c3e9ebfe0b81622167c5201d4e783bb81
-      url: "https://github.com/google/flutter-desktop-embedding.git"
-    source: git
-    version: "0.1.0"
+      name: window_manager
+      url: "https://pub.dartlang.org"
+    source: hosted
+    version: "0.3.0"
   xdg_directories:
   xdg_directories:
     dependency: transitive
     dependency: transitive
     description:
     description:
       name: xdg_directories
       name: xdg_directories
       url: "https://pub.dartlang.org"
       url: "https://pub.dartlang.org"
     source: hosted
     source: hosted
-    version: "0.2.0+1"
+    version: "0.2.0+3"
   xml:
   xml:
     dependency: transitive
     dependency: transitive
     description:
     description:

+ 1 - 5
frontend/app_flowy/pubspec.yaml

@@ -57,11 +57,6 @@ dependencies:
   dartz: ^0.10.1
   dartz: ^0.10.1
   provider: ^6.0.1
   provider: ^6.0.1
   path_provider: ^2.0.1
   path_provider: ^2.0.1
-  window_size:
-    git:
-      url: https://github.com/google/flutter-desktop-embedding.git
-      path: plugins/window_size
-      ref: e48abe7c3e9ebfe0b81622167c5201d4e783bb81
   sized_context: ^1.0.0+1
   sized_context: ^1.0.0+1
   styled_widget: "^0.3.1"
   styled_widget: "^0.3.1"
   expandable: ^5.0.1
   expandable: ^5.0.1
@@ -97,6 +92,7 @@ dependencies:
   appflowy_editor_plugins:
   appflowy_editor_plugins:
     path: packages/appflowy_editor_plugins
     path: packages/appflowy_editor_plugins
   calendar_view: ^1.0.1
   calendar_view: ^1.0.1
+  window_manager: ^0.3.0
 
 
 dev_dependencies:
 dev_dependencies:
   flutter_lints: ^2.0.1
   flutter_lints: ^2.0.1