model_factory library
Classes
- BoolJsonAdapter
- DateTimeJsonAdapter
- DeserializationInfo
- DoubleJsonAdapter
- GetIt
- Very simple and easy to use service locator You register your object creation factory or an instance of an object with registerFactory, registerSingleton or registerLazySingleton And retrieve the desired object using get or call your locator as function as its a callable class Additionally GetIt offers asynchronous creation functions as well as functions to synchronize the async initialization of multiple Singletons
- IntJsonAdapter
-
JsonAdapter<
T> -
JsonConverter<
T> -
JsonField<
T> - JsonIgnore
-
JsonKey<
T> - JsonRegistrant
- JsonSerializable
-
ListJsonAdapter<
T> - MapJsonAdapter
- SerializationInfo
- StringJsonAdapter
Functions
-
convertFromJson<
E> (dynamic value, [dynamic defaultValue, bool useConverters = true]) → E -
convertToJson(
dynamic value, [bool useConverter = true, dynamic toJson(dynamic object)?]) → dynamic -
modelDecode<
T> (dynamic data) → T -
registerDefaultValue(
Map< Type, dynamic> values) → void -
registerJsonConverter<
E> (JsonConverter< E> converter) → void -
registerJsonFactory<
E> (JsonFactory< E> builder) → void -
registerToJson<
E> (dynamic toJson(dynamic value)) → void -
tryConvertFromJson<
T> (JsonConverter< T> converter, dynamic value, [dynamic defaultValue]) → T -
tryConvertToJson<
T> (JsonConverter< T> converter, T model) → dynamic
Typedefs
-
JsonFactory<
E> = E Function(dynamic value)