Repository navigation
Closed as duplicate
Closed as duplicate
Copy link
Labels
P1High-priority issues at the top of the work listHigh-priority issues at the top of the work lista: text inputEntering text in a text field or keyboard related problemsEntering text in a text field or keyboard related problemshas reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onplatform-androidAndroid applications specificallyAndroid applications specificallyteam-androidOwned by Android platform teamOwned by Android platform teamtriaged-androidTriaged by Android platform teamTriaged by Android platform team
Description
Steps to reproduce
- Run the sample below on Android 14 (API 34).
- Tap
edgeToEdge, then tap the text field to open the keyboard. - Watch the logged
viewInsets.bottom.
Expected results
The last value reported during the animation equals the settled value.
Actual results
The animation converges, and then viewInsets.bottom jumps in a single frame. Pixel 6
emulator, API 34, gesture navigation (viewPadding.bottom = 24.0):
insets=310.1 delta=2.3
insets=311.6 delta=1.5
insets=312.0 delta=0.4 <- converged
insets=336.4 delta=24.4 <- settled value, one frame later
The jump (24.4) matches viewPadding.bottom (24.0) modulo dp rounding. Anything laid out
from viewInsets.bottom stays 24dp low for the whole opening animation and then snaps.
What I measured
Same app and device, varying only the system UI mode and the OS version:
| animation converges to | settled value | jump | |
|---|---|---|---|
API 34, edgeToEdge |
312.0 | 336.4 | +24.4 |
API 34, manual + overlays: [SystemUiOverlay.bottom] |
312.4 | 312.4 | none |
| API 35 emulator, both modes | — | — | none |
| Android 17 (Pixel 8 Pro), both modes | — | — | none |
In manual mode on API 34, viewPadding.bottom is 0.0; in edgeToEdge it is 24.0.
Closing shows the mirror image: the first reported value after the settled one is
336.4 → 312.4 (−24.0), then the ramp down.
Code sample
main.dart
import 'package:flutter/material.dart';
import 'package:flutter/scheduler.dart';
import 'package:flutter/services.dart';
void main() {
WidgetsFlutterBinding.ensureInitialized();
double? last;
SchedulerBinding.instance.addPersistentFrameCallback((_) {
final view = WidgetsBinding.instance.platformDispatcher.views.first;
final i = view.viewInsets.bottom / view.devicePixelRatio;
if (last == null || (i - last!).abs() > 0.01) {
// ignore: avoid_print
print('insets=${i.toStringAsFixed(1)} '
'delta=${last == null ? 0 : (i - last!).toStringAsFixed(1)}');
last = i;
}
});
runApp(const MaterialApp(home: Home(), debugShowCheckedModeBanner: false));
}
class Home extends StatelessWidget {
const Home({super.key});
@override
Widget build(BuildContext context) {
// The UI layer is lifted by viewInsets, so a mismatch between the animated
// and the settled value is visible as a jump.
return Scaffold(
resizeToAvoidBottomInset: false,
body: Padding(
padding: EdgeInsets.only(bottom: MediaQuery.viewInsetsOf(context).bottom),
child: Column(
children: [
const SizedBox(height: 60),
ElevatedButton(
onPressed: () =>
SystemChrome.setEnabledSystemUIMode(SystemUiMode.edgeToEdge),
child: const Text('edgeToEdge'),
),
ElevatedButton(
onPressed: () => SystemChrome.setEnabledSystemUIMode(
SystemUiMode.manual, overlays: const [SystemUiOverlay.bottom]),
child: const Text('manual(bottom only)'),
),
const Spacer(),
Container(height: 8, color: Colors.red),
const TextField(decoration: InputDecoration(hintText: 'tap me')),
],
),
),
);
}
}Version
Flutter 3.44.5 - channel stable
Framework - revision f94f4fc76b (2026-07-06)
Engine - hash d3a3293399556a85388faf8c6f0723a7a5597aa8 (revision 83675ed276)
Tools - Dart 3.12.2
Related
#168768, #89914 — same user-visible symptom, both closed as fixed.
Metadata
Metadata
Assignees
Labels
P1High-priority issues at the top of the work listHigh-priority issues at the top of the work lista: text inputEntering text in a text field or keyboard related problemsEntering text in a text field or keyboard related problemshas reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onplatform-androidAndroid applications specificallyAndroid applications specificallyteam-androidOwned by Android platform teamOwned by Android platform teamtriaged-androidTriaged by Android platform teamTriaged by Android platform team
Activity
[-][Android] IME animation insets are short by the navigation bar height for `SystemUiMode.edgeToEdge` apps on API < 35[/-][+][Android] viewInsets.bottom jumps by the navigation bar height at the end of the IME open animation (edgeToEdge, API < 35)[/+]suryaKommana2662 commentedon Aug 12, 2026
@gfx Thanks for report the issue. I was able to reproduce the issue locally on an Android API 34 emulator using the provided sample. I observed the following in the terminal:
The viewInsets.bottom value converges to 312.0, and then jumps to 336.4 in the following frame, a difference of 24.4dp. This matches the behavior described in the issue, where the jump is approximately equal to the navigation bar height. Routing ot the t
eam-androidfor further investigation.camsim99 commentedon Aug 18, 2026
Closing this as a duplicate of #191094!
MediaQuery.viewInsetsworks unexpectedly inedgeToEdgemode compared to Flutter 3.41 #190594 as a duplicate of this issuegithub-actions commentedon Sep 1, 2026
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.Fix ime insets animation jump (flutter#191453)