copyWith method

User copyWith({
  1. String? email,
  2. String? phone,
  3. String? provider,
  4. List<String>? roles,
  5. bool? isActive,
  6. dynamic lastLogin,
  7. String? application,
  8. DateTime? createdAt,
  9. DateTime? updatedAt,
  10. String? id,
})

Implementation

User copyWith({
  String? email,
  String? phone,
  String? provider,
  List<String>? roles,
  bool? isActive,
  dynamic lastLogin,
  String? application,
  DateTime? createdAt,
  DateTime? updatedAt,
  String? id,
}) {
  return User(
    email: email ?? this.email,
    phone: phone ?? this.phone,
    provider: provider ?? this.provider,
    roles: roles ?? this.roles,
    isActive: isActive ?? this.isActive,
    lastLogin: lastLogin ?? this.lastLogin,
    application: application ?? this.application,
    createdAt: createdAt ?? this.createdAt,
    updatedAt: updatedAt ?? this.updatedAt,
    id: id ?? this.id,
  );
}