copyWith method

ResponseModel copyWith({
  1. dynamic entity,
  2. dynamic error,
  3. bool? hasMore,
  4. String? message,
  5. int? status,
})

Creates a copy of the ResponseModel instance with the specified properties overridden.

Implementation

ResponseModel copyWith({
  dynamic entity,
  dynamic error,
  bool? hasMore,
  String? message,
  int? status,
}) {
  return ResponseModel(
    entity: entity ?? this.entity,
    error: error ?? this.error,
    hasMore: hasMore ?? this.hasMore,
    message: message ?? this.message,
    status: status ?? this.status,
  );
}