dart_cordova_keyboard_plugin 1.0.1

  • Readme
  • Changelog
  • Example
  • Installing
  • 49

Dart Wrapper for Cordova Keyboard Plugin #

if you would like to use this plugin: https://github.com/ionic-team/cordova-plugin-ionic-keyboard with dart. Install this package.

In you code just import KeyboardPlugin, and watch the available methods. They are exactly the same like on cordova repo.

Remember to install the cordova plugin also!! this is just a wrapper

pub package: https://pub.dartlang.org/packages/dart_cordova_keyboard_plugin#-readme-tab-

installation: #

add this to your dependencies

  dart_cordova_keyboard_plugin: ^1.0.1

import #

import 'package:dart_cordova_keyboard_plugin/keyboard_plugin.dart';

1.0.1 2018-12-30 #

fixed #

  • fixed keyboardheight


import 'package:dart_cordova_keyboard_plugin/keyboard_plugin.dart';
import 'dart:html';

void main() {

  KeyboardPlugin keyboard = new KeyboardPlugin();

  keyboard.keyboardDidShow().listen((KeyboardPluginEvent event) {
    print('keyboard did show');

  keyboard.keyboardDidHide().listen((void _) {
    print('keyboard did hide');

  document.getElementById('triggerShow').addEventListener('click', (Event event) => keyboard.show());
  document.getElementById('triggerHide').addEventListener('click', (Event event) => keyboard.hide());

  document.getElementById('triggerHideAccessoryBar').addEventListener('click', (Event event){
    keyboard.hideFormAccessoryBar(true).then((bool currentValue) => print(currentValue));

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  dart_cordova_keyboard_plugin: ^1.0.1

2. Install it

You can install packages from the command line:

with pub:

$ pub get

Alternatively, your editor might support pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:dart_cordova_keyboard_plugin/keyboard_plugin.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Nov 22, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.6.0
  • pana: 0.12.21


Detected platforms: web

Platform components identified in package: html, js.

Health suggestions

Fix lib/src/keyboard_plugin.dart. (-2.96 points)

Analysis of lib/src/keyboard_plugin.dart reported 6 hints, including:

line 9 col 60: Unnecessary new keyword.

line 10 col 45: Unnecessary new keyword.

line 11 col 46: Unnecessary new keyword.

line 12 col 46: Unnecessary new keyword.

line 19 col 48: Unnecessary new keyword.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
js >=0.6.0 <0.7.0 0.6.1+1
Dev dependencies
build_runner ^1.1.2
build_web_compilers ^0.4.4
test ^1.5.1