Skip to content

hyuricane/flutter-pseudo-keyboard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pseudo_keyboard

Widget to simulate keyboard UI in flutter

not a real keyboard

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}");
              },
            ),
          ],
        ),
      ),
    );
  }