Skip to content

enableFlutterDriverExtension(); stops android keyboard from showing up. #15415

@yfer

Description

@yfer

Steps to Reproduce

  1. Open flutter_gallery project
  2. Put enableFlutterDriverExtension(); in lib/main.dart
  3. Run app, try to use android keyboard in any input field, it is not showing.
import 'package:flutter/widgets.dart';
import 'package:flutter_driver/driver_extension.dart';
import 'gallery/app.dart';

void main() {
  enableFlutterDriverExtension();
  runApp(const GalleryApp());
}

Problem research

It seems like intended but obsolete behaviour artifacts and lack of documentation.

>flutter drive --help

Runs Flutter Driver tests for the current project.
...
-t, --target=<path>             The main entry-point file of the application, as run on the device.
                                If the --target option is omitted, but a file name is provided on
                                the command line, then that is used instead.
                                (defaults to "lib/main.dart")
...

(defaults to "lib/main.dart") seems obsolete due to https://flutter.io/testing/ specifically says that you should create new entry point for "Creating instrumented Flutter apps", flutter_gallery follow this document correctly at least for last 2 years.

#5800 Partly about this confusion, seems related.

If this is intended behaviour then https://docs.flutter.io/flutter/flutter_driver_extension/enableFlutterDriverExtension.html
should say about it.

Flutter Doctor

[√] Flutter (Channel master, v0.2.1-pre.61, on Microsoft Windows [Version 10.0.16299.251], locale ru-RU)
    • Flutter version 0.2.1-pre.61 at c:\flutter
    • Framework revision 7865d319ba (2 hours ago), 2018-03-11 13:01:00 -0700
    • Engine revision 1d0da77995
    • Dart version 2.0.0-dev.33.0.flutter-b5b8080b2c

[√] Android toolchain - develop for Android devices (Android SDK 27.0.3)
    • Android SDK at C:\Users\Yfer\AppData\Local\Android\sdk
    • Android NDK at C:\Users\Yfer\AppData\Local\Android\sdk\ndk-bundle
    • Platform android-27, build-tools 27.0.3
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b01)
    • All Android licenses accepted.

[√] Android Studio (version 3.0)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b01)

[√] IntelliJ IDEA Ultimate Edition (version 2017.3)
    • IntelliJ at C:\Program Files\JetBrains\IntelliJ IDEA 2017.3.4
    • Flutter plugin version 22.2.2
    • Dart plugin version 173.4548.30

[!] VS Code, 64-bit edition (version 1.20.1)
    • VS Code at C:\Program Files\Microsoft VS Code
    • Dart Code extension not installed; install from
      https://marketplace.visualstudio.com/items?itemName=Dart-Code.dart-code

[√] Connected devices (1 available)
    • Android SDK built for x86 • emulator-5554 • android-x86 • Android 8.1.0 (API 27) (emulator)

Metadata

Metadata

Assignees

No one assigned

    Labels

    a: tests"flutter test", flutter_test, or one of our testst: flutter driver"flutter driver", flutter_drive, or a driver testtoolAffects the "flutter" command-line tool. See also t: labels.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions