copyWith method

  1. @override
GenericModel copyWith({
  1. String? id,
  2. String? userId,
  3. bool? invalid,
  4. Object? data,
  5. DateTime? createdAt,
})
override

Copies an instance with the possibility of overriding certain fields.

Implementation

@override
GenericModel copyWith({String? id, String? userId, bool? invalid, Object? data, DateTime? createdAt}) => GenericModel.withDate(
  data ?? this.data,
  createdAt ?? this.createdAt,
  id: id ?? this.id,
  userId: userId ?? this.userId,
  invalid: invalid ?? this.invalid,
);