User class Null safety

Inheritance
Implemented types
Available Extensions
Annotations

Constructors

User({required String id, required String firstname, required String lastname, required String email, String? password = ''})
User.empty()

Properties

email String
Email address
final
firstname String
First name
final
hashCode int
The hash code for this object. [...]
read-only, inherited
id String
Primary identifier
@JsonKey(defaultValue: ''), @Sqlite(index: true, unique: true), final
isNewRecord bool
If true, this model has not yet been inserted into SQLite.
read-only, inherited
isValid bool
Is the current user a valid user
@Rest(ignore: true), @Sqlite(ignore: true), read-only
lastname String
Last name
final
password String?
Password
final
primaryKey int?
The fields needs to be overwritten, to keep it out of the json
@JsonKey(ignore: true), read / write, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

afterSave({Provider<Model>? provider, ModelRepository<Model>? repository}) Future<void>
Hook invoked after the model is successfully entered in the SQLite database. Useful to update or save associations.
inherited
beforeSave({Provider<Model>? provider, ModelRepository<Model>? repository}) Future<void>
Hook invoked before the model is successfully entered in the SQLite database. Useful to update or save associations.
inherited
copyWith({String? id, String? firstname, String? lastname, String? email, String? password}) User
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toJson() Json
Convert User instance to Json
override
toString() String
A string representation of this object. [...]
inherited

Operators

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

Static Methods

fromJson(Json json) → dynamic
Creates User from Json