Skip to main content

plate_keypad 0.1.0 copy "plate_keypad: ^0.1.0" to clipboard
plate_keypad: ^0.1.0 copied to clipboard

The optional on-screen keypad and slot picker for the core_plate library — a soft keyboard for hosts that do not render their own.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:core_plate/core_plate.dart';
import 'package:plate_keypad/plate_keypad.dart';

void main() => runApp(const ExampleApp());

class ExampleApp extends StatefulWidget {
  const ExampleApp({super.key});

  @override
  State<ExampleApp> createState() => _ExampleAppState();
}

class _ExampleAppState extends State<ExampleApp> {
  String _typed = '';

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        body: SafeArea(
          child: Column(
            mainAxisAlignment: MainAxisAlignment.end,
            children: [
              Expanded(
                child: Center(child: Text(_typed.isEmpty ? '—' : _typed)),
              ),
              PlateKeypad(
                highlightedKey: null,
                digitAlphabet: PlateAlphabet.latinDigits,
                letterAlphabet: PlateAlphabet.latinUppercase,
                onKey: (key) => setState(() {
                  _typed = key == kPlateBackspaceKey
                      ? _typed.substring(
                          0,
                          _typed.isEmpty ? 0 : _typed.length - 1,
                        )
                      : _typed + key;
                }),
              ),
            ],
          ),
        ),
      ),
    );
  }
}
1
likes
0
points
455
downloads

Publisher

unverified uploader

Weekly Downloads

The optional on-screen keypad and slot picker for the core_plate library — a soft keyboard for hosts that do not render their own.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

core_plate, flutter

More

Packages that depend on plate_keypad