diff --git a/example/linux/flutter/generated_plugin_registrant.cc b/example/linux/flutter/generated_plugin_registrant.cc index f6f23bf..7299b5c 100644 --- a/example/linux/flutter/generated_plugin_registrant.cc +++ b/example/linux/flutter/generated_plugin_registrant.cc @@ -6,9 +6,13 @@ #include "generated_plugin_registrant.h" +#include #include void fl_register_plugins(FlPluginRegistry* registry) { + g_autoptr(FlPluginRegistrar) file_selector_linux_registrar = + fl_plugin_registry_get_registrar_for_plugin(registry, "FileSelectorPlugin"); + file_selector_plugin_register_with_registrar(file_selector_linux_registrar); g_autoptr(FlPluginRegistrar) url_launcher_linux_registrar = fl_plugin_registry_get_registrar_for_plugin(registry, "UrlLauncherPlugin"); url_launcher_plugin_register_with_registrar(url_launcher_linux_registrar); diff --git a/example/linux/flutter/generated_plugins.cmake b/example/linux/flutter/generated_plugins.cmake index f16b4c3..786ff5c 100644 --- a/example/linux/flutter/generated_plugins.cmake +++ b/example/linux/flutter/generated_plugins.cmake @@ -3,6 +3,7 @@ # list(APPEND FLUTTER_PLUGIN_LIST + file_selector_linux url_launcher_linux ) diff --git a/example/macos/Flutter/GeneratedPluginRegistrant.swift b/example/macos/Flutter/GeneratedPluginRegistrant.swift index 4618f38..05b351d 100644 --- a/example/macos/Flutter/GeneratedPluginRegistrant.swift +++ b/example/macos/Flutter/GeneratedPluginRegistrant.swift @@ -5,10 +5,12 @@ import FlutterMacOS import Foundation -import path_provider_macos +import file_selector_macos +import path_provider_foundation import url_launcher_macos func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { + FileSelectorPlugin.register(with: registry.registrar(forPlugin: "FileSelectorPlugin")) PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin")) UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin")) } diff --git a/lib/src/widgets/editor.dart b/lib/src/widgets/editor.dart index 1e317bd..147f3da 100644 --- a/lib/src/widgets/editor.dart +++ b/lib/src/widgets/editor.dart @@ -1335,6 +1335,14 @@ class RawEditorState extends EditorState void performSelector(String selectorName) { // TODO: implement performSelector } + + @override + void insertContent(KeyboardInsertedContent content) { + // TODO: implement insertContent + } + + @override + bool get liveTextInputEnabled => false; } class _Editor extends MultiChildRenderObjectWidget { diff --git a/lib/src/widgets/text_selection.dart b/lib/src/widgets/text_selection.dart index c020667..ebaa149 100644 --- a/lib/src/widgets/text_selection.dart +++ b/lib/src/widgets/text_selection.dart @@ -18,6 +18,9 @@ import 'package:flutter/services.dart'; import '../rendering/editor.dart'; import 'editor.dart'; +typedef DragSelectionUpdateCallback = void Function( + DragStartDetails startDetails, DragUpdateDetails updateDetails); + /// A duration that controls how often the drag selection update callback is /// called. const Duration _kDragSelectionUpdateThrottle = Duration(milliseconds: 50); @@ -1247,7 +1250,8 @@ class _EditorTextSelectionGestureDetectorState gestures[LongPressGestureRecognizer] = GestureRecognizerFactoryWithHandlers( () => LongPressGestureRecognizer( - debugOwner: this, kind: PointerDeviceKind.touch), + debugOwner: this, + supportedDevices: Set.of({PointerDeviceKind.touch})), (LongPressGestureRecognizer instance) { instance ..onLongPressStart = _handleLongPressStart @@ -1265,7 +1269,8 @@ class _EditorTextSelectionGestureDetectorState gestures[HorizontalDragGestureRecognizer] = GestureRecognizerFactoryWithHandlers( () => HorizontalDragGestureRecognizer( - debugOwner: this, kind: PointerDeviceKind.mouse), + debugOwner: this, + supportedDevices: Set.of({PointerDeviceKind.mouse})), (HorizontalDragGestureRecognizer instance) { instance // Text selection should start from the position of the first pointer diff --git a/pubspec.yaml b/pubspec.yaml index 9eb75f5..7d38e5b 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,10 +1,10 @@ name: zefyrka description: Clean, minimalistic and collaboration-ready rich text editor for Flutter based on Zefyr package. -version: 1.4.0 +version: 1.5.0 homepage: https://github.com/glynskyi/zefyrka environment: - sdk: '>=2.17.0 <3.0.0' + sdk: ">=2.18.0 <4.0.0" dependencies: flutter: @@ -18,4 +18,4 @@ dependencies: dev_dependencies: flutter_test: sdk: flutter - pedantic: ^1.11.0 \ No newline at end of file + pedantic: ^1.11.0