|
|
@ -288,6 +288,7 @@ class RawEditorState extends EditorState |
|
|
|
startHandleLayerLink: _startHandleLayerLink, |
|
|
|
startHandleLayerLink: _startHandleLayerLink, |
|
|
|
endHandleLayerLink: _endHandleLayerLink, |
|
|
|
endHandleLayerLink: _endHandleLayerLink, |
|
|
|
onSelectionChanged: _handleSelectionChanged, |
|
|
|
onSelectionChanged: _handleSelectionChanged, |
|
|
|
|
|
|
|
onSelectionCompleted: _handleSelectionCompleted, |
|
|
|
scrollBottomInset: widget.scrollBottomInset, |
|
|
|
scrollBottomInset: widget.scrollBottomInset, |
|
|
|
padding: widget.padding, |
|
|
|
padding: widget.padding, |
|
|
|
maxContentWidth: widget.maxContentWidth, |
|
|
|
maxContentWidth: widget.maxContentWidth, |
|
|
@ -318,6 +319,7 @@ class RawEditorState extends EditorState |
|
|
|
startHandleLayerLink: _startHandleLayerLink, |
|
|
|
startHandleLayerLink: _startHandleLayerLink, |
|
|
|
endHandleLayerLink: _endHandleLayerLink, |
|
|
|
endHandleLayerLink: _endHandleLayerLink, |
|
|
|
onSelectionChanged: _handleSelectionChanged, |
|
|
|
onSelectionChanged: _handleSelectionChanged, |
|
|
|
|
|
|
|
onSelectionCompleted: _handleSelectionCompleted, |
|
|
|
scrollBottomInset: widget.scrollBottomInset, |
|
|
|
scrollBottomInset: widget.scrollBottomInset, |
|
|
|
padding: widget.padding, |
|
|
|
padding: widget.padding, |
|
|
|
maxContentWidth: widget.maxContentWidth, |
|
|
|
maxContentWidth: widget.maxContentWidth, |
|
|
@ -374,6 +376,10 @@ class RawEditorState extends EditorState |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void _handleSelectionCompleted() { |
|
|
|
|
|
|
|
widget.controller.onSelectionCompleted?.call(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/// Updates the checkbox positioned at [offset] in document |
|
|
|
/// Updates the checkbox positioned at [offset] in document |
|
|
|
/// by changing its attribute according to [value]. |
|
|
|
/// by changing its attribute according to [value]. |
|
|
|
void _handleCheckboxTap(int offset, bool value) { |
|
|
|
void _handleCheckboxTap(int offset, bool value) { |
|
|
@ -793,6 +799,9 @@ class RawEditorState extends EditorState |
|
|
|
} |
|
|
|
} |
|
|
|
textEditingValue = value; |
|
|
|
textEditingValue = value; |
|
|
|
userUpdateTextEditingValue(value, cause); |
|
|
|
userUpdateTextEditingValue(value, cause); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// keyboard and text input force a selection completion |
|
|
|
|
|
|
|
_handleSelectionCompleted(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@override |
|
|
|
@override |
|
|
@ -914,6 +923,7 @@ class _Editor extends MultiChildRenderObjectWidget { |
|
|
|
required this.startHandleLayerLink, |
|
|
|
required this.startHandleLayerLink, |
|
|
|
required this.endHandleLayerLink, |
|
|
|
required this.endHandleLayerLink, |
|
|
|
required this.onSelectionChanged, |
|
|
|
required this.onSelectionChanged, |
|
|
|
|
|
|
|
required this.onSelectionCompleted, |
|
|
|
required this.scrollBottomInset, |
|
|
|
required this.scrollBottomInset, |
|
|
|
required this.cursorController, |
|
|
|
required this.cursorController, |
|
|
|
required this.floatingCursorDisabled, |
|
|
|
required this.floatingCursorDisabled, |
|
|
@ -930,6 +940,7 @@ class _Editor extends MultiChildRenderObjectWidget { |
|
|
|
final LayerLink startHandleLayerLink; |
|
|
|
final LayerLink startHandleLayerLink; |
|
|
|
final LayerLink endHandleLayerLink; |
|
|
|
final LayerLink endHandleLayerLink; |
|
|
|
final TextSelectionChangedHandler onSelectionChanged; |
|
|
|
final TextSelectionChangedHandler onSelectionChanged; |
|
|
|
|
|
|
|
final TextSelectionCompletedHandler onSelectionCompleted; |
|
|
|
final double scrollBottomInset; |
|
|
|
final double scrollBottomInset; |
|
|
|
final EdgeInsetsGeometry padding; |
|
|
|
final EdgeInsetsGeometry padding; |
|
|
|
final double? maxContentWidth; |
|
|
|
final double? maxContentWidth; |
|
|
@ -947,6 +958,7 @@ class _Editor extends MultiChildRenderObjectWidget { |
|
|
|
startHandleLayerLink: startHandleLayerLink, |
|
|
|
startHandleLayerLink: startHandleLayerLink, |
|
|
|
endHandleLayerLink: endHandleLayerLink, |
|
|
|
endHandleLayerLink: endHandleLayerLink, |
|
|
|
onSelectionChanged: onSelectionChanged, |
|
|
|
onSelectionChanged: onSelectionChanged, |
|
|
|
|
|
|
|
onSelectionCompleted: onSelectionCompleted, |
|
|
|
cursorController: cursorController, |
|
|
|
cursorController: cursorController, |
|
|
|
padding: padding, |
|
|
|
padding: padding, |
|
|
|
maxContentWidth: maxContentWidth, |
|
|
|
maxContentWidth: maxContentWidth, |
|
|
|