From 7f41fc2622d795f8c8b5f1da133185f2105f683e Mon Sep 17 00:00:00 2001 From: "Lucas.Xu" Date: Thu, 12 Sep 2024 10:30:17 +0800 Subject: [PATCH 1/2] chore: update editor dependency --- .../example/pubspec.lock | 44 +++++++++---------- .../code_block_block_component.dart | 6 +-- .../video_block/video_block_component.dart | 6 +-- .../lib/src/video_block/video_block_menu.dart | 8 ++-- packages/appflowy_editor_plugins/pubspec.yaml | 26 +++++------ 5 files changed, 44 insertions(+), 46 deletions(-) diff --git a/packages/appflowy_editor_plugins/example/pubspec.lock b/packages/appflowy_editor_plugins/example/pubspec.lock index d019795..35f3517 100644 --- a/packages/appflowy_editor_plugins/example/pubspec.lock +++ b/packages/appflowy_editor_plugins/example/pubspec.lock @@ -21,18 +21,18 @@ packages: dependency: "direct main" description: path: "." - ref: "6718ae7" - resolved-ref: "6718ae7fcd8e6ad53652d1eeaaf2bb4056106a40" + ref: b5da6e4 + resolved-ref: b5da6e4afcb832ca74f588d7007824b02b5d51de url: "https://github.com/AppFlowy-IO/appflowy-editor.git" source: git - version: "2.3.4" + version: "2.5.1" appflowy_editor_plugins: dependency: "direct main" description: path: ".." relative: true source: path - version: "0.0.4" + version: "0.0.6" archive: dependency: transitive description: @@ -337,10 +337,10 @@ packages: dependency: transitive description: name: intl - sha256: "3bc132a9dbce73a7e4a21a17d06e1878839ffbf975568bc875c60537824b0c4d" + sha256: d6f56758b7d3014a48af9701c085700aac781a92a87a62b1333b46d8879661cf url: "https://pub.dev" source: hosted - version: "0.18.1" + version: "0.19.0" intl_utils: dependency: transitive description: @@ -377,26 +377,26 @@ packages: dependency: transitive description: name: leak_tracker - sha256: "78eb209deea09858f5269f5a5b02be4049535f568c07b275096836f01ea323fa" + sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a" url: "https://pub.dev" source: hosted - version: "10.0.0" + version: "10.0.4" leak_tracker_flutter_testing: dependency: transitive description: name: leak_tracker_flutter_testing - sha256: b46c5e37c19120a8a01918cfaf293547f47269f7cb4b0058f21531c2465d6ef0 + sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8" url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "3.0.3" leak_tracker_testing: dependency: transitive description: name: leak_tracker_testing - sha256: a597f72a664dbd293f3bfc51f9ba69816f84dcd403cdac7066cb3f6003f3ab47 + sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "3.0.1" linkify: dependency: transitive description: @@ -521,10 +521,10 @@ packages: dependency: transitive description: name: meta - sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04 + sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136" url: "https://pub.dev" source: hosted - version: "1.11.0" + version: "1.12.0" nanoid: dependency: transitive description: @@ -782,10 +782,10 @@ packages: dependency: transitive description: name: string_scanner - sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" + sha256: "688af5ed3402a4bde5b3a6c15fd768dbf2621a614950b17f04626c431ab3c4c3" url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.3.0" string_validator: dependency: transitive description: @@ -814,10 +814,10 @@ packages: dependency: transitive description: name: test_api - sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" + sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f" url: "https://pub.dev" source: hosted - version: "0.6.1" + version: "0.7.0" tuple: dependency: transitive description: @@ -982,10 +982,10 @@ packages: dependency: transitive description: name: vm_service - sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957 + sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d" url: "https://pub.dev" source: hosted - version: "13.0.0" + version: "14.2.5" volume_controller: dependency: transitive description: @@ -1067,5 +1067,5 @@ packages: source: hosted version: "3.1.2" sdks: - dart: ">=3.3.3 <4.0.0" - flutter: ">=3.19.0" + dart: ">=3.4.0 <4.0.0" + flutter: ">=3.22.0" diff --git a/packages/appflowy_editor_plugins/lib/src/code_block/code_block_block_component.dart b/packages/appflowy_editor_plugins/lib/src/code_block/code_block_block_component.dart index fc6d795..d344277 100644 --- a/packages/appflowy_editor_plugins/lib/src/code_block/code_block_block_component.dart +++ b/packages/appflowy_editor_plugins/lib/src/code_block/code_block_block_component.dart @@ -1,15 +1,15 @@ import 'dart:async'; -import 'package:flutter/material.dart'; - import 'package:appflowy_editor/appflowy_editor.dart'; import 'package:appflowy_editor_plugins/src/code_block/code_block_actions.dart'; import 'package:appflowy_editor_plugins/src/code_block/code_block_localization.dart'; import 'package:appflowy_editor_plugins/src/code_block/code_block_style.dart'; import 'package:appflowy_editor_plugins/src/utils/string_ext.dart'; +import 'package:flutter/material.dart'; import 'package:highlight/highlight.dart' as highlight; import 'package:highlight/languages/all.dart'; import 'package:provider/provider.dart'; +import 'package:universal_platform/universal_platform.dart'; import 'code_block_themes.dart'; @@ -420,7 +420,7 @@ class _CodeBlockComponentWidgetState extends State if (widget.actionWrapperBuilder != null) { child = widget.actionWrapperBuilder!(node, editorState, child); - } else if (PlatformExtension.isDesktopOrWeb) { + } else if (UniversalPlatform.isDesktopOrWeb) { if (widget.showActions && widget.actionBuilder != null) { child = BlockComponentActionWrapper( node: widget.node, diff --git a/packages/appflowy_editor_plugins/lib/src/video_block/video_block_component.dart b/packages/appflowy_editor_plugins/lib/src/video_block/video_block_component.dart index 2d2b7fa..08231c9 100644 --- a/packages/appflowy_editor_plugins/lib/src/video_block/video_block_component.dart +++ b/packages/appflowy_editor_plugins/lib/src/video_block/video_block_component.dart @@ -1,13 +1,13 @@ import 'dart:io'; -import 'package:flutter/material.dart'; - import 'package:appflowy_editor/appflowy_editor.dart'; import 'package:appflowy_editor_plugins/src/video_block/resizable_video_player.dart'; +import 'package:flutter/material.dart'; import 'package:media_kit/media_kit.dart'; import 'package:media_kit_video/media_kit_video.dart'; import 'package:provider/provider.dart'; import 'package:string_validator/string_validator.dart'; +import 'package:universal_platform/universal_platform.dart'; typedef VoidVideoCallback = void Function(BuildContext, Node, EditorState); @@ -209,7 +209,7 @@ class VideoBlockComponentState extends State @override void initState() { super.initState(); - _alwaysShowMenu = PlatformExtension.isMobile; + _alwaysShowMenu = UniversalPlatform.isMobile; final src = node.attributes[VideoBlockKeys.url]; if (src == null || src.isEmpty || !_checkIfURLIsValid(src)) { diff --git a/packages/appflowy_editor_plugins/lib/src/video_block/video_block_menu.dart b/packages/appflowy_editor_plugins/lib/src/video_block/video_block_menu.dart index 0b306e9..679e3e2 100644 --- a/packages/appflowy_editor_plugins/lib/src/video_block/video_block_menu.dart +++ b/packages/appflowy_editor_plugins/lib/src/video_block/video_block_menu.dart @@ -1,9 +1,9 @@ -import 'package:flutter/material.dart'; -import 'package:flutter/services.dart'; - import 'package:appflowy_editor/appflowy_editor.dart'; import 'package:appflowy_editor_plugins/appflowy_editor_plugins.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; import 'package:provider/provider.dart'; +import 'package:universal_platform/universal_platform.dart'; const _leftAlignKey = 'left'; const _centerAlignKey = 'center'; @@ -162,7 +162,7 @@ class _AlignButtonState extends State<_AlignButton> { transaction.updateNode(widget.node, {VideoBlockKeys.alignment: align}); editorState.apply(transaction); - if (!PlatformExtension.isMobile) { + if (!UniversalPlatform.isMobile) { allowMenuClose(); } } diff --git a/packages/appflowy_editor_plugins/pubspec.yaml b/packages/appflowy_editor_plugins/pubspec.yaml index aea2c1f..5654139 100644 --- a/packages/appflowy_editor_plugins/pubspec.yaml +++ b/packages/appflowy_editor_plugins/pubspec.yaml @@ -18,32 +18,30 @@ platforms: web: environment: - sdk: ">=3.1.5 <4.0.0" - flutter: ">=3.13.0" + sdk: ">=3.4.0 <4.0.0" + flutter: ">=3.22.0" dependencies: + appflowy_editor: ^3.3.0 flutter: sdk: flutter - - appflowy_editor: ^2.3.4 - provider: ^6.1.2 - - # Link Preview Plugin - url_launcher: ^6.2.6 - string_validator: ^1.0.2 - flutter_link_previewer: ^3.2.2 flutter_chat_types: ^3.6.2 + flutter_link_previewer: ^3.2.2 # Code Block Plugin highlight: ^0.7.0 # Video Plugin media_kit: ^1.1.10+1 - media_kit_video: ^1.2.4 media_kit_libs_video: ^1.0.4 + media_kit_video: ^1.2.4 + provider: ^6.1.2 + string_validator: ^1.0.2 + + universal_platform: ^1.1.0 + + # Link Preview Plugin + url_launcher: ^6.2.6 dev_dependencies: flutter_lints: ^3.0.2 - -# The following section is specific to Flutter packages. -flutter: From 25caee6dc5128e926e4d183e79cbf5c0b7514b79 Mon Sep 17 00:00:00 2001 From: Mathias Mogensen Date: Fri, 13 Sep 2024 00:20:14 +0200 Subject: [PATCH 2/2] ci: update flutter in ci --- .github/workflows/analyze.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/analyze.yml b/.github/workflows/analyze.yml index 2ce7172..952b695 100644 --- a/.github/workflows/analyze.yml +++ b/.github/workflows/analyze.yml @@ -17,7 +17,7 @@ on: workflow_dispatch: env: - FLUTTER_VERSION: "3.19.5" + FLUTTER_VERSION: "3.24.0" jobs: analyze: