mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Add a note in ImeSyncDeferringInsetsCallback explaining the reason behind capturing the latest final inset state (flutter/engine#43109)
Solely documentation change to explain the reasoning behind the change in https://github.com/flutter/engine/pull/42700. [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
This commit is contained in:
parent
848795bbc4
commit
805cd4816d
@ -68,6 +68,12 @@ class ImeSyncDeferringInsetsCallback {
|
||||
// When an animation begins, android sends a WindowInset with the final
|
||||
// state of the animation. When needsSave is true, we know to capture this
|
||||
// initial WindowInset.
|
||||
//
|
||||
// Certain actions, like dismissing the keyboard, can trigger multiple
|
||||
// animations that are slightly offset in start time. To capture the
|
||||
// correct final insets in these situations we update needsSave to true
|
||||
// in each onPrepare callback, so that we save the latest final state
|
||||
// to apply in onEnd.
|
||||
private boolean needsSave = false;
|
||||
|
||||
ImeSyncDeferringInsetsCallback(@NonNull View view) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user