UserModel constructor

const UserModel({
  1. required int id,
  2. required String firstName,
  3. required String lastName,
  4. required String email,
  5. required bool isNotificationsEnabled,
  6. String? profileImageUrl,
  7. DateTime? emailVerifiedAt,
  8. DateTime? createdAt,
  9. DateTime? updatedAt,
})

Creates a user model with the given field values.

All identity and contact fields are required. Optional fields default to null. For constructing instances from API responses, prefer tryFromJson.

Implementation

const UserModel({
  required this.id,
  required this.firstName,
  required this.lastName,
  required this.email,
  required this.isNotificationsEnabled,
  this.profileImageUrl,
  this.emailVerifiedAt,
  this.createdAt,
  this.updatedAt,
});