TextInput not reacting to keyboard
Current bug behaviour
Text field not reacting to input events, nor on web neither on macos.
Expected behaviour
Typing on focussed TextInput should update its content.
Steps to reproduce
return MaterialApp(
title: 'Testing',
debugShowCheckedModeBanner: false,
home: Scaffold(
body: GameWidget(
game: _game,
initialActiveOverlays: ['launch'],
overlayBuilderMap: {
'launch': (_, MyGame game) => Center(child: TextField()),
},
),
),
theme: getLightTheme(context),
);
Flutter doctor output
[✓] Flutter (Channel stable, 3.0.1, on macOS 12.4 21F79 darwin-arm, locale de-DE)
• Flutter version 3.0.1 at /Users/oliver/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision fb57da5f94 (3 weeks ago), 2022-05-19 15:50:29 -0700
• Engine revision caaafc5604
• Dart version 2.17.1
• DevTools version 2.12.2
[!] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1)
• Android SDK at /Users/oliver/Library/Android/sdk
✗ cmdline-tools component is missing
Run `path/to/sdkmanager --install "cmdline-tools;latest"`
See https://developer.android.com/studio/command-line for more details.
✗ Android license status unknown.
Run `flutter doctor --android-licenses` to accept the SDK licenses.
See https://flutter.dev/docs/get-started/install/macos#android-setup for more details.
[✓] Xcode - develop for iOS and macOS (Xcode 13.4.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• CocoaPods version 1.11.3
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2021.1)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7772763)
[✓] VS Code (version 1.67.2)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.42.0
[✓] Connected device (2 available)
• macOS (desktop) • macos • darwin-arm64 • macOS 12.4 21F79 darwin-arm
• Chrome (web) • chrome • web-javascript • Google Chrome 102.0.5005.61
[✓] HTTP Host Availability
• All required HTTP hosts are available
! Doctor found issues in 1 category.
More environment information
flame: ^1.1.1 (latest published) chrome, web
Try setting GameWidget's autofocus property to false.
Try setting
GameWidget'sautofocusproperty to false.
Unfortunately this did not help :(
The text field has focus (cursor blinking) but not reacting to my keyboard typings.
Is it already known in which release the fix will be included?
Have you tried adding the KeyboardEvents mixin to the game?
Have you tried adding the
KeyboardEventsmixin to the game?
Had no effect but in the latest flame version it works now again 🥰🤝