Skip to main content

plate_core 0.11.5 copy "plate_core: ^0.11.5" to clipboard
plate_core: ^0.11.5 copied to clipboard

The backbone of license plate packages for countries that actually exist (we checked).

FREE PALESTINE 🇮🇷🇵🇸 پاینده ایران

GO VEGAN 🌱

==================================

The backbone of license plate packages for countries that actually exist (we checked).

Available plates #

Core #

Countries #

Utilities #

plate_core #

A plate here is just a const PlateSpec: some geometry, a country panel, and a row of slots over alphabets. The widget layer paints whatever the spec says, so adding a plate means adding a const - never a widget, never a subclass, never a meeting.

plate_core knows no country and ships no assets. It hands you the plate face, the slots, the input machine, and a PlateValidator that gives opinions but never blocks a keystroke. The actual countries live in their own packages.

Install #

dependencies:
  plate_core: ^0.5.0

Then pick a country package (iran_plate, germany_plate, palestine_plate, yemen_plate) and, if you want the on-screen keyboard, plate_keypad. The repo's plate_gallery/ app draws every plate all four of them ship, in one place.

Use #

import 'package:plate_core/plate_core.dart';
import 'package:iran_plate/iran_plate.dart';

PlateCanvas(
  spec: IranPlates.car,
  onChooseCharacter: (alphabet) async => null,
)

That is a complete, editable plate. It needs nothing above it — no provider, no bloc. A PlateCanvas owns its characters in a PlateController (a ChangeNotifier, no dependency beyond Flutter); pass controller: when you want to read or write the value, track the active slot, or feed characters from your own keypad. It brings its own Material, so it survives outside a Scaffold.

Swapping spec: on a live canvas now carries the value across to the new spec, matching registers by group key — onSpecChange tunes that.

If the code around your plate is already bloc-shaped, plate_core_bloc provides a PlateCardBloc mirrored onto the controller; nothing in plate_core depends on it.

Things it refuses to do #

  • Know a country. Grep lib/ for a country name; a hit is a bug.
  • Police input. The validator can paint the frame red. It cannot stop you typing.
  • Own your keyboard. Feed it characters from wherever you like.
  • Choose your state management. A plate holds its own characters in a PlateController. Bloc-shaped hosts add plate_core_bloc; core neither knows nor asks.

API #

Whatever package:plate_core/plate_core.dart exports is API. Anything under lib/src/ that the barrel doesn't re-export is ours to change without warning.

Also available #

2
likes
160
points
610
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

The backbone of license plate packages for countries that actually exist (we checked).

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

flutter, flutter_svg

More

Packages that depend on plate_core