Skip to content

Commit

Permalink
Remove PostFrameCallback
Browse files Browse the repository at this point in the history
  • Loading branch information
amantoux committed Apr 12, 2024
1 parent fa334c7 commit ee19d88
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/fleather/lib/src/widgets/text_selection.dart
Original file line number Diff line number Diff line change
Expand Up @@ -238,8 +238,7 @@ class EditorTextSelectionOverlay {
return;
}
_value = newValue;
SchedulerBinding.instance
.addPostFrameCallback((_) => _updateSelectionOverlay());
_updateSelectionOverlay();
// _updateSelectionOverlay may not rebuild the selection overlay if the
// text metrics and selection doesn't change even if the text has changed.
// This rebuild is needed for the toolbar to update based on the latest text
Expand Down

0 comments on commit ee19d88

Please sign in to comment.