ModelUtils class

Constructors

ModelUtils()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

fromJsonColor(String? value, [int? defaultColor]) Color
fromJsonDateMillis(int? millis, [DateTime? defaultDateTime]) DateTime
fromJsonDateSecs(int? secs, [DateTime? defaultDateTime]) DateTime
fromJsonDecimalDouble(double? value, int? precision) Decimal
fromJsonDecimalInt(int? value, int? precision) Decimal
fromJsonListProducerMap<T>(dynamic value, {required T producer(Map<String, dynamic> e)}) List<T>
fromJsonNullableDateMillis(int? millis) DateTime?
fromJsonNullableDateSecs(int? secs) DateTime?
fromJsonNullableInt(dynamic value, {int? radix}) int?
fromJsonProducerMap<T>(dynamic value, {required T producer(Map<String, dynamic> e)}) → T?
fromJsonRawMap<T, U>(Map? value, {required T keyProducer(dynamic k), required U valueProducer(dynamic v)}) Map<T, U>
fromJsonSafeBool(dynamic value) bool
fromJsonSafeInt(dynamic value, {int defaultValue = 0, int? radix}) int
fromJsonSafeList<T>(dynamic value, {required T producer(dynamic e)}) List<T>
fromJsonSafeSet<T>(dynamic value, {required T producer(dynamic e)}) Set<T>
fromJsonSafeStringList(dynamic value) List<String>
fromJsonSafeStringSet(dynamic value) Set<String>
fromJsonSetProducerMap<T>(dynamic value, {required T producer(Map<String, dynamic> e)}) Set<T>
stringProducer(dynamic e) String
toMapColor(Color color) String
toMapDateMillis(DateTime dateTime) int
toMapDateSecs(DateTime dateTime) int
toMapDecimalDouble(Decimal decimal) double
toMapDecimalInt(Decimal decimal) int
toMapList<T extends AbstractModel<ID>, ID>(List<T> list) List<Map<String, dynamic>>
toMapListEnumByName<T extends Enum>(List<T> list) List<String>
toMapListEnumToString<T extends Enum>(List<T> list) List<String>
toMapModel<T extends AbstractModel<ID>, ID>(T? model) Map<String, dynamic>?
toMapNullableDateMillis(DateTime? dateTime) int?
toMapNullableDateSecs(DateTime? dateTime) int?
toMapSet<T extends AbstractModel<ID>, ID>(Set<T> set) Set<Map<String, dynamic>>
toMapSetEnumByName<T extends Enum>(Set<T> set) Set<String>
toMapSetEnumToString<T extends Enum>(Set<T> set) Set<String>
toSaveList<T extends AbstractModel<ID>, ID>(List<T>? list) List<Map<String, dynamic>>?
toSaveListMapOnlyId(List? list) → void
toSaveMapOnlyId(Map<String, dynamic>? map) → void
toSaveSet<T extends AbstractModel<ID>, ID>(Set<T>? set) Set<Map<String, dynamic>>?
toSaveSetMapOnlyId(Set? set) → void