dart_cordova_keyboard_plugin 1.0.1

  • Readme
  • Changelog
  • Example
  • Installing
  • 39

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

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

example/main.dart

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:


dependencies:
  dart_cordova_keyboard_plugin: ^1.0.1

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter pub get

Alternatively, your editor might support pub get or flutter 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';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
0
Health:
Code health derived from static analysis. [more]
97
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
48
Overall:
Weighted score of the above. [more]
39
Learn more about scoring.

We analyzed this package on Jul 7, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.8.4
  • pana: 0.13.13

Analysis suggestions

Package not compatible with runtime flutter-native on android

Because of the import of dart:js via the import chain package:dart_cordova_keyboard_plugin/keyboard_plugin.dartpackage:dart_cordova_keyboard_plugin/src/keyboard_plugin.dartpackage:dart_cordova_keyboard_plugin/src/keyboard_cordova.dartpackage:js/js.dartdart:js

Package not compatible with runtime flutter-native on ios

Because of the import of dart:js via the import chain package:dart_cordova_keyboard_plugin/keyboard_plugin.dartpackage:dart_cordova_keyboard_plugin/src/keyboard_plugin.dartpackage:dart_cordova_keyboard_plugin/src/keyboard_cordova.dartpackage:js/js.dartdart:js

Package not compatible with runtime flutter-native on linux

Because of the import of dart:js via the import chain package:dart_cordova_keyboard_plugin/keyboard_plugin.dartpackage:dart_cordova_keyboard_plugin/src/keyboard_plugin.dartpackage:dart_cordova_keyboard_plugin/src/keyboard_cordova.dartpackage:js/js.dartdart:js

Package not compatible with runtime flutter-native on macos

Because of the import of dart:js via the import chain package:dart_cordova_keyboard_plugin/keyboard_plugin.dartpackage:dart_cordova_keyboard_plugin/src/keyboard_plugin.dartpackage:dart_cordova_keyboard_plugin/src/keyboard_cordova.dartpackage:js/js.dartdart:js

Package not compatible with runtime flutter-native on windows

Because of the import of dart:js via the import chain package:dart_cordova_keyboard_plugin/keyboard_plugin.dartpackage:dart_cordova_keyboard_plugin/src/keyboard_plugin.dartpackage:dart_cordova_keyboard_plugin/src/keyboard_cordova.dartpackage:js/js.dartdart:js

Package not compatible with runtime native-aot

Because of the import of dart:js via the import chain package:dart_cordova_keyboard_plugin/keyboard_plugin.dartpackage:dart_cordova_keyboard_plugin/src/keyboard_plugin.dartpackage:dart_cordova_keyboard_plugin/src/keyboard_cordova.dartpackage:js/js.dartdart:js

Package not compatible with runtime native-jit

Because of the import of dart:js via the import chain package:dart_cordova_keyboard_plugin/keyboard_plugin.dartpackage:dart_cordova_keyboard_plugin/src/keyboard_plugin.dartpackage:dart_cordova_keyboard_plugin/src/keyboard_cordova.dartpackage:js/js.dartdart: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.

Maintenance suggestions

Package is getting outdated. (-51.78 points)

The package was last published 79 weeks ago.

Dependencies

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