UserModel2 class

Mixed-in types

Constructors

UserModel2()

Properties

age int
getter/setter pair
grades List
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
isStudent bool
getter/setter pair
name String
getter/setter pair
role Role
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

hasKey(dynamic source, dynamic key) bool
Checks if the source contains the given key.
inherited
hasValue(dynamic source, dynamic key) bool
Checks if the source contains a non-null value for the given key.
inherited
isBool(dynamic value) bool
Checks if the given value is a boolean.
inherited
isDouble(dynamic value) bool
Checks if the given value is a double.
inherited
isInt(dynamic value) bool
Checks if the given value is an integer.
inherited
isList(dynamic value) bool
Checks if the given value is a list.
inherited
isMap(dynamic value) bool
Checks if the given value is a map.
inherited
isNum(dynamic value) bool
Checks if the given value is a numeric value (either int or double).
inherited
isString(dynamic value) bool
Checks if the given value is a string.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
parseModel(Map data) → void
readBool(dynamic source, dynamic key, {bool defaultValue = false}) bool
Reads a boolean value from the source, and if not found, returns the provided defaultValue.
inherited
readDouble(dynamic source, dynamic key, {double defaultValue = -1.0}) double
Reads a double value from the source, and if not found, returns the provided defaultValue.
inherited
readEnum<T extends Enum>(dynamic source, dynamic key, List<T> values, T defaultValue) → T
Reads an enumeration value from the source. If not found or in case of an error, it returns the provided defaultValue.
inherited
readInt(dynamic source, dynamic key, {int defaultValue = -1}) int
Reads an integer value from the source, and if not found, returns the provided defaultValue.
inherited
readList(dynamic source, dynamic key) List
Reads a list value from the source, and if not found, returns an empty list.
inherited
readMap(dynamic source, dynamic key) Map
Reads a map value from the source, and if not found, returns an empty map.
inherited
readNum(dynamic source, dynamic key, {num defaultValue = -1.0}) num
Reads a numeric value from the source, and if not found, returns the provided defaultValue.
inherited
readString(dynamic source, dynamic key, {String defaultValue = ''}) String
Reads a string value from the source, and if not found, returns the provided defaultValue.
inherited
readValue(dynamic source, dynamic key) Object?
Reads a value from the source, returning it if the source is a map, or null otherwise.
inherited
toString() String
A string representation of this object.
inherited
tryReadBool(dynamic source, dynamic key) bool?
Tries to read a boolean value from the source. If the value is not a boolean, it returns null.
inherited
tryReadDouble(dynamic source, dynamic key) double?
Tries to read a double value from the source. If the value is not a double, it returns null.
inherited
tryReadEnum<T extends Enum>(dynamic source, dynamic key, List<T> values) → T?
Tries to read an enumeration value from the source. If the value is a string that matches one of the provided values, it returns the corresponding enumeration value. If not found or in case of an error, it returns null.
inherited
tryReadInt(dynamic source, dynamic key) int?
Tries to read an integer value from the source. If the value is not an integer, it returns null.
inherited
tryReadList(dynamic source, dynamic key) List?
Tries to read a list value from the source. If the value is not a list, it returns null.
inherited
tryReadMap(dynamic source, dynamic key) Map?
Tries to read a map value from the source. If the value is not a map, it returns null.
inherited
tryReadNum(dynamic source, dynamic key) num?
Tries to read a numeric value from the source. If the value is not a number, it returns null.
inherited
tryReadString(dynamic source, dynamic key) String?
Tries to read a string value from the source. If the value is not a string, it returns null.
inherited

Operators

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