Model class abstract

Model class handles your Data

Inheritance
Mixed-in types

Constructors

Model(Map<String, dynamic> data)
Model Constructor

Properties

baseFields List<String>
Not remove id ad least.
final
defaultCollection String
no setter
hashCode int
The hash code for this object.
no setterinherited
hiddenFields List<String>
You can define your hidden fields here and trim them when requesting Model Data
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
validator List<String>
Required Fields will be checked in validation
no setterinherited

Methods

delete({String? collectionId}) Future<bool>
getBoolValue(String key, {bool defaultValue = false}) bool
Return Bool Value from Data
inherited
getCreatedAt() int
Returns Creation Date
getData() Map<String, dynamic>
inherited
getDoubleValue(String key, {double defaultValue = 0}) double
Return Double Value from Data
inherited
getId() String
Return Model id
getIntValue(String key, {int defaultValue = 0}) int
Return Int Value from Data
inherited
getModelData({bool applyHiddenFields = false}) Map<String, dynamic>
Returns Model Data With Options
getOnly(List<String> keys) Map<String, dynamic>
Returns Map with specified Keys in List<String> keys
inherited
getStringValue(String key, {String defaultValue = ''}) String
Return String Value from Data
inherited
getUpdatedAt() int
Returns Update Date
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
save({String? collectionId}) Future<bool>
setData(Map<String, dynamic> data) → dynamic
Set Data
inherited
setValue(String key, dynamic value) → dynamic
Set Value in Data
inherited
toCacheObject() CacheObject
override
toString() String
A string representation of this object.
inherited
validate({List<String>? optionalValidator}) bool
Validates Data
override

Operators

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

Static Methods

all<T extends CollectionController<Model>>(String collectionId) Map<String, Model>