M class

An abstract holding class defining shorthands for the constructors of each model defined in this library.

These contractions are useful for keeping definitions of ImmutableModel's concise.

Meanings:

  • enm: Enum
  • bl: Boolean
  • nt: Integer
  • dbl: Double
  • dt: DateTime
  • str: String
  • txt: Text

Constructors

M()

Properties

hashCode int
The hash code for this object.
read-onlyinherited
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent 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

bl({bool initial}) ModelBool
Returns a ModelBool
blList({List<bool> initial = const <bool>[]}) ModelBoolList
Returns a ModelBoolList
dbl({double initial, ModelValueValidator<double> validator}) ModelDouble
Returns a ModelDouble
dblList({List<double> initial = const <double>[], ModelListItemValidator<double> itemValidator}) ModelDoubleList
Returns a ModelDoubleList
dt({DateTime initial, ModelValueValidator<DateTime> validator}) ModelDateTime
Returns a ModelDateTime
dtList({List<DateTime> initial = const <DateTime>[], ModelListItemValidator<DateTime> itemValidator}) ModelDateTimeList
Returns a ModelDateTimeList
email({String defaultEmail}) ModelEmail
Returns a ModelEmail
enm<E>({List<E> enumValues, E initial}) ModelEnum<E>
Returns a ModelEnum
enmList<E>({List<E> enumValues, List<E> initial}) ModelEnumList<E>
imList({ImmutableModel model, List<Map<String, dynamic>> initialValues = const <Map<String, dynamic>>[]}) ModelInnerList
Returns a ModelInnerList using an ImmutableModel
inList({ModelInner innerModel, List<Map<String, dynamic>> initialValues = const <Map<String, dynamic>>[]}) ModelInnerList
Returns a ModelInnerList
inner(Map<String, ModelType<ModelType, dynamic>> modelMap, {ModelMapValidator modelValidator, bool strictUpdates = false}) ModelInner
Returns a ModelInner
mvList<M extends ModelValue<M, dynamic>>({M defaultModel, List initialValues = const []}) ModelValueList<M>
Returns a ModelValueList
nt({int initial, ModelValueValidator<int> validator}) ModelInt
Returns a ModelInt
ntList({List<int> initial = const <int>[], ModelListItemValidator<int> itemValidator}) ModelIntList
Returns a ModelIntList
password() ModelPassword
Returns a ModelPassword
str({String initial, ModelValueValidator<String> validator}) ModelString
Returns a ModelString
strList({List<String> initial = const <String>[], ModelListItemValidator<String> itemValidator}) ModelStringList
Returns a ModelStringList
txt({String initial, ModelValueValidator<String> validator}) ModelString
Returns a ModelString