Skip to content

Commit

Permalink
Merge pull request glynskyi#64 from ujwalbasnet1/feature/updates-for-…
Browse files Browse the repository at this point in the history
…flutter3-10

Feature/updates for flutter3.10
  • Loading branch information
featzima authored Sep 6, 2023
2 parents 582392e + 04e90a9 commit 6b3a21a
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 6 deletions.
4 changes: 4 additions & 0 deletions example/linux/flutter/generated_plugin_registrant.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,13 @@

#include "generated_plugin_registrant.h"

#include <file_selector_linux/file_selector_plugin.h>
#include <url_launcher_linux/url_launcher_plugin.h>

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);
Expand Down
1 change: 1 addition & 0 deletions example/linux/flutter/generated_plugins.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#

list(APPEND FLUTTER_PLUGIN_LIST
file_selector_linux
url_launcher_linux
)

Expand Down
4 changes: 3 additions & 1 deletion example/macos/Flutter/GeneratedPluginRegistrant.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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"))
}
8 changes: 8 additions & 0 deletions lib/src/widgets/editor.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
9 changes: 7 additions & 2 deletions lib/src/widgets/text_selection.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -1247,7 +1250,8 @@ class _EditorTextSelectionGestureDetectorState
gestures[LongPressGestureRecognizer] =
GestureRecognizerFactoryWithHandlers<LongPressGestureRecognizer>(
() => LongPressGestureRecognizer(
debugOwner: this, kind: PointerDeviceKind.touch),
debugOwner: this,
supportedDevices: Set.of({PointerDeviceKind.touch})),
(LongPressGestureRecognizer instance) {
instance
..onLongPressStart = _handleLongPressStart
Expand All @@ -1265,7 +1269,8 @@ class _EditorTextSelectionGestureDetectorState
gestures[HorizontalDragGestureRecognizer] =
GestureRecognizerFactoryWithHandlers<HorizontalDragGestureRecognizer>(
() => 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
Expand Down
6 changes: 3 additions & 3 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -18,4 +18,4 @@ dependencies:
dev_dependencies:
flutter_test:
sdk: flutter
pedantic: ^1.11.0
pedantic: ^1.11.0

0 comments on commit 6b3a21a

Please sign in to comment.