Refactor code

pull/135/head
Xin Yao 4 years ago
parent 8ab586c318
commit 084adcb1e7
  1. 3
      lib/widgets/raw_editor.dart

@ -919,12 +919,13 @@ class RawEditorState extends EditorState
SchedulerBinding.instance!.addPostFrameCallback( SchedulerBinding.instance!.addPostFrameCallback(
(Duration _) => _updateOrDisposeSelectionOverlayIfNeeded()); (Duration _) => _updateOrDisposeSelectionOverlayIfNeeded());
if (!mounted) return; if (mounted) {
setState(() { setState(() {
// Use widget.controller.value in build() // Use widget.controller.value in build()
// Trigger build and updateChildren // Trigger build and updateChildren
}); });
} }
}
void _updateOrDisposeSelectionOverlayIfNeeded() { void _updateOrDisposeSelectionOverlayIfNeeded() {
if (_selectionOverlay != null) { if (_selectionOverlay != null) {

Loading…
Cancel
Save