models/util/json_warnings library

Properties

jsonModelWarningSink ↔ void Function(String message())
Where model warnings go; tests swap it to read them.
getter/setter pair

Functions

resetJsonModelWarnings() → void
Forgets which warnings were shown, so each test starts clean.
warnUnreadable(Object model, String key, Object? raw, Type expected, {Object? error}) → void
In debug builds, warns once per model type and key that raw exists but couldn't be read as expected.