copyWith method
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,
);