pseudo_keyboard 1.0.2

  • README.md
  • CHANGELOG.md
  • Example
  • Installing
  • Versions
  • 14

pseudo_keyboard

Widget to simulate keyboard UI in flutter

<strong>not a real keyboard</strong>

Getting Started

to include in flutter yaml

  dependencies:
    pseudo_keyboard: ^1.0.0

sample in code:

import 'package:pseudo_keyboard/pseudo_keyboard.dart';

...

  @override
  Widget build(BuildContext context) {
    return new Scaffold(
      appBar: new AppBar(
        title: new Text("Title"),
      ),
      body: new SafeArea(
        child: new Column(
          children: <Widget>[
            new Expanded(
              flex: 2,
              child: new Center(
                child: new Text("Main Body")
              )
            ),
            new KeyboardWidget(
              onKeyUp: (int keyCode, bool isShift, bool canceled) {
                debugPrint("keyPressUp {code: $keyCode, shift: $isShift, canceled: $canceled}");
              }, 
              onKeyDown: (int keyCode, bool isShift) {
                debugPrint("keyPressDown {code: $keyCode, shift: $isShift}");
              },
            ),
          ],
        ),
      ),
    );
  }

[0.0.1] - TODO: Add release date.

  • TODO: Describe initial release.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:pseudo_keyboard/pseudo_keyboard.dart';

void main() => runApp(new MyApp());

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return new MaterialApp(
      title: 'Flutter Demo',
      theme: new ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: new MyHomePage(title: 'Flutter Demo Home Page'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  MyHomePage({Key key, this.title}) : super(key: key);

  final String title;

  @override
  _MyHomePageState createState() => new _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  int _counter = 0;

  void _incrementCounter() {
    setState(() {
      _counter++;
    });
  }

  @override
  Widget build(BuildContext context) {
    return new Scaffold(
        appBar: new AppBar(
          title: new Text(widget.title),
        ),
        body: Column(
          mainAxisSize: MainAxisSize.max,
          children: <Widget>[
            Expanded(
              child: Container(),
            ),
            KeyboardWidget(
              onKeyDown: (int keyCode, bool shift) {
                debugPrint("key down keyCode: $keyCode, shift: $shift");
              },
              onKeyUp: (int keyCode, bool shift, bool canceled) {
                debugPrint("key up keyCode: $keyCode, shift: $shift");
              },
            )
          ],
        ));
  }
}

Use this package as a library

1. Depend on it

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


dependencies:
  pseudo_keyboard: ^1.0.2

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter packages get

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

3. Import it

Now in your Dart code, you can use:


import 'package:pseudo_keyboard/pseudo_keyboard.dart';
  
Version Uploaded Documentation Archive
1.0.2 Jul 27, 2018 Go to the documentation of pseudo_keyboard 1.0.2 Download pseudo_keyboard 1.0.2 archive
1.0.1 Jul 23, 2018 Go to the documentation of pseudo_keyboard 1.0.1 Download pseudo_keyboard 1.0.1 archive
1.0.0 Jul 23, 2018 Go to the documentation of pseudo_keyboard 1.0.0 Download pseudo_keyboard 1.0.0 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
28
Health:
Code health derived from static analysis. [more]
0
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
0
Overall:
Weighted score of the above. [more]
14
Learn more about scoring.

The package version is not analyzed, because it does not support Dart 2. Until this is resolved, the package will receive a health and maintenance score of 0.

Analysis issues and suggestions

Support Dart 2 in pubspec.yaml.

The SDK constraint in pubspec.yaml doesn't allow the Dart 2.0.0 release. For information about upgrading it to be Dart 2 compatible, please see https://www.dartlang.org/dart-2#migration.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.19.0 <2.0.0