UserModel class Null safety

A model for a user.

Annotations

Constructors

UserModel({required int id, required String name, required String username, required String email, AddressModel? address, String? phone, String? website, CompanyModel? company})
Creates a user model.
const
factory
UserModel.fromJson(Map<String, dynamic> json)
Creates a user model from json.
factory

Properties

address → AddressModel?
read-only, inherited
company → CompanyModel?
read-only, inherited
copyWith → $UserModelCopyWith<UserModel>
@JsonKey(ignore: true), read-only, inherited
email → String
read-only, inherited
hashCode → int
The hash code for this object. [...]
read-only, inherited
id → int
read-only, inherited
name → String
read-only, inherited
phone → String?
read-only, inherited
runtimeType → Type
A representation of the runtime type of the object.
read-only, inherited
username → String
read-only, inherited
website → String?
read-only, inherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toJson() → Map<String, dynamic>
inherited
toString() → String
A string representation of this object. [...]
inherited

Operators

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