Model class
Template class for encapsulating data.
Constructors
Properties
-
data
→ Map<
String, dynamic> -
Data encapsulated by the model.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → String
-
Id of the model. Should be unique.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- userId → String?
-
Optionnal: Id of the user who's owner of the data.
The id should be unique to each user.
final
Methods
-
copyWith(
{String? id, String? userId, Map< String, dynamic> ? data}) → Model - Copies an instance with the possibility of overriding certain fields.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> - Converts an instance to json.
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited