Flutter webview black screen when keyboard is popping up

1,575

Insert this in scaffold:

resizeToAvoidBottomInset: false
Share:
1,575
Prabhudas kuppala
Author by

Prabhudas kuppala

Updated on December 18, 2022

Comments

  • Prabhudas kuppala
    Prabhudas kuppala over 1 year

    I have included flutter module inside my android project and flutter module contains webview (flutter_inappwebview) which I am using to load app url's.

    I am opening a webview page which has text fields to enter the data. when I click on text field to enter the data the keyboard is poping up and the screen becomes completely black.

    Logs are filling with below error

    E/InputMethodManager: b/117267690: Failed to get fallback IMM with expected displayId=134 actual IMM#displayId=0 view=com.pichillilorenzo.flutter_inappwebview.InAppWebView.InAppWebView{1df7162 VFEDHVCL. .F...... 0,0-1440,2308}
    

    flutter logs

    [✓] Flutter (Channel stable, 1.20.4, on Mac OS X 10.15.6 19G2021, locale en-IN)
        • Flutter version 1.20.4 at /Users/prabhukuppala/Documents/FlutterDevelopment/flutter
        • Framework revision fba99f6cf9 (2 weeks ago), 2020-09-14 15:32:52 -0700
        • Engine revision d1bc06f032
        • Dart version 2.9.2
    
     
    [✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
        • Android SDK at /Users/prabhukuppala/Library/Android/sdk
        • Platform android-30, build-tools 29.0.3
        • ANDROID_HOME = /Users/prabhukuppala/Library/Android/sdk/platform-tools:/Users/prabhukuppala/Library/Android/sdk
        • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
        • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
        • All Android licenses accepted.
    
    [✓] Xcode - develop for iOS and macOS (Xcode 11.5)
        • Xcode at /Applications/Xcode.app/Contents/Developer
        • Xcode 11.5, Build version 11E608c
        • CocoaPods version 1.9.1
    
    [✓] Android Studio (version 4.0)
        • Android Studio at /Applications/Android Studio.app/Contents
        • Flutter plugin version 50.0.1
        • Dart plugin version 193.7547
        • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
    
    [✓] IntelliJ IDEA Community Edition (version 2020.1.2)
        • IntelliJ at /Applications/IntelliJ IDEA CE.app
        • Flutter plugin version 46.0.3
        • Dart plugin version 201.7846.93
    
    [✓] VS Code (version 1.47.1)
        • VS Code at /Applications/Visual Studio Code.app/Contents
        • Flutter extension version 3.12.2
    
    [✓] Connected device (2 available)
        • Android SDK built for x86 64 (mobile) • emulator-5554 • android-x64 • Android 8.0.0 (API 26) (emulator)
        • Android SDK built for x86 64 (mobile) • emulator-5556 • android-x64 • Android 10 (API 29) (emulator)
    
    • No issues found!
    

    enter image description here

  • West
    West over 3 years
    Perfectt., been struggling for a few days with this while creating a barcode scanner app, and its just a single line of code lol. Thanks mate!!
  • West
    West over 3 years
    I understand setting to false will prevent the scaffold body from resizing to accommodate the keyboard, which might not be desirable sometimes. Is there a way to allow this resizing while keeping the camera on? Or there's no way around it..