cv 1.1.15
cv: ^1.1.15 copied to clipboard
Content Values map helpers. Define objects that can be converted to/from maps.
1.1.15 #
- Documentation: getting started, which field to use, common mistakes, fuller example, dartdoc fixes
(
CvMapModelBase,encodedDateTime, multi fields), cv-models skill update - Fix
fromMapof fields made withwithParentdropping the values that need a conversion (int to double, string to int, models) CvMultiField.multiFromAnyValue(andfromMap) replaces the previous value whatever its sub field: a value left in another sub field no longer wins depending on the declaration orderCvFieldPath.fromStringreads back the parts holding a dot thattextencloses in backticks- Model
hashCodeno longer depends on the field order (equalCvMapModelwith keys in another order) cvTypeBuildModel,cvTypeNewModel,Map.cvTypeandList.cvTypework for the types registered withcvAddConstructors- A
CvListFieldof a nullable type can hold null items CvMapModelBase.fromMaphonorscolumnsbasicTypeToInt(and int fields) return null for NaN and infinity ('1e400') instead of throwingMap.deepClonekeeps the values of non string keysCvModelMapFieldskips the entries that are not maps instead of dropping the following ones
1.1.14 #
- Fix
CvModelTreeValue.setValuethrough a nested model into raw map/list levels (the value was not set) - An out of range or negative list index in a tree or field path returns not found / null instead of
throwing a
RangeError CvField/CvModelhashCodeis now consistent with==for list and map values (equal models now dedupe in sets), a model without fields (CvModelEmpty, emptyCvMapModel) no longer throwsCvFieldPath ==is now symmetric withCvTreePathfillModelMatchesMap(experimental) handles multi fields and recursive models likefillModel
1.1.13 #
- Fix
cv-modelsagent skill: make the null/partial map example self-contained
1.1.12 #
- Add
cv-modelsagent skill inskills/, installable withdart run skills@ get
1.1.11 #
- Add
CvColumnTypeExtension.isSupertypeOf<T>()andCvColumnTypeExtension.isSubtypeOf<T>()to check supertype/subtype inpackage:cv/utils/type_utils.dart - requires dart 3.12
1.1.9+1 #
- Add
CvField.encodedEnumto encode/decode enum values during toMap/fromMap - Add
CvField.encodedDateTimeto encode/decode enum values during toMap/fromMap
1.1.8 #
- Add
String.toMapOrNull(),String.toList()andString.toListOrNull()helpers
1.1.7 #
- Requires dart 3.9
1.1.6 #
- Add
CvModelMatcher,cvEqualsmatcher and helpers (compare, report)
1.1.5+3 #
- Add field and parts getter helper in CvModel (
cvTreeValueAtPath)
1.1.4+5 #
- Requires dart 3.7
- Fix test fill options to avoid StackOverflowError with recursive field
1.1.3 #
- Add
basicTypeToInt,basicTypeToBool,basicTypeToNumandbasicTypeToDoubleinutils/value_utils.dart - Add
cvAnyToJsonObjectandcvAnyToJsonArraytojson_utils.dart
1.1.1+1 #
- add
jsonPrettyEncode, toJsonPretty utility and extension on Map and List in cv_json
1.1.0+4 #
- add
keyPartsToStringandkeyPartsFromString - add helper
CvModel.valueAtPath(path)to get a model value at a given path. - Fixe clone issue with subclasses dispatch.
1.0.0+1 #
- Make it
1.0.0 - requires dart
3.4.0 - add default
CvMapModelbuilder - Fix basic list item safe conversion
0.2.20+1 #
- Add
Map.deepClone,List.deepCloneandObject.anyDeepClone.
0.2.19+1 #
- add
CvTreePathfield tree path helper. - add
basicTypeCast, basicTypeCastTypeutils inutils/value_utils.dart. - round double read as int instead of truncate.
0.2.18+1 #
- add
cvAddConstructors()andcvTypeAddBuilder() - add
anyAson Object to safely convert an object to any type - add
asModelon Map to cast a map to a model - add
asModelListon List to cast a list to a model list - add
clonetoCvModelto clone a model
0.2.17+2 #
- add
cvType()extensions - add
cvNewModel(),cvTypeNewModel(),cvNewModelList(),cvTypeNewModelList()helper - add
fieldAtPath()helper onCvModel - add
getKeyPathValue()helper onListandMap
0.2.16+2 #
- add
columnsargument inCvModel.copyFrom() - add
matchingColumns(),columnshelper onCvFields
0.2.15 #
- add
CvFieldstype asList<CvField<Object?>>.
0.2.14 #
- add
CvModelEmptyto be used as empty model
0.2.13 #
- add
CvField.encodedstatic function to encode a field content duringtoMap()/fromMap() - add
cvModelsAreEqualshelpers with optional columns selection to compare 2 models
0.2.12+1 #
- export
CvColumn - fix fill option for Model like for Map
0.2.11 #
- Dart 3 support
0.2.10 #
- fix sdk 2.19 analyzer crash
0.2.9+3 #
- Supports strict-casts
- requires sdk 2.18
0.2.8+1 #
- lazy initialize model list object in cvList.
0.2.7 #
- add support for map of CvModel (CvModelMapField)
0.2.6 #
- add jsonToMap and jsonToMapList json String helpers
0.2.5 #
- Requires dart 2.15
0.2.4+1 #
- feat add json helpers
0.2.3+1 #
- Allow nullable for
CvField.withValue, value being always set, even for null. - Fix
fillFieldfor genericListandMap
0.2.2 #
- Add
CvField.isNotNull,CvField.valueOrNull(getter and setter) andCvField.valueOrThrow(getter and setter)
0.2.1+1 #
- Add cv() as extension on List
0.2.0 #
- Fail when child/children builder are missing
0.1.3 #
- Initial version.