Skip to content

When the on-screen keyboard is open, NavigationBar does not maintainBottomViewPadding in Edge-to-Edge mode #159526

@VinhNgT

Description

@VinhNgT

Steps to reproduce

  1. Create this NavigationBar example:

Alternatively you can clone https://github.com/VinhNgT/navbar-edge2edge-bug and skip step 1 and 2.

flutter create --sample=material.NavigationBar.3 mysample
  1. Enable Edge-To-Edge mode by adding these to void main():
WidgetsFlutterBinding.ensureInitialized();
SystemChrome.setSystemUIOverlayStyle(
    const SystemUiOverlayStyle(systemNavigationBarColor: Colors.transparent));
await SystemChrome.setEnabledSystemUIMode(SystemUiMode.edgeToEdge);
  1. Press "Push/list" -> "Push/text", then tap on the text field to open the on-screen keyboard.
  2. Notice every time you close/open the keyboard, the NavigationBar moves up and down.

Expected results

The NavigationBar should lock in place when the keyboard is open. Similar to SafeArea.maintainBottomViewPadding

Actual results

The NavigationBar follows padding instead of viewPadding, which causes it to move when the keyboard closes/opens.

Code sample

Code sample

https://github.com/VinhNgT/navbar-edge2edge-bug

Screenshots or Video

Screenshots / Video demonstration
screen-20241127-104148.mp4

Logs

No log

Flutter Doctor output

Doctor output
[√] Flutter (Channel stable, 3.24.5, on Microsoft Windows [Version 10.0.22631.4460], locale en-US)
    • Flutter version 3.24.5 on channel stable at F:\tools\fvm\versions\3.24.5
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision dec2ee5c1f (13 days ago), 2024-11-13 11:13:06 -0800
    • Engine revision a18df97ca5
    • Dart version 3.5.4
    • DevTools version 2.37.3

[√] Windows Version (Installed version of Windows is version 10 or higher)

[√] Android toolchain - develop for Android devices (Android SDK version 35.0.0)
    • Android SDK at C:\Users\victo\AppData\Local\Android\sdk
    • Platform android-35, build-tools 35.0.0
    • Java binary at: C:\Program Files\Android\Android Studio\jbr\bin\java
    • Java version OpenJDK Runtime Environment (build 21.0.3+-12282718-b509.11)
    • All Android licenses accepted.

[X] Chrome - develop for the web (Cannot find Chrome executable at .\Google\Chrome\Application\chrome.exe)
    ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.

[√] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.11.5)
    • Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community
    • Visual Studio Community 2022 version 17.11.35327.3
    • Windows 10 SDK version 10.0.22621.0

[√] Android Studio (version 2024.2)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin can be installed from:
       https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
       https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 21.0.3+-12282718-b509.11)

[√] VS Code (version 1.95.3)
    • VS Code at C:\Users\victo\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.100.0

[√] Connected device (4 available)
    • Redmi Note 8 (mobile) • 192.168.99.126:42415                      • android-arm64  • Android 14 (API 34)
    • Redmi Note 8 (mobile) • adb-139ed888-lNT5l9._adb-tls-connect._tcp • android-arm64  • Android 14 (API 34)
    • Windows (desktop)     • windows                                   • windows-x64    • Microsoft Windows [Version 10.0.22631.4460]
    • Edge (web)            • edge                                      • web-javascript • Microsoft Edge 130.0.2849.80

[√] Network resources
    • All expected network resources are available.

! Doctor found issues in 1 category.

Metadata

Metadata

Assignees

Labels

P2Important issues not at the top of the work lista: layoutSystemChrome and Framework's Layout Issuesa: text inputEntering text in a text field or keyboard related problemsf: material designflutter/packages/flutter/material repository.found in release: 3.24Found to occur in 3.24found in release: 3.27Found to occur in 3.27frameworkflutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onr: fixedIssue is closed as already fixed in a newer versionteam-designOwned by Design Languages teamtriaged-designTriaged by Design Languages teamworkaround availableThere is a workaround available to overcome the issue

Type

No type

Projects

Status

Done (PR merged)

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions