internal_testing library
Internal-testing surface for the demo Sizing Playground and diagnostics.
Not a stable public contract. These helpers run the SDK's own slot
resolution and text-capacity estimation so a demo/debug readout can't drift
from what production actually sends. The main package:koah_flutter/koah_flutter.dart
barrel does not export them; import this library explicitly.
Functions
-
koahPredictedTextCapacity(
{required int widthDp, required int heightDp, String? fontFamily, TextScaler? textScaler}) → int? -
The
textLength.maxbudget the SDK would send for acard_text_mdslot ofwidthDpxheightDp, quantized/capped exactly like the wire value, or null when no budget is sent (an axis is unbounded, or the slot is too small for a text budget).fontFamily/textScalershould match the slot's resolvedKoahThemefont and device text scale. -
koahResolvedLadderDp(
KoahAxisSize? axis, int? parentDp) → int? -
The logical-pixel bound the format ladder would see for one axis — the SDK's
own
resolveLadderDp, so a demo readout matches production.parentDpis the parent's finite max extent on this axis, or null when the parent leaves it unbounded (e.g. the scroll axis of a scroller). Returns null when nothing bounds the axis.