copyWith method

Admin copyWith({
  1. String? name,
  2. String? email,
  3. String? id,
  4. DateTime? birthDay,
  5. DateTime? createdDate,
  6. AccountState? userState,
  7. Gender? gender,
  8. Type? type,
  9. String? avatar,
  10. CustomLocation? loc,
  11. String? phoneNumber,
  12. List<Car>? cars,
  13. String? address,
  14. Map<String, bool>? accessPrivilege,
})

Implementation

Admin copyWith({
  String? name,
  String? email,
  String? id,
  DateTime? birthDay,
  DateTime? createdDate,
  AccountState? userState,
  Gender? gender,
  Type? type,
  String? avatar,
  CustomLocation? loc,
  String? phoneNumber,
  List<Car>? cars,
  String? address,
  Map<String, bool>? accessPrivilege,
}) =>
    Admin(
      name: name ?? this.name,
      email: email ?? this.email,
      id: id ?? this.id,
      birthDay: birthDay ?? this.birthDay,
      createdDate: createdDate ?? this.createdDate,
      userState: userState ?? this.userState,
      gender: gender ?? this.gender,
      type: type ?? this.type,
      avatar: avatar ?? this.avatar,
      loc: loc ?? this.loc,
      phoneNumber: phoneNumber ?? this.phoneNumber,
      address: address ?? this.address,
      accessPrivilege: accessPrivilege ?? this.accessPrivilege,
    );