• Renzo Olivares's avatar
    Add `undoStackModifier` to `UndoHistory` (#138674) · 75011b25
    Renzo Olivares authored
    This change adds a feature to `UndoHistory` that allows the user to modify the value being pushed onto the undo stack.
    
    This is used by the framework to ignore the composing region when pushing history entries to the Undo stack on Android. This is so an undo does not trigger an input connection restart by the Android TextInputPlugin, which occurs when the framework changes the composing region. This is also the native platform behavior observed in Google Keep app on Android, where doing an undo during composing reverts to the previous state but with composing inactive and a subsequent redo does not bring back the composing region.
    
    Fixes #130881
    Partial fix for #134398
    75011b25
undo_history.dart 13.9 KB