Skip to main content

iranshahr_plate 0.1.0 copy "iranshahr_plate: ^0.1.0" to clipboard
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 length
  • kabul6 — Kabul only: a sixth figure, printed once in Persian between hyphens
  • cycle3 / cycle4 — motorcycles and rickshaws, on their own shallower canvas
  • diplomatic — red field, hyphenated mission-and-serial number, CD
  • governmental — black field; the class is a dash in both registers
  • un — blue field, nothing at the head
  • temporary — issued from 2023; the one plate printed in two inks
  • international — 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 sizes
  • public — the state number, NNN LL NN, with the groups the other way round
  • trailer — a pre-2014 two-row design, one letter instead of two
  • bus — black on yellow, NNNN L: S for a city bus, L for a coach
  • diplomatic / diplomaticArm — white on red; newer plates print ARM for AM
  • un — white on blue, three digits between two printed words
  • military — 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 sizes
  • trailer — a two-row design that leads with its region, NN LL over NNNN
  • publicTransport — black on amber, the fixed TT printed between serial and region
  • police — white on blue, NNNN L NN
  • foreign — black on yellow, NNN L NNN, and no flag block
  • diplomatic — white on red; the class is CD, CMD, D, T or S
  • governmental — white on black, the old Russian-derived layout with the region boxed off and RT beneath 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 block
  • src/azerbaijan/ — Azerbaijani plate specs, themes, colors, and country block
  • src/afghanistan/ — Afghan plate specs, themes, colors, alphabets, and the province enum
  • src/armenia/ — Armenian plate specs, themes, colors, alphabets, the region lookup, the reserved-combination table, and the validators
  • assets/flags/ — SVG flag assets
  • assets/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 #

2
likes
120
points
351
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

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, Afghan, Armenian, Tajik, Kuwaiti, Qatari, Iraqi and Emirati plate specs.

Homepage

License

BSD-3-Clause (license)

Dependencies

flutter, plate_alphabet, plate_core

More

Packages that depend on iranshahr_plate