iranshahr_plate 0.1.0
iranshahr_plate: ^0.1.0 copied to clipboard
Bahrain's, Azerbaijan's, Afghanistan's, Armenia's, Tajikistan's, Kuwait's, Qatar's, Iraq's and the UAE's licence plates for the plate_core library — country panels, and the Bahraini, Azerbaijani, Afgh [...]
FREE PALESTINE 🇮🇷🇵🇸 پاینده ایران
GO VEGAN 🌱
==================================
https://platexample.ir/#/discover/iranshahr
iranshahr_plate #
License plates for Bahrain, Azerbaijan, Afghanistan, Armenia, and Tajikistan — five countries with plate_core. Data, not code: PlateCountrys, PlateAlphabets and PlateSpecs that the widget layer paints.
Bahrain #
Five plate designs, each in one colour theme:
- Civilian EU — white flag on white field
- Civilian US tall — white flag on white field
- Civilian US wide — white flag on white field
- Diplomatic corps — flag-free, green band
- Police — flag-free, pale blue band
PlateCanvas(spec: BahrainPlates.eu, theme: BahrainThemes.civilian, ...)
PlateCanvas(spec: BahrainPlates.diplomatic, theme: BahrainThemes.diplomatic, ...)
PlateCanvas(spec: BahrainPlates.police, theme: BahrainThemes.police, ...)
Azerbaijan #
Four plate designs, each in four colour themes:
- Civilian — white block
- Motorcycle — white block, smaller
- Diplomatic — white block, red field
- Foreign company — white block, yellow field
PlateCanvas(spec: AzerbaijanPlates.car, theme: AzerbaijanThemes.civilian, ...)
PlateCanvas(spec: AzerbaijanPlates.motorcycle, theme: AzerbaijanThemes.transport, ...)
PlateCanvas(spec: AzerbaijanPlates.diplomatic, theme: AzerbaijanThemes.diplomatic, ...)
PlateCanvas(spec: AzerbaijanPlates.foreignCompany, theme: AzerbaijanThemes.foreignCompany, ...)
Afghanistan #
Eleven plate specs in five colour themes, and the one bilingual design here.
The serial is printed twice — iranian Arabic numerals over Latin figures — and
so is the vehicle class, as a Persian letter over its Latin code; each pair is
one stored value echoed by a PlateMirror, so they cannot drift apart.
car3/car4/car5— the private plate, at each serial lengthkabul6— Kabul only: a sixth figure, printed once in Persian between hyphenscycle3/cycle4— motorcycles and rickshaws, on their own shallower canvasdiplomatic— red field, hyphenated mission-and-serial number,CDgovernmental— black field; the class is a dash in both registersun— blue field, nothing at the headtemporary— issued from 2023; the one plate printed in two inksinternational— Herat's 2026 cross-border plate, Latin only
The eleven types (bus, taxi, lorry, private, duplicate, …) are mostly not
separate specs: the class is a single character on AfghanistanAlphabets.vehicleClass,
so a taxi is car5 with a 'T' and AfghanistanThemes.transport.
The block at the hoist end is the province, and it is the plate's PlateCountry
rather than part of its spec — name over the Darul Aman emblem over a
three-letter Latin code:
PlateCanvas(
spec: AfghanistanPlates.car5,
theme: AfghanistanThemes.civilian,
country: AfghanistanProvince.herat.country(),
)
PlateCanvas(
spec: AfghanistanPlates.diplomatic,
theme: AfghanistanThemes.diplomatic,
country: AfghanistanProvince.kabul.country(ink: AfghanistanPanelInk.light),
)
Armenia #
Ten plate specs in five colour themes, on a German-style face: the flag over
AM, a silver identifier band, and NN LL NNN told apart by gaps alone — no
hyphen and no divider.
car/carTwoRow/motorcycle— the private number, in its three sizespublic— the state number,NNN LL NN, with the groups the other way roundtrailer— a pre-2014 two-row design, one letter instead of twobus— black on yellow,NNNN L:Sfor a city bus,Lfor a coachdiplomatic/diplomaticArm— white on red; newer plates printARMforAMun— white on blue, three digits between two printed wordsmilitary— white on black, and the one Armenian plate with no Latin on it
Two things about Armenia are rules rather than shapes, and both are data here.
The letters. The four the system opened with in 1996 were Armenian letters
chosen for their shapes — Ս reads s and looks like U, Տ reads t and
looks like S, Օ reads ô and looks like O — so an Armenian read them as
Armenian and everyone else read them as Latin. The other twenty-two are plain
Latin, added in batches until 2019, and ArmeniaAlphabets.introduced has the
date of each. G and I are still issued to the Police and the Prosecutor's
office alone, so a private plate carries neither:
const ArmeniaPlateValidator().validate(entry); // 01 GG 234 → invalid
const ArmeniaPlateValidator(issuedYear: 2015).validate(e); // 01 JW 234 → invalid: J is 2018
The state plates. A public number's trailing LL NN is not a serial but an
institution — NN 01 the Security Council, GG 01 the General Prosecutor's
office, SS 01, SS 02 and SS 03 three different bodies sharing a letter
pair. That is a membership test, not a shape, so the table is
ArmeniaSpecialPlates and the validator just asks it.
The region is the first two digits of the number itself, never a panel, so
ArmeniaRegions is a lookup rather than a country block:
ArmeniaRegions.provinceFor('01'); // ArmeniaProvince.yerevan
ArmeniaRegions.provinceFor('90'); // null — an individual plate, showing no province
PlateCanvas(spec: ArmeniaPlates.car, theme: ArmeniaThemes.civilian, ...)
PlateCanvas(spec: ArmeniaPlates.military, theme: ArmeniaThemes.military, ...)
Tajikistan #
Nine plate specs in six colour themes, on a German-style face: the flag over
TJ, and NNNN LL NN told apart by gaps alone — no hyphen and no divider.
car/carTwoRow/motorcycle— the private number, in its three sizestrailer— a two-row design that leads with its region,NN LLoverNNNNpublicTransport— black on amber, the fixedTTprinted between serial and regionpolice— white on blue,NNNN L NNforeign— black on yellow,NNN L NNN, and no flag blockdiplomatic— white on red; the class isCD,CMD,D,TorSgovernmental— white on black, the old Russian-derived layout with the region boxed off andRTbeneath it
The letters. A Tajik plate's register is a Cyrillic one wearing Latin
shapes: the eleven letters whose Cyrillic and Latin forms coincide — А В Е К М Н О Р С Т Х — plus the four plain-Latin additions of 2014, D J Z Y. They
are stored and rendered in Latin, so there is nothing to transliterate.
The flag block sits on three differently coloured fields, so it is three
PlateCountry values — one per ink — and the region is the two-digit group of
the number itself, never a panel, so TajikistanRegions is a lookup:
TajikistanRegions.regionFor('01'); // TajikistanRegion.dushanbe
TajikistanRegions.isIssued('09'); // false — only 01–08 are issued
PlateCanvas(spec: TajikistanPlates.car, theme: TajikistanThemes.civilian, ...)
PlateCanvas(spec: TajikistanPlates.police, theme: TajikistanThemes.police, ...)
Usage #
Add iranshahr_plate to your pubspec.yaml:
dependencies:
iranshahr_plate: ^0.1.0
Import and use:
import 'package:iranshahr_plate/iranshahr.dart';
import 'package:plate_core/plate_core.dart';
PlateCanvas(
spec: BahrainPlates.eu,
theme: BahrainThemes.civilian,
height: 80,
)
Structure #
src/bahrain/— Bahraini plate specs, themes, colors, and country blocksrc/azerbaijan/— Azerbaijani plate specs, themes, colors, and country blocksrc/afghanistan/— Afghan plate specs, themes, colors, alphabets, and the province enumsrc/armenia/— Armenian plate specs, themes, colors, alphabets, the region lookup, the reserved-combination table, and the validatorsassets/flags/— SVG flag assetsassets/emblems/— the Darul Aman line art, in a dark and a light ink
The four countries' code is completely independent — no cross-imports, no shared constants.
Also available #
plate_core- Paint license plates.plate_alphabet- A library of alphabets for license plates.plate_keypad- A character picker for license plates.plate_number_holder- A frame to hold license plate numbers.algeria_plate- Algeria's licence plates.bolivia_plate- Bolivia's licence plates.colombia_plate- Colombia's licence plates.cuba_plate- Cuba's licence plates.germany_plate- Germany's licence plates.india_plate- India's licence plates.indonesia_plate- Indonesia's licence plates.iran_plate- Iran's licence plates.lebanon_plate- Lebanon's licence plates.malaysia_plate- Malaysia's licence plates.mali_plate- Mali's licence plates.niger_plate- Niger's licence plates.palestine_plate- Palestine's licence plates.sudan_plate- Sudan's licence plates.tunisia_plate- Tunisia's licence plates.venezuela_plate- venezuela_ licence plates.yemen_plate- Yemen's licence plates.