testing library

Golden-test harness shared by every country package.

Import from a package's test/ only: it pulls in flutter_test.

Constants

plateGoldenFont → const String
The bold face every golden is drawn with, so the ink can be measured against the references (platekit golden-check).

Functions

plateGoldens(String prefix, PlateCountry? country, Map<String, PlateGoldenCase> cases, {List<String> fonts = const <String>[], String separator = ' ', Duration? decodeDelay}) → void
Registers one golden test per entry of cases, written to goldens/<prefix>_<key>.png and drawn on a 680×300 stage under country's panel (each spec's own country when null).
pumpPlateGolden(WidgetTester tester, PlateController controller, String golden, {PlateTheme? theme, bool scoped = true, PlateCountry? country, Size stage = const Size(680, 300), Duration? decodeDelay}) → Future<void>
Draws controller's plate centred on a stage-sized box, compares it with the golden file golden, then unmounts and disposes controller.

Typedefs

PlateGoldenCase = (PlateSpec, PlateTheme, String)
One golden: the spec, its theme, and a sample value with one plateGoldens separator-separated token per slot ('AB 1234', never 'A B 1 2 3 4'). An empty value leaves every slot blank.