diff --git a/lib/src/editor/raw_editor/quill_single_child_scroll_view.dart b/lib/src/editor/raw_editor/quill_single_child_scroll_view.dart index 4a60a3866..69877c392 100644 --- a/lib/src/editor/raw_editor/quill_single_child_scroll_view.dart +++ b/lib/src/editor/raw_editor/quill_single_child_scroll_view.dart @@ -7,8 +7,10 @@ import 'package:flutter/widgets.dart'; /// Very similar to [SingleChildView] but with a [ViewportBuilder] argument /// instead of a [Widget] /// -/// Useful when child needs [ViewportOffset] (e.g. [RenderEditor]) +/// Useful when child needs [ViewportOffset] ([RenderEditor] no longer uses this class!) /// see: [SingleChildScrollView] +@Deprecated( + 'This class is no longer being used and will be removed in future versions. If you disagree, please open an issue.') class QuillSingleChildScrollView extends StatelessWidget { /// Creates a box in which a single widget can be scrolled. const QuillSingleChildScrollView({ diff --git a/lib/src/editor/raw_editor/raw_editor_state.dart b/lib/src/editor/raw_editor/raw_editor_state.dart index dde3ba994..eff7194a9 100644 --- a/lib/src/editor/raw_editor/raw_editor_state.dart +++ b/lib/src/editor/raw_editor/raw_editor_state.dart @@ -43,7 +43,6 @@ import '../widgets/proxy.dart'; import '../widgets/text/text_block.dart'; import '../widgets/text/text_line.dart'; import '../widgets/text/text_selection.dart'; -import 'quill_single_child_scroll_view.dart'; import 'raw_editor.dart'; import 'raw_editor_actions.dart'; import 'raw_editor_render_object.dart'; @@ -439,35 +438,31 @@ class QuillRawEditorState extends EditorState textStyle: _styles!.paragraph!.style, padding: baselinePadding, child: _scribbleFocusable( - QuillSingleChildScrollView( + SingleChildScrollView( controller: _scrollController, physics: widget.configurations.scrollPhysics, - viewportBuilder: (_, offset) => CompositedTransformTarget( - link: _toolbarLayerLink, - child: MouseRegion( - cursor: widget.configurations.readOnly - ? widget.configurations.readOnlyMouseCursor - : SystemMouseCursors.text, - child: QuillRawEditorMultiChildRenderObject( - key: _editorKey, - offset: offset, - document: doc, - selection: controller.selection, - hasFocus: _hasFocus, - scrollable: widget.configurations.scrollable, - textDirection: _textDirection, - startHandleLayerLink: _startHandleLayerLink, - endHandleLayerLink: _endHandleLayerLink, - onSelectionChanged: _handleSelectionChanged, - onSelectionCompleted: _handleSelectionCompleted, - scrollBottomInset: widget.configurations.scrollBottomInset, - padding: widget.configurations.padding, - maxContentWidth: widget.configurations.maxContentWidth, - cursorController: _cursorCont, - floatingCursorDisabled: - widget.configurations.floatingCursorDisabled, - children: _buildChildren(doc, context), - ), + child: MouseRegion( + cursor: widget.configurations.readOnly + ? widget.configurations.readOnlyMouseCursor + : SystemMouseCursors.text, + child: QuillRawEditorMultiChildRenderObject( + key: _editorKey, + document: doc, + selection: controller.selection, + hasFocus: _hasFocus, + scrollable: widget.configurations.scrollable, + textDirection: _textDirection, + startHandleLayerLink: _startHandleLayerLink, + endHandleLayerLink: _endHandleLayerLink, + onSelectionChanged: _handleSelectionChanged, + onSelectionCompleted: _handleSelectionCompleted, + scrollBottomInset: widget.configurations.scrollBottomInset, + padding: widget.configurations.padding, + maxContentWidth: widget.configurations.maxContentWidth, + cursorController: _cursorCont, + floatingCursorDisabled: + widget.configurations.floatingCursorDisabled, + children: _buildChildren(doc, context), ), ), ),