diff --git a/flutter_quill_extensions/lib/logic/utils/quill_image_utils.dart b/flutter_quill_extensions/lib/logic/utils/quill_image_utils.dart index 3aec962c..eac03a8f 100644 --- a/flutter_quill_extensions/lib/logic/utils/quill_image_utils.dart +++ b/flutter_quill_extensions/lib/logic/utils/quill_image_utils.dart @@ -126,7 +126,7 @@ class QuillImageUtilities { /// print('Error deleting local images: $e'); /// } /// ``` - Future deleteAllLocalImagesOfDocument() async { + Future deleteAllLocalImages() async { _webIsNotSupported('deleteAllLocalImagesOfDocument'); final imagesPaths = getImagesPathsFromDocument( onlyLocalImages: true, @@ -213,7 +213,6 @@ class QuillImageUtilities { /// Returns `true` if the image is cached, `false` otherwise. /// On other platforms it will always return false static bool isImageCached(String imagePath) { - _webIsNotSupported('isImageCached'); // Determine if the image path is a cached path based on platform if (kIsWeb) { // For now this will not work for web diff --git a/flutter_quill_extensions/lib/presentation/embeds/editor/image/image.dart b/flutter_quill_extensions/lib/presentation/embeds/editor/image/image.dart index d54b9d42..0f40233a 100644 --- a/flutter_quill_extensions/lib/presentation/embeds/editor/image/image.dart +++ b/flutter_quill_extensions/lib/presentation/embeds/editor/image/image.dart @@ -218,7 +218,7 @@ class QuillEditorImageEmbedBuilder extends EmbedBuilder { } if (!readOnly || isImageBase64(imageUrl)) { - // To enforce using it on the web, desktop and other platforms + // To enforce using it on the desktop and other platforms // and that is up to the developer if (!base.isMobile() && configurations.forceUseMobileOptionMenuForImageClick) { diff --git a/lib/src/models/config/editor/configurations.dart b/lib/src/models/config/editor/configurations.dart index c54edc56..117e8dc2 100644 --- a/lib/src/models/config/editor/configurations.dart +++ b/lib/src/models/config/editor/configurations.dart @@ -4,6 +4,7 @@ import 'package:flutter/foundation.dart' show Brightness, Uint8List, immutable; import 'package:flutter/material.dart' show TextCapitalization, TextSelectionThemeData; import 'package:flutter/widgets.dart'; +import 'package:meta/meta.dart' show experimental; import '../../../widgets/default_styles.dart'; import '../../../widgets/delegate.dart'; @@ -69,6 +70,7 @@ class QuillEditorConfigurations extends Equatable { this.requestKeyboardFocusOnCheckListChanged = false, this.elementOptions = const QuillEditorElementOptions(), this.builder, + this.magnifierConfiguration, }); /// The text placeholder in the quill editor @@ -310,6 +312,10 @@ class QuillEditorConfigurations extends Equatable { final QuillEditorBuilder? builder; + /// Currently this feature is experimental + @experimental + final TextMagnifierConfiguration? magnifierConfiguration; + @override List get props => [ placeholder, @@ -362,6 +368,7 @@ class QuillEditorConfigurations extends Equatable { bool? requestKeyboardFocusOnCheckListChanged, QuillEditorElementOptions? elementOptions, QuillEditorBuilder? builder, + TextMagnifierConfiguration? magnifierConfiguration, }) { return QuillEditorConfigurations( placeholder: placeholder ?? this.placeholder, @@ -416,6 +423,8 @@ class QuillEditorConfigurations extends Equatable { this.requestKeyboardFocusOnCheckListChanged, elementOptions: elementOptions ?? this.elementOptions, builder: builder ?? this.builder, + magnifierConfiguration: + magnifierConfiguration ?? this.magnifierConfiguration, ); } } diff --git a/lib/src/widgets/raw_editor/raw_editor_widget.dart b/lib/src/widgets/raw_editor/raw_editor_render_object.dart similarity index 94% rename from lib/src/widgets/raw_editor/raw_editor_widget.dart rename to lib/src/widgets/raw_editor/raw_editor_render_object.dart index a84dfa9e..3338c1f2 100644 --- a/lib/src/widgets/raw_editor/raw_editor_widget.dart +++ b/lib/src/widgets/raw_editor/raw_editor_render_object.dart @@ -5,9 +5,8 @@ import '../../models/documents/document.dart'; import '../cursor.dart'; import '../editor/editor.dart'; -class QuilRawEditorMultiChildRenderObjectWidget - extends MultiChildRenderObjectWidget { - const QuilRawEditorMultiChildRenderObjectWidget({ +class QuilRawEditorMultiChildRenderObject extends MultiChildRenderObjectWidget { + const QuilRawEditorMultiChildRenderObject({ required super.children, required this.document, required this.textDirection, diff --git a/lib/src/widgets/raw_editor/raw_editor_state.dart b/lib/src/widgets/raw_editor/raw_editor_state.dart index 12ff1135..9c903ee2 100644 --- a/lib/src/widgets/raw_editor/raw_editor_state.dart +++ b/lib/src/widgets/raw_editor/raw_editor_state.dart @@ -47,10 +47,10 @@ import '../text_line.dart'; import '../text_selection.dart'; import 'raw_editor.dart'; import 'raw_editor_actions.dart'; +import 'raw_editor_render_object.dart'; import 'raw_editor_state_selection_delegate_mixin.dart'; import 'raw_editor_state_text_input_client_mixin.dart'; import 'raw_editor_text_boundaries.dart'; -import 'raw_editor_widget.dart'; class QuillRawEditorState extends EditorState with @@ -245,7 +245,7 @@ class QuillRawEditorState extends EditorState child: Semantics( child: MouseRegion( cursor: SystemMouseCursors.text, - child: QuilRawEditorMultiChildRenderObjectWidget( + child: QuilRawEditorMultiChildRenderObject( key: _editorKey, document: doc, selection: controller.selection, @@ -286,7 +286,7 @@ class QuillRawEditorState extends EditorState link: _toolbarLayerLink, child: MouseRegion( cursor: SystemMouseCursors.text, - child: QuilRawEditorMultiChildRenderObjectWidget( + child: QuilRawEditorMultiChildRenderObject( key: _editorKey, offset: offset, document: doc,