models library Null safety

Classes

EngineModel
A model of an entity within the engine. [...]
EngineModelController<T extends EngineModel>
Controller responsible for updating a single model [...]
IApiEndpoint
Identifiable<ID_TYPE>
A base class for other classes to ensure that they specify an identifier
IName
JsonConverter<T, S>
Implement this class to provide custom converters for a specific Type. [...]
JsonKey
An annotation used to specify how a field is serialized.
JsonLiteral
An annotation used to generate a private field containing the contents of a JSON file. [...]
JsonSerializable
An annotation used to specify a class to generate code for.
JsonValue
An annotation used to specify how a enum value is serialized.
ModelController<T, STORAGE extends SimpleStorage>
Controller responsible for updating a single model [...]
ModelControllerListener<CONTROLLER extends ModelController<dynamic, SimpleStorage>, MODEL>
Listener for a model controller update [...]
ToJson
A class that can be rendered as a json object

Functions

$checkedConvert<T>(Map map, String key, T castFunc(dynamic)) → T
Helper function used in generated code when JsonSerializableGenerator.checked is true. [...]
$checkedNew<T>(String className, Map map, T constructor(), {Map<String, String>? fieldKeyMap}) → T
Helper function used in generated code when JsonSerializableGenerator.checked is true. [...]
$checkKeys(Map map, {List<String>? allowedKeys, List<String>? requiredKeys, List<String>? disallowNullValues}) → void
Helper function used in generated fromJson code when JsonSerializable.disallowUnrecognizedKeys is true for an annotated type or JsonKey.required is true for any annotated fields. [...]

Typedefs

Json = Map<String, dynamic>
A map with string keys

Exceptions / Errors

BadKeyException
A base class for exceptions thrown when decoding JSON.
CheckedFromJsonException
Exception thrown if there is a runtime exception in fromJson code generated when JsonSerializableGenerator.checked is true
DisallowedNullValueException
Exception thrown if there are keys with disallowed null values in a JSON map that was provided during deserialization.
MissingRequiredKeysException
Exception thrown if there are missing required keys in a JSON map that was provided during deserialization.
UnrecognizedKeysException
Exception thrown if there are unrecognized keys in a JSON map that was provided during deserialization.