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.max budget the SDK would send for a card_text_md slot of widthDp x heightDp, 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/textScaler should match the slot's resolved KoahTheme font 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. parentDp is 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.