|
|
|
@ -407,6 +407,8 @@ class RawEditorState extends EditorState |
|
|
|
|
_disableScrollControllerAnimateOnce = true; |
|
|
|
|
final attribute = value ? Attribute.checked : Attribute.unchecked; |
|
|
|
|
|
|
|
|
|
widget.controller.formatText(offset, 0, attribute); |
|
|
|
|
|
|
|
|
|
// Checkbox tapping causes controller.selection to go to offset 0 |
|
|
|
|
// Stop toggling those two toolbar buttons |
|
|
|
|
widget.controller.toolbarButtonToggler = { |
|
|
|
@ -414,8 +416,6 @@ class RawEditorState extends EditorState |
|
|
|
|
Attribute.header.key: Attribute.header |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
widget.controller.formatText(offset, 0, attribute); |
|
|
|
|
|
|
|
|
|
// Go back from offset 0 to current selection |
|
|
|
|
SchedulerBinding.instance!.addPostFrameCallback((_) { |
|
|
|
|
widget.controller.updateSelection( |
|
|
|
|