Repository: flutter
Issue: KeyboardListener is buggy after focusing a TextField
Labels: a: text input,framework,engine,f: material design,platform-chromebook,has reproducible steps,P2,team-framework,triaged-framework,found in release: 3.19,found in release: 3.20

This is primarily an issue for physical keyboards without touch screens but it is acting weird even with touch screens. I'm trying to support chromebooks with physical keyboard, that's why this issue is blocking me. I have not yet tested enough on slates with bluetooth keyboards but this may be a big problem with those devices too.

I posted this same question in a closed issue here but I didn't get any responses so I guess it's a new bug: https://github.com/flutter/flutter/issues/11177

## Steps to Reproduce

I've created a simple repro: https://github.com/mikeesouth/chromebook_keyboard

This repro is as simple as this _(but my repro is slightly improved to show focus and removing unused code)_:

1. `flutter create chromebook_keyboard`
2. Add `final _keyboardListenerFocus = FocusNode();` to the state class
3. Add `String _keyName = 'N/A';` to the state class
4. Override dispose() and call `_keyboardListenerFocus.dispose();` in the state class
5. Add the following to the build method (e.g. as children to the column class):
```
Text('Here is plain TextField:'),
Container(width: 200, child: TextField()),
SizedBox(height: 50),
Text(
    'Tap the green container to show the keycode using a RawKeyboardListener:'),
GestureDetector(
  onTap: () => _keyboardListenerFocus.requestFocus(),
  child: Container(
    width: 200,
    height: 100,
    color: Colors.green,
    alignment: Alignment.center,
    child: RawKeyboardListener(
      focusNode: _keyboardListenerFocus,
      onKey: (keyEvent) => setState(
          () => _keyName = keyEvent.data.logicalKey.debugName),
      child: Text('keyName = $_keyName'),
    ),
  ),
),
```

**Expected results:**
I expect the physical keyboard to work for the TextField and the physical keyboard to also work for the RawKeyboardListener when pressing the green container (to set focus to the keyboard listener). I expect the RawKeyboardListener to register keys (e.g. "A") when it's focused.

**Actual results:**
The actual result is that the RawKeyboardListener listens correctly if I focus it before focusing the TextField after application startup. But as soon as I focus the TextField and then switch back the focus to the RawKeyboardListener - then it does not register keys correctly.
If you start with the green container (keyboard listener) it recognizes all keys (i.e a, b, c, 1, 2, 3, space, left alt, left shift and so on). If you switch to the text field you can type text as expected. If you switch back to the green container - it no longer recognizes text, only modifiers such as left alt, left shift etc. BUT if you hold left alt, then it also recognizes letters and other keys (i.e. alt + a will display "_keyName = A"). Restart the app - the KeyboardListener works again but as soon as you focus the TextField the RawKeyboardListener will no longer recognize key presses.

**Test device:**
I'm trying this on a Chromebook without touch screen and it (of course) has a physical keyboard. The model is `HP Chromebook 14-db0004no 14"`.

**Additional information - buggy on touch screens:**
Another interesting thing is that the keyboard listener correctly listens even after focusing the TextField. But an issue that may be related is that when I focus the TextField the soft keyboard shows as soon as I press a key on the physical keyboard - is this intended?

Steps to reproduce this issue that may be related:
1. Start the app
2. Tap the green container (to focus RawKeyboardListener)
3. Press some keys (e.g. a, b, c) on my physical keyboard (Windows) - it registers correctly and no soft keyboard is displayed
4. Tap the TextField (to focus it) - the soft keyboard pops up
5. Type some text (e.g. "Hello World")
6. Press back key on emulator to hide keyboard
7. Tap the green container again (to focus RawKeyboardListener)
8. Press some keys - the soft keyboard pops up again - why? _(side note: on the Android Emulator this still registers the keypresses, on my Chromebook, this wouldn't recognize the keypresses if I don't hold down alt as described above)_

I haven't started to test this on a hybrid device (i.e. touch screen + physical keyboard) but if the soft keyboard pops up focusing a text field when using a hybrid device with an attached keyboard, then it will become an issue for us. We would like to control when the soft keyboard shows up - it would be OK for it to show up automatically on a touch screen device without an attached keyboard.

<details>
  <summary>Logs</summary>

<!--
      Run your application with `flutter run --verbose` and attach all the
      log output below between the lines with the backticks. If there is an
      exception, please see if the error message includes enough information
      to explain how to solve the issue.
-->



```bash
[  +81 ms] executing: [C:\Stuff\flutter/] git -c log.showSignature=false log -n 1 --pretty=format:%H
[  +47 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H
[        ] f30b7f4db93ee747cd727df747941a28ead25ff5
[        ] executing: [C:\Stuff\flutter/] git tag --points-at HEAD
[  +35 ms] Exit code 0 from: git tag --points-at HEAD
[        ] 1.22.0-12.4.pre
           1.22.1
[   +5 ms] executing: [C:\Stuff\flutter/] git rev-parse --abbrev-ref --symbolic @{u}
[  +29 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u}
[        ] origin/stable
[        ] executing: [C:\Stuff\flutter/] git ls-remote --get-url origin
[  +25 ms] Exit code 0 from: git ls-remote --get-url origin
[        ] https://github.com/flutter/flutter.git
[  +48 ms] executing: [C:\Stuff\flutter/] git rev-parse --abbrev-ref HEAD
[  +26 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
[        ] stable
[  +40 ms] Artifact Instance of 'AndroidMavenArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[   +2 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[  +11 ms] executing: C:\Stuff\AndroidSDK\platform-tools\adb.exe devices -l
[  +34 ms] List of devices attached
           192.168.90.216:22      device product:grunt model:grunt device:grunt_cheets transport_id:11
[   +5 ms] C:\Stuff\AndroidSDK\platform-tools\adb.exe -s 192.168.90.216:22 shell getprop
[ +106 ms] Artifact Instance of 'AndroidMavenArtifacts' is not required, skipping update.
[   +3 ms] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[   +1 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[ +143 ms] Generating C:\Stuff\git\chromebook_keyboard\android\app\src\main\java\io\flutter\plugins\GeneratedPluginRegistrant.java
[  +16 ms] ro.hardware = cheets
[        ] ro.build.characteristics = device
[  +29 ms] Starting incremental build...
[   +1 ms] Initializing file store
[   +6 ms] Skipping target: gen_localizations
[   +5 ms] complete
[   +4 ms] Launching lib\main.dart on grunt in debug mode...
[   +4 ms] C:\Stuff\flutter\bin\cache\dart-sdk\bin\dart.exe --disable-dart-dev C:\Stuff\flutter\bin\cache\artifacts\engine\windows-x64\frontend_server.dart.snapshot --sdk-root
C:\Stuff\flutter\bin\cache\artifacts\engine\common\flutter_patched_sdk/ --incremental --target=flutter --debugger-module-names --experimental-emit-debug-metadata
-Ddart.developer.causal_async_stacks=true --output-dill C:\Users\micke\AppData\Local\Temp\flutter_tools.9fa4b6c3\flutter_tool.fecd069d\app.dill --packages .packages -Ddart.vm.profile=false
-Ddart.vm.product=false --bytecode-options=source-positions,local-var-info,debugger-stops,instance-field-initializers,keep-unreachable-code,avoid-closure-call-instructions --enable-asserts
--track-widget-creation --filesystem-scheme org-dartlang-root --initialize-from-dill build\cache.dill.track.dill
[   +9 ms] executing: C:\Stuff\AndroidSDK\build-tools\29.0.2\aapt dump xmltree C:\Stuff\git\chromebook_keyboard\build\app\outputs\flutter-apk\app.apk AndroidManifest.xml
[  +19 ms] Exit code 0 from: C:\Stuff\AndroidSDK\build-tools\29.0.2\aapt dump xmltree C:\Stuff\git\chromebook_keyboard\build\app\outputs\flutter-apk\app.apk AndroidManifest.xml
[        ] N: android=http://schemas.android.com/apk/res/android
             E: manifest (line=2)
               A: android:versionCode(0x0101021b)=(type 0x10)0x1
               A: android:versionName(0x0101021c)="1.0.0" (Raw: "1.0.0")
               A: android:compileSdkVersion(0x01010572)=(type 0x10)0x1d
               A: android:compileSdkVersionCodename(0x01010573)="10" (Raw: "10")
               A: package="com.example.chromebook_keyboard" (Raw: "com.example.chromebook_keyboard")
               A: platformBuildVersionCode=(type 0x10)0x1d
               A: platformBuildVersionName=(type 0x10)0xa
               E: uses-sdk (line=7)
                 A: android:minSdkVersion(0x0101020c)=(type 0x10)0x10
                 A: android:targetSdkVersion(0x01010270)=(type 0x10)0x1d
               E: uses-permission (line=14)
                 A: android:name(0x01010003)="android.permission.INTERNET" (Raw: "android.permission.INTERNET")
               E: application (line=22)
                 A: android:label(0x01010001)="chromebook_keyboard" (Raw: "chromebook_keyboard")
                 A: android:icon(0x01010002)=@0x7f080000
                 A: android:name(0x01010003)="io.flutter.app.FlutterApplication" (Raw: "io.flutter.app.FlutterApplication")
                 A: android:debuggable(0x0101000f)=(type 0x12)0xffffffff
                 A: android:appComponentFactory(0x0101057a)="androidx.core.app.CoreComponentFactory" (Raw: "androidx.core.app.CoreComponentFactory")
                 E: activity (line=28)
                   A: android:theme(0x01010000)=@0x7f0a0000
                   A: android:name(0x01010003)="com.example.chromebook_keyboard.MainActivity" (Raw: "com.example.chromebook_keyboard.MainActivity")
                   A: android:launchMode(0x0101001d)=(type 0x10)0x1
                   A: android:configChanges(0x0101001f)=(type 0x11)0x40003fb4
                   A: android:windowSoftInputMode(0x0101022b)=(type 0x11)0x10
                   A: android:hardwareAccelerated(0x010102d3)=(type 0x12)0xffffffff
                   E: meta-data (line=42)
                     A: android:name(0x01010003)="io.flutter.embedding.android.NormalTheme" (Raw: "io.flutter.embedding.android.NormalTheme")
                     A: android:resource(0x01010025)=@0x7f0a0001
                   E: meta-data (line=52)
                     A: android:name(0x01010003)="io.flutter.embedding.android.SplashScreenDrawable" (Raw: "io.flutter.embedding.android.SplashScreenDrawable")
                     A: android:resource(0x01010025)=@0x7f040000
                   E: intent-filter (line=56)
                     E: action (line=57)
                       A: android:name(0x01010003)="android.intent.action.MAIN" (Raw: "android.intent.action.MAIN")
                     E: category (line=59)
                       A: android:name(0x01010003)="android.intent.category.LAUNCHER" (Raw: "android.intent.category.LAUNCHER")
                 E: meta-data (line=66)
                   A: android:name(0x01010003)="flutterEmbedding" (Raw: "flutterEmbedding")
                   A: android:value(0x01010024)=(type 0x10)0x2
[   +9 ms] executing: C:\Stuff\AndroidSDK\platform-tools\adb.exe -s 192.168.90.216:22 shell -x logcat -v time -t 1
[  +85 ms] Exit code 0 from: C:\Stuff\AndroidSDK\platform-tools\adb.exe -s 192.168.90.216:22 shell -x logcat -v time -t 1
[        ] --------- beginning of system
           10-12 14:05:05.714 E/TaskPersister(  133): File error accessing recents directory (directory doesn't exist?).
[   +1 ms] executing: C:\Stuff\AndroidSDK\platform-tools\adb.exe -s 192.168.90.216:22 shell -x logcat -v time -t 1
[ +151 ms] Exit code 0 from: C:\Stuff\AndroidSDK\platform-tools\adb.exe -s 192.168.90.216:22 shell -x logcat -v time -t 1
[   +1 ms] --------- beginning of system
           10-12 14:05:05.714 E/TaskPersister(  133): File error accessing recents directory (directory doesn't exist?).
[   +9 ms] <- compile package:chromebook_keyboard/main.dart
[  +16 ms] executing: C:\Stuff\AndroidSDK\platform-tools\adb.exe version
[  +33 ms] Android Debug Bridge version 1.0.41
           Version 29.0.5-5949299
           Installed as C:\Stuff\AndroidSDK\platform-tools\adb.exe
[   +2 ms] executing: C:\Stuff\AndroidSDK\platform-tools\adb.exe start-server
[  +25 ms] Building APK
[  +11 ms] Running Gradle task 'assembleDebug'...
[   +2 ms] gradle.properties already sets `android.enableR8`
[   +2 ms] Using gradle from C:\Stuff\git\chromebook_keyboard\android\gradlew.bat.
[   +1 ms] C:\Stuff\git\chromebook_keyboard\android\gradlew.bat mode: 33279 rwxrwxrwx.
[   +7 ms] executing: C:\Program Files\Android\Android Studio\jre\bin\java -version
[  +72 ms] Exit code 0 from: C:\Program Files\Android\Android Studio\jre\bin\java -version
[        ] openjdk version "1.8.0_212-release"
           OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b04)
           OpenJDK 64-Bit Server VM (build 25.212-b04, mixed mode)
[   +2 ms] executing: [C:\Stuff\git\chromebook_keyboard\android/] C:\Stuff\git\chromebook_keyboard\android\gradlew.bat -Pverbose=true -Ptarget-platform=android-x86
-Ptarget=C:\Stuff\git\chromebook_keyboard\lib\main.dart -Ptrack-widget-creation=true -Pfilesystem-scheme=org-dartlang-root assembleDebug
[+2826 ms] > Task :app:compileFlutterBuildDebug
[   +1 ms] [  +76 ms] executing: [C:\Stuff\flutter/] git -c log.showSignature=false log -n 1 --pretty=format:%H
[        ] [  +42 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H
[        ] [        ] f30b7f4db93ee747cd727df747941a28ead25ff5
[        ] [        ] executing: [C:\Stuff\flutter/] git tag --points-at HEAD
[        ] [  +30 ms] Exit code 0 from: git tag --points-at HEAD
[        ] [        ] 1.22.0-12.4.pre
[        ]            1.22.1
[        ] [   +5 ms] executing: [C:\Stuff\flutter/] git rev-parse --abbrev-ref --symbolic @{u}
[        ] [  +22 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u}
[        ] [        ] origin/stable
[        ] [        ] executing: [C:\Stuff\flutter/] git ls-remote --get-url origin
[        ] [  +19 ms] Exit code 0 from: git ls-remote --get-url origin
[        ] [        ] https://github.com/flutter/flutter.git
[        ] [  +40 ms] executing: [C:\Stuff\flutter/] git rev-parse --abbrev-ref HEAD
[        ] [  +21 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
[        ] [        ] stable
[        ] [  +23 ms] Artifact Instance of 'AndroidMavenArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[        ] [   +1 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[        ] [   +7 ms] Artifact Instance of 'MaterialFonts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'GradleWrapper' is not required, skipping update.
[        ] [        ] Artifact Instance of 'AndroidMavenArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[        ] [        ] Artifact Instance of 'FlutterSdk' is not required, skipping update.
[        ] [        ] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[        ] [        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'FontSubsetArtifacts' is not required, skipping update.
[        ] [  +48 ms] Initializing file store
[        ] [   +9 ms] Done initializing file store
[        ] [  +25 ms] Skipping target: gen_localizations
[   +1 ms] [ +454 ms] kernel_snapshot: Starting due to {InvalidatedReason.inputChanged}
[   +1 ms] [  +16 ms] C:\Stuff\flutter\bin\cache\dart-sdk\bin\dart.exe --disable-dart-dev C:\Stuff\flutter\bin\cache\artifacts\engine\windows-x64\frontend_server.dart.snapshot --sdk-root
C:\Stuff\flutter\bin\cache\artifacts\engine\common\flutter_patched_sdk/ --target=flutter -Ddart.developer.causal_async_stacks=true -Ddart.vm.profile=false -Ddart.vm.product=false
--bytecode-options=source-positions,local-var-info,debugger-stops,instance-field-initializers,keep-unreachable-code,avoid-closure-call-instructions --enable-asserts --track-widget-creation
--no-link-platform --packages C:\Stuff\git\chromebook_keyboard\.packages --output-dill C:\Stuff\git\chromebook_keyboard\.dart_tool\flutter_build\d30679fb5b2608e85e4dafe663c5dae6\app.dill --depfile
C:\Stuff\git\chromebook_keyboard\.dart_tool\flutter_build\d30679fb5b2608e85e4dafe663c5dae6\kernel_snapshot.d package:chromebook_keyboard/main.dart
[+3857 ms] [+4560 ms] kernel_snapshot: Complete
[ +497 ms] [ +500 ms] debug_android_application: Starting due to {InvalidatedReason.inputChanged}
[ +108 ms] [  +91 ms] debug_android_application: Complete
[ +205 ms] [ +253 ms] Persisting file store
[   +1 ms] [   +5 ms] Done persisting file store
[        ] [   +4 ms] build succeeded.
[        ] [   +8 ms] "flutter assemble" took 5 995ms.
[        ] [   +2 ms] ensureAnalyticsSent: 0ms
[        ] [        ] Running shutdown hooks
[        ] [        ] Shutdown hooks complete
[        ] [        ] exiting with code 0
[ +184 ms] > Task :app:packLibsflutterBuildDebug UP-TO-DATE
[   +1 ms] > Task :app:preBuild UP-TO-DATE
[        ] > Task :app:preDebugBuild UP-TO-DATE
[        ] > Task :app:compileDebugAidl NO-SOURCE
[        ] > Task :app:checkDebugManifest UP-TO-DATE
[        ] > Task :app:compileDebugRenderscript NO-SOURCE
[        ] > Task :app:generateDebugBuildConfig UP-TO-DATE
[        ] > Task :app:cleanMergeDebugAssets
[        ] > Task :app:mergeDebugShaders UP-TO-DATE
[        ] > Task :app:compileDebugShaders UP-TO-DATE
[        ] > Task :app:generateDebugAssets UP-TO-DATE
[        ] > Task :app:mergeDebugAssets
[ +194 ms] > Task :app:copyFlutterAssetsDebug
[        ] > Task :app:mainApkListPersistenceDebug UP-TO-DATE
[        ] > Task :app:generateDebugResValues UP-TO-DATE
[        ] > Task :app:generateDebugResources UP-TO-DATE
[        ] > Task :app:mergeDebugResources UP-TO-DATE
[        ] > Task :app:createDebugCompatibleScreenManifests UP-TO-DATE
[        ] > Task :app:processDebugManifest UP-TO-DATE
[        ] > Task :app:processDebugResources UP-TO-DATE
[        ] > Task :app:compileDebugKotlin UP-TO-DATE
[        ] > Task :app:javaPreCompileDebug UP-TO-DATE
[        ] > Task :app:compileDebugJavaWithJavac UP-TO-DATE
[        ] > Task :app:compileDebugSources UP-TO-DATE
[        ] > Task :app:processDebugJavaRes NO-SOURCE
[        ] > Task :app:mergeDebugJavaResource UP-TO-DATE
[        ] > Task :app:checkDebugDuplicateClasses UP-TO-DATE
[        ] > Task :app:transformClassesWithDexBuilderForDebug UP-TO-DATE
[        ] > Task :app:desugarDebugFileDependencies UP-TO-DATE
[        ] > Task :app:mergeExtDexDebug UP-TO-DATE
[        ] > Task :app:mergeDexDebug UP-TO-DATE
[        ] > Task :app:validateSigningDebug UP-TO-DATE
[        ] > Task :app:signingConfigWriterDebug UP-TO-DATE
[        ] > Task :app:mergeDebugJniLibFolders UP-TO-DATE
[        ] > Task :app:mergeDebugNativeLibs UP-TO-DATE
[  +98 ms] > Task :app:stripDebugDebugSymbols UP-TO-DATE
[        ] Compatible side by side NDK version was not found.
[ +691 ms] > Task :app:packageDebug
[  +95 ms] > Task :app:assembleDebug
[        ] BUILD SUCCESSFUL in 8s
[        ] 31 actionable tasks: 6 executed, 25 up-to-date
[ +517 ms] Running Gradle task 'assembleDebug'... (completed in 9,4s)
[  +19 ms] calculateSha: LocalDirectory: 'C:\Stuff\git\chromebook_keyboard\build\app\outputs\flutter-apk'/app.apk
[  +10 ms] calculateSha: reading file took 9us
[ +343 ms] calculateSha: computing sha took 342us
[   +4 ms] √ Built build\app\outputs\flutter-apk\app-debug.apk.
[   +2 ms] executing: C:\Stuff\AndroidSDK\build-tools\29.0.2\aapt dump xmltree C:\Stuff\git\chromebook_keyboard\build\app\outputs\flutter-apk\app.apk AndroidManifest.xml
[  +21 ms] Exit code 0 from: C:\Stuff\AndroidSDK\build-tools\29.0.2\aapt dump xmltree C:\Stuff\git\chromebook_keyboard\build\app\outputs\flutter-apk\app.apk AndroidManifest.xml
[        ] N: android=http://schemas.android.com/apk/res/android
             E: manifest (line=2)
               A: android:versionCode(0x0101021b)=(type 0x10)0x1
               A: android:versionName(0x0101021c)="1.0.0" (Raw: "1.0.0")
               A: android:compileSdkVersion(0x01010572)=(type 0x10)0x1d
               A: android:compileSdkVersionCodename(0x01010573)="10" (Raw: "10")
               A: package="com.example.chromebook_keyboard" (Raw: "com.example.chromebook_keyboard")
               A: platformBuildVersionCode=(type 0x10)0x1d
               A: platformBuildVersionName=(type 0x10)0xa
               E: uses-sdk (line=7)
                 A: android:minSdkVersion(0x0101020c)=(type 0x10)0x10
                 A: android:targetSdkVersion(0x01010270)=(type 0x10)0x1d
               E: uses-permission (line=14)
                 A: android:name(0x01010003)="android.permission.INTERNET" (Raw: "android.permission.INTERNET")
               E: application (line=22)
                 A: android:label(0x01010001)="chromebook_keyboard" (Raw: "chromebook_keyboard")
                 A: android:icon(0x01010002)=@0x7f080000
                 A: android:name(0x01010003)="io.flutter.app.FlutterApplication" (Raw: "io.flutter.app.FlutterApplication")
                 A: android:debuggable(0x0101000f)=(type 0x12)0xffffffff
                 A: android:appComponentFactory(0x0101057a)="androidx.core.app.CoreComponentFactory" (Raw: "androidx.core.app.CoreComponentFactory")
                 E: activity (line=28)
                   A: android:theme(0x01010000)=@0x7f0a0000
                   A: android:name(0x01010003)="com.example.chromebook_keyboard.MainActivity" (Raw: "com.example.chromebook_keyboard.MainActivity")
                   A: android:launchMode(0x0101001d)=(type 0x10)0x1
                   A: android:configChanges(0x0101001f)=(type 0x11)0x40003fb4
                   A: android:windowSoftInputMode(0x0101022b)=(type 0x11)0x10
                   A: android:hardwareAccelerated(0x010102d3)=(type 0x12)0xffffffff
                   E: meta-data (line=42)
                     A: android:name(0x01010003)="io.flutter.embedding.android.NormalTheme" (Raw: "io.flutter.embedding.android.NormalTheme")
                     A: android:resource(0x01010025)=@0x7f0a0001
                   E: meta-data (line=52)
                     A: android:name(0x01010003)="io.flutter.embedding.android.SplashScreenDrawable" (Raw: "io.flutter.embedding.android.SplashScreenDrawable")
                     A: android:resource(0x01010025)=@0x7f040000
                   E: intent-filter (line=56)
                     E: action (line=57)
                       A: android:name(0x01010003)="android.intent.action.MAIN" (Raw: "android.intent.action.MAIN")
                     E: category (line=59)
                       A: android:name(0x01010003)="android.intent.category.LAUNCHER" (Raw: "android.intent.category.LAUNCHER")
                 E: meta-data (line=66)
                   A: android:name(0x01010003)="flutterEmbedding" (Raw: "flutterEmbedding")
                   A: android:value(0x01010024)=(type 0x10)0x2
[   +6 ms] Stopping app 'app.apk' on grunt.
[        ] executing: C:\Stuff\AndroidSDK\platform-tools\adb.exe -s 192.168.90.216:22 shell am force-stop com.example.chromebook_keyboard
[ +123 ms] executing: C:\Stuff\AndroidSDK\platform-tools\adb.exe -s 192.168.90.216:22 shell pm list packages com.example.chromebook_keyboard
[ +103 ms] package:com.example.chromebook_keyboard
[   +1 ms] executing: C:\Stuff\AndroidSDK\platform-tools\adb.exe -s 192.168.90.216:22 shell cat /data/local/tmp/sky.com.example.chromebook_keyboard.sha1
[  +86 ms] 1e9971d7f02b1155f5a9c5f4504744c688f0f1e1
[   +1 ms] Installing APK.
[   +1 ms] executing: C:\Stuff\AndroidSDK\platform-tools\adb.exe version
[  +22 ms] Android Debug Bridge version 1.0.41
           Version 29.0.5-5949299
           Installed as C:\Stuff\AndroidSDK\platform-tools\adb.exe
[   +1 ms] executing: C:\Stuff\AndroidSDK\platform-tools\adb.exe start-server
[  +22 ms] Installing build\app\outputs\flutter-apk\app.apk...
[   +1 ms] executing: C:\Stuff\AndroidSDK\platform-tools\adb.exe -s 192.168.90.216:22 install -t -r C:\Stuff\git\chromebook_keyboard\build\app\outputs\flutter-apk\app.apk
[+16255 ms] Performing Streamed Install
                     Success
[   +1 ms] Installing build\app\outputs\flutter-apk\app.apk... (completed in 16,3s)
[        ] executing: C:\Stuff\AndroidSDK\platform-tools\adb.exe -s 192.168.90.216:22 shell echo -n f6d601e63c9fbcfe3dcea9e690eb81c5d3954a21 > /data/local/tmp/sky.com.example.chromebook_keyboard.sha1 [ +124 ms] grunt startApp
[   +2 ms] executing: C:\Stuff\AndroidSDK\platform-tools\adb.exe -s 192.168.90.216:22 shell am start -a android.intent.action.RUN -f 0x20000000 --ez enable-background-compilation true --ez
enable-dart-profiling true --ez enable-checked-mode true --ez verify-entry-points true com.example.chromebook_keyboard/com.example.chromebook_keyboard.MainActivity
[ +213 ms] Starting: Intent { act=android.intent.action.RUN flg=0x20000000 cmp=com.example.chromebook_keyboard/.MainActivity (has extras) }
[        ] Waiting for observatory port to be available...
[+2419 ms] Observatory URL on device: http://127.0.0.1:46247/NufBGxrGSNc=/
[   +1 ms] executing: C:\Stuff\AndroidSDK\platform-tools\adb.exe -s 192.168.90.216:22 forward tcp:0 tcp:46247
[  +22 ms] 52402
[        ] Forwarded host port 52402 to device port 46247 for Observatory
[   +3 ms] Caching compiled dill
[  +16 ms] Connecting to service protocol: http://127.0.0.1:52402/NufBGxrGSNc=/
[   +1 ms] DDS is currently disabled due to https://github.com/flutter/flutter/issues/62507
[ +475 ms] Successfully connected to service protocol: http://127.0.0.1:52402/NufBGxrGSNc=/
[   +1 ms] Waiting for grunt to report its views...
[ +116 ms] Waiting for grunt to report its views... (completed in 115ms)
[ +147 ms] DevFS: Creating new filesystem on the device (null)
[ +125 ms] DevFS: Created new filesystem on the device (file:///data/user/0/com.example.chromebook_keyboard/code_cache/chromebook_keyboardCHPXFD/chromebook_keyboard/)
[   +2 ms] Updating assets
[  +57 ms] Syncing files to device grunt...
[   +2 ms] Scanning asset files
[   +1 ms] <- reset
[        ] Compiling dart to kernel with 0 updated files
[   +1 ms] <- recompile package:chromebook_keyboard/main.dart cd00f21c-5a47-47ef-adbf-5dab26f5ae23
[        ] <- cd00f21c-5a47-47ef-adbf-5dab26f5ae23
[  +41 ms] Updating files
[ +502 ms] DevFS: Sync finished
[   +1 ms] Syncing files to device grunt... (completed in 550ms)
[        ] Synced 1.8MB.
[        ] <- accept
[ +136 ms] Connected to _flutterView/0xdb4f7010.
[   +1 ms] Flutter run key commands.
[   +1 ms] r Hot reload.
[        ] R Hot restart.
[        ] h Repeat this help message.
[   +1 ms] d Detach (terminate "flutter run" but leave application running).
[        ] c Clear the screen
[        ] q Quit (terminate the application on the device).
[        ] An Observatory debugger and profiler on grunt is available at: http://127.0.0.1:52402/NufBGxrGSNc=/
[+17348 ms] Application finished.
[   +2 ms] executing: C:\Stuff\AndroidSDK\platform-tools\adb.exe -s 192.168.90.216:22 forward --list
[  +24 ms] Exit code 0 from: C:\Stuff\AndroidSDK\platform-tools\adb.exe -s 192.168.90.216:22 forward --list
[        ] 192.168.90.216:22 tcp:52402 tcp:46247
[   +1 ms] executing: C:\Stuff\AndroidSDK\platform-tools\adb.exe -s 192.168.90.216:22 forward --remove tcp:52402
```


<!--
     Run `flutter analyze` and attach any output of that command below.
     If there are any analysis errors, try resolving them before filing this issue.
-->
Analyzing chromebook_keyboard...
No issues found! (ran in 1.2s)
```
```

<!-- Finally, paste the output of running `flutter doctor -v` here. -->
[√] Flutter (Channel stable, 1.22.1, on Microsoft Windows [Version 10.0.19042.546], locale sv-SE)
    • Flutter version 1.22.1 at C:\Stuff\flutter
    • Framework revision f30b7f4db9 (4 days ago), 2020-10-08 10:06:30 -0700
    • Engine revision 75bef9f6c8
    • Dart version 2.10.1

[√] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
    • Android SDK at C:\Stuff\AndroidSDK
    • Platform android-29, build-tools 29.0.2
    • ANDROID_HOME = C:\Stuff\AndroidSDK
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b04)
    • All Android licenses accepted.

[√] Android Studio (version 3.6)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin version 42.1.1
    • Dart plugin version 191.8593
    • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b04)

[√] VS Code (version 1.50.0)
    • VS Code at C:\Users\micke\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.15.0

[√] Connected device (1 available)
    • sdk gphone x86 arm (mobile) • emulator-5554 • android-x86 • Android 10 (API 29) (emulator)
    ! Device 192.168.90.216:22 is offline.
```
```

</details>