cv_json library Null safety

ContentValue Json helpers.

Classes

CvField<T>
Basic CvField
CvFillOptions
Fill options for unit tests
CvListField<T>
Nested list of raw values
CvMapModel
Modifiable map.
CvModel
Model to access the data
CvModelBase
Base content class
CvModelField<T extends CvModel>
Nested model
CvModelListField<T extends CvModel>
Nested list, where each value is of type T
CvModelMapField<T extends CvModel>
Nested map where each value is of type T, (key is a string)

Extensions

CvFieldListExt
Utilities
CvFieldUtilsExt
Field utils.
CvJsonModelExt
Easy CvModel extension
CvJsonModelListExt
Easy CvModelList extension
CvJsonStringExt
Easy string extension
CvListFieldUtilsExt
Fill helpers
CvMapExt
Easy extension
CvMapListExt
Easy extension
CvModelFieldUtilsExt
Field extension utilities
CvModelListExt
List
CvModelMapFieldUtilsExt
Fill helpers
CvModelUtilsExt
Test fill model utilities.
ModelExt
Convenient extension on Model
ModelListExt
Convenient extension on Model

Functions

asModel(Map map) Model
Cast the map if needed.
asModelList(Iterable list) ModelList
Cast the list if needed.
cvAddBuilder<T extends CvModel>(CvModelBuilderFunction<T> builder) → void
Add builder that uses builder function
cvAddConstructor<T extends CvModel>(CvModelDefaultBuilderFunction<T> builder) → void
Add convenient constructor tear-off
cvBuildModel<T extends CvModel>(Map contextData, {T builder(Map contextData)?}) → T
Build a model but does not import the data.
cvModelField<T extends CvModel>(String name) CvModelField<T>
Auto field
cvModelListField<T extends CvModel>(String name) CvModelListField<T>
Auto field
cvTypeBuildModel<T extends CvModel>(Type type, Map contextData, {T builder(Map contextData)?}) → T
Build a model but does not import the data.
cvValuesAreEqual(dynamic v1, dynamic v2) bool
If 2 values are equals, entering nested list/map if any.
NewModel() Model
Create a new model - prefer newModel()
@Deprecated('Use newModel()')
newModel() Model
Create a new model
newModelList() ModelList
Create a new model list

Typedefs

CvBuilderFunction<T> = T Function(Map contextData)
Builder function definition
CvModelBuilderFunction<T> = T Function(Map contextData)
A model builder function should only build the model but should not fill it with the data.
CvModelDefaultBuilderFunction<T> = T Function()
A model default builder takes no arguments and only create the object without context.
Model = Map<K, V?>
Model type
ModelEntry = MapEntry<K, V?>
Model entry
ModelList = List<Model>
Model list type

Exceptions / Errors

CvBuilderException
CvBuilder exception.