Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit f72695a

Browse files
committed
[iOS] Fix keyboard inset is not correct when presenting and native ViewController on FlutterViewController
1 parent e5aaa25 commit f72695a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

shell/platform/darwin/ios/framework/Source/FlutterViewController.mm

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1200,9 +1200,10 @@ - (void)startKeyBoardAnimation:(NSTimeInterval)duration {
12001200
}
12011201
completion:^(BOOL finished) {
12021202
if (self.displayLink == currentDisplayLink) {
1203+
// Indicates the displaylink captured by this block is the original one,which also
1204+
// indicates the animation has not been interrupted from its beginning. Moreover,indicates
1205+
// the animation is over and there is no more animation about to exectute.
12031206
[self invalidateDisplayLink];
1204-
}
1205-
if (finished) {
12061207
[self removeKeyboardAnimationView];
12071208
[self ensureViewportMetricsIsCorrect];
12081209
}

0 commit comments

Comments
 (0)