diff --git a/CHANGELOG.md b/CHANGELOG.md index 47fb6b530..01b7df72b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +## 6.1.1 +* chore: upgrade file_picker to ^11.0.2 and migrate to new static API +* chore: upgrade device_info_plus to ^12.4.0 +* chore: upgrade html to ^0.15.6 + ## 6.1.0 * fix: unable to input text on windows desktop by @imaachman in https://github.com/AppFlowy-IO/appflowy-editor/pull/1126 * feat: open html decoder for custom parser by @richardshiue in https://github.com/AppFlowy-IO/appflowy-editor/pull/1145 diff --git a/example/lib/home_page.dart b/example/lib/home_page.dart index 8802910e3..cd04b2b29 100644 --- a/example/lib/home_page.dart +++ b/example/lib/home_page.dart @@ -416,7 +416,7 @@ class _HomePageState extends State { } } else { // for desktop - final path = await FilePicker.platform.saveFile( + final path = await FilePicker.saveFile( fileName: 'document.${fileType.extension}', ); if (path != null) { @@ -444,7 +444,7 @@ class _HomePageState extends State { } void _importFile(ExportFileType fileType) async { - final result = await FilePicker.platform.pickFiles( + final result = await FilePicker.pickFiles( allowMultiple: false, allowedExtensions: [fileType.extension], type: FileType.custom, diff --git a/example/pubspec.yaml b/example/pubspec.yaml index e9148358f..91e9ff9f2 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -42,7 +42,7 @@ dependencies: google_fonts: ^6.1.0 flutter_localizations: sdk: flutter - file_picker: ^10.3.10 + file_picker: ^11.0.2 universal_html: ^2.0.8 highlight: ^0.7.0 http: ^1.1.0 diff --git a/lib/src/editor/editor_component/service/ime/delta_input_service.dart b/lib/src/editor/editor_component/service/ime/delta_input_service.dart index f2342398c..1908fc76f 100644 --- a/lib/src/editor/editor_component/service/ime/delta_input_service.dart +++ b/lib/src/editor/editor_component/service/ime/delta_input_service.dart @@ -19,6 +19,12 @@ class DeltaTextInputService extends TextInputService with DeltaTextInputClient { @override bool get attached => _textInputConnection?.attached ?? false; + // Added in Flutter 3.44 (TextInputClient.onFocusReceived). + // Returning `attached` signals that focus was handled whenever an IME + // connection is active. Default implementation returns false. + @override + bool onFocusReceived() => attached; + @override AutofillScope? get currentAutofillScope => throw UnimplementedError(); diff --git a/lib/src/editor/editor_component/service/ime/non_delta_input_service.dart b/lib/src/editor/editor_component/service/ime/non_delta_input_service.dart index 53f5a2ee0..f3e8e511c 100644 --- a/lib/src/editor/editor_component/service/ime/non_delta_input_service.dart +++ b/lib/src/editor/editor_component/service/ime/non_delta_input_service.dart @@ -26,6 +26,12 @@ class NonDeltaTextInputService extends TextInputService with TextInputClient { @override bool get attached => _textInputConnection?.attached ?? false; + // Added in Flutter 3.44 (TextInputClient.onFocusReceived). + // Returning `attached` signals that focus was handled whenever an IME + // connection is active. Default implementation returns false. + @override + bool onFocusReceived() => attached; + @override AutofillScope? get currentAutofillScope => throw UnimplementedError(); diff --git a/lib/src/editor/util/file_picker/file_picker_impl.dart b/lib/src/editor/util/file_picker/file_picker_impl.dart index e36d3020f..974146972 100644 --- a/lib/src/editor/util/file_picker/file_picker_impl.dart +++ b/lib/src/editor/util/file_picker/file_picker_impl.dart @@ -4,7 +4,7 @@ import 'package:file_picker/file_picker.dart' as fp; class FilePicker implements FilePickerService { @override Future getDirectoryPath({String? title}) { - return fp.FilePicker.platform.getDirectoryPath(); + return fp.FilePicker.getDirectoryPath(); } @override @@ -19,7 +19,7 @@ class FilePicker implements FilePickerService { bool withReadStream = false, bool lockParentWindow = false, }) async { - final result = await fp.FilePicker.platform.pickFiles( + final result = await fp.FilePicker.pickFiles( dialogTitle: dialogTitle, initialDirectory: initialDirectory, type: type, @@ -43,7 +43,7 @@ class FilePicker implements FilePickerService { List? allowedExtensions, bool lockParentWindow = false, }) { - return fp.FilePicker.platform.saveFile( + return fp.FilePicker.saveFile( dialogTitle: dialogTitle, fileName: fileName, initialDirectory: initialDirectory, diff --git a/pubspec.yaml b/pubspec.yaml index fddb79ca1..7e377d9b2 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: "appflowy_editor" -version: 6.1.0 +version: 6.1.1 homepage: "https://github.com/AppFlowy-IO/appflowy-editor" @@ -13,13 +13,13 @@ description: A highly customizable rich-text editor for Flutter. The AppFlowy dependencies: collection: "^1.18.0" - device_info_plus: ^12.3.0 + device_info_plus: ^11.5.0 diff_match_patch: "^0.4.1" - file_picker: ^10.3.10 + file_picker: ^11.0.2 flutter: sdk: flutter flutter_svg: "^2.0.6" - html: ^0.15.5 + html: ^0.15.6 http: "^1.2.0" intl: "^0.20.2" keyboard_height_plugin: "^0.1.5"