Modelable class abstract

Interface that can transform a class into a Model.

Implementers
Annotations

Constructors

Modelable({String id = "", String userId = "", bool invalid = false})
Creates a new modelable instance.
const
Modelable.fromModel(Model model)
Creates an instance from a Model.
Modelable.invalid()
Creates a new instance and marks it as invalid.
const

Properties

hashCode int
The hash code for this object.
no setterinherited
id String
Model's id.
final
invalid bool
True if the model is marked as invalid, and it's data should be ignored.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
userId String
The model's user id.
final

Methods

copyWith({String? id, String? userId, bool? invalid = false}) Modelable
Copies an instance with the possibility of overriding certain fields.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toModel() Model
Converts the instance to a Model.
toString() String
A string representation of this object.
inherited

Operators

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