Skip to content

Keyboard closes if something rebuilds underneath it #40582

@matejwamf

Description

@matejwamf

Steps to Reproduce

  1. ... Run the gist here https://gist.github.com/matejthetree/198c6c7463bd2a1a138b70f4b1175f48
    Don't forget to add the plugin to the yaml.
    keyboard_visibility: 0.5.6
  2. ... Press the textfield
  3. ... The keyboard will close automatically.

If you comment out line 63+

            _keyboardOn
                ? Container()
                : Text('keyboard is off'), //comment this line to make it work

Then, everything works.

How to go around this?

flutter doctor -v(base) stablos-MacBook-Pro:set_state_tf korijen$ flutter doctor -v
[✓] Flutter (Channel master, v1.10.3-pre.47, on Mac OS X 10.14.6 18G95, locale en-HR)
    • Flutter version 1.10.3-pre.47 at /Users/korijen/Work/SDKs/flutter
    • Framework revision 928245d07c (3 hours ago), 2019-09-16 06:14:41 -0400
    • Engine revision 224ab48f1b
    • Dart version 2.6.0 (build 2.6.0-dev.0.0 f8f0b845c2)

 
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.1)
    • Android SDK at /Users/korijen/Work/SDKs/android
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-29, build-tools 29.0.1
    • ANDROID_HOME = /Users/korijen/Work/SDKs/android
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 10.3)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 10.3, Build version 10G8
    • CocoaPods version 1.7.5

[✓] Android Studio (version 3.5)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 38.2.3
    • Dart plugin version 191.8423
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)

[✓] IntelliJ IDEA Ultimate Edition (version 2019.2.1)
    • IntelliJ at /Applications/IntelliJ IDEA.app
    • Flutter plugin version 38.2.4
    • Dart plugin version 192.6262.58

[✓] IntelliJ IDEA Community Edition (version 2019.1.3)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • Flutter plugin version 37.1.3
    • Dart plugin version 191.7830

[!] VS Code (version 1.37.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    ✗ Flutter extension not installed; install from
      https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter

[✓] Connected device (1 available)
    • Android SDK built for x86 • emulator-5554 • android-x86 • Android 10 (API 29) (emulator)

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work lista: text inputEntering text in a text field or keyboard related problemsf: material designflutter/packages/flutter/material repository.found in release: 3.3Found to occur in 3.3found in release: 3.6Found to occur in 3.6frameworkflutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onteam-frameworkOwned by Framework teamtriaged-frameworkTriaged by Framework team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions