https://github.com/scientifichackers/flutter-keyboard-plugin
Flutter plugin to detect keyboard events.
https://github.com/scientifichackers/flutter-keyboard-plugin
Last synced: 5 months ago
JSON representation
Flutter plugin to detect keyboard events.
- Host: GitHub
- URL: https://github.com/scientifichackers/flutter-keyboard-plugin
- Owner: scientifichackers
- License: lgpl-3.0
- Created: 2019-04-15T20:19:30.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2020-01-22T16:59:06.000Z (over 6 years ago)
- Last Synced: 2025-04-06T17:04:14.881Z (about 1 year ago)
- Language: Dart
- Size: 77.1 KB
- Stars: 5
- Watchers: 1
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Flutter Keyboard Plugin
A Flutter plugin to detect keyboard events on Android. Useful for non-touchscreen devices.
[](https://www.jaaga.in/labs)
[](https://pub.dartlang.org/packages/keyboard/)
## Example
The example app can show detected events in a `ListView`.
It's present in the usual `example` directory.
```
$ git clone https://github.com/devxpy/flutter-keyboard-plugin.git
$ cd flutter-keyboard-plugin/example
$ flutter run
```
## Installation
Since flutter plugins don't have access to the regular `Activity` events,
you also, need to make a small change to the
`android/app/src/main/kotlin/.../MainActivity.kt` file in your project.
Just replace `FlutterActivity()` by `KeyboardPluginActivity()`.
Here's what it should look like:-
```kotlin
import android.os.Bundle
import com.pycampers.keyboard.KeyboardPluginActivity
import io.flutter.plugins.GeneratedPluginRegistrant
class MainActivity : KeyboardPluginActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
GeneratedPluginRegistrant.registerWith(this)
}
}
```
---
Then just follow the regular plugin installation on [dart pub](https://pub.dartlang.org/packages/keyboard/#-installing-tab-).