Skip to content

SafeArea with keyboard #25758

@1AlexFix1

Description

@1AlexFix1

Hello! (For iPhone x, xr and the like)
The bottom: true / false parameter for the safe area does not respond to changes when the keyboard is on, the bottom parameter is always false. In this connection, if the scaffold parameter has resizeToAvoidBottomPadding: false, and the keyboard appears, the entire widgets is shifted to down MediaQuery.of (context) .padding.bottom

return Scaffold(
      resizeToAvoidBottomPadding: false,
      body: SafeArea(
          child: Center(
        child: Container(
          width: 200,
          child: TextFormField(
            decoration: InputDecoration(
              hintText: 'text',
            ),
          ),
        ),
      )),
    );
[✓] Flutter (Channel dev, v1.1.4, on Mac OS X 10.14.2 18C54, locale ru-RU)
    • Flutter version 1.1.4 at /Users/alexfix/Flutter/flutter
    • Framework revision 7a88fbc5fd (5 days ago), 2018-12-20 11:38:07 -0800
    • Engine revision dbdb5e6f8c
    • Dart version 2.2.0 (build 2.2.0-dev.1.1 f9ebf21297)

[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
    • Android SDK at /Users/alexfix/Library/Android/sdk
    • Android NDK at /Users/alexfix/Library/Android/sdk/ndk-bundle
    • Platform android-28, build-tools 28.0.3
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06)
    • All Android licenses accepted.

[✓] iOS toolchain - develop for iOS devices (Xcode 10.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 10.1, Build version 10B61
    • ios-deploy 2.0.0
    • CocoaPods version 1.5.3

[✓] Android Studio (version 3.2)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 31.3.1
    • Dart plugin version 181.5656
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06)

[✓] Connected device (1 available)
    • iPhone XR • 0AB397AD-D503-4882-8849-B6F3229D2B23 • ios • iOS 12.1 (simulator)

• No issues found!

Metadata

Metadata

Assignees

No one assigned

    Labels

    f: material designflutter/packages/flutter/material repository.frameworkflutter/packages/flutter repository. See also f: labels.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions