GenericModel class
Constructors
- GenericModel(Object data, {String id = "", String userId = ""})
- GenericModel.fromModel(Model model)
- GenericModel.withDate(Object data, DateTime createdAt, {String id = "", String userId = "", bool invalid = false})
-
const
Properties
- createdAt → DateTime
-
final
- data → Object
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → String
-
Model's id.
finalinherited
- invalid → bool
-
True if the model is marked as invalid, and it's data should be ignored.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- userId → String
-
The model's user id.
finalinherited
Methods
-
copyWith(
{String? id, String? userId, bool? invalid, Object? data, DateTime? createdAt}) → GenericModel -
Copies an instance with the possibility of overriding certain fields.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toModel(
) → Model -
Converts the instance to a Model.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited