copyWith method

AppRequest copyWith({
  1. String? id,
  2. String? from,
  3. String? to,
  4. String? collectiveId,
  5. String? eventId,
  6. String? positionRequestedId,
  7. int? createdTime,
  8. int? expiresAt,
  9. EventOffer? newOffer,
  10. String? message,
  11. bool? unread,
  12. Instrument? instrument,
  13. double? percentageCoverage,
  14. int? distanceKm,
  15. RequestDecision? requestDecision,
  16. GameRequestType? gameRequestType,
})

Implementation

AppRequest copyWith({
  String? id,
  String? from,
  String? to,
  String? collectiveId,
  String? eventId,
  String? positionRequestedId,
  int? createdTime,
  int? expiresAt,
  EventOffer? newOffer,
  String? message,
  bool? unread,
  Instrument? instrument,
  double? percentageCoverage,
  int? distanceKm,
  RequestDecision? requestDecision,
  GameRequestType? gameRequestType,
}) {
  return AppRequest(
    id: id ?? this.id,
    from: from ?? this.from,
    to: to ?? this.to,
    collectiveId: collectiveId ?? this.collectiveId,
    eventId: eventId ?? this.eventId,
    positionRequestedId: positionRequestedId ?? this.positionRequestedId,
    createdTime: createdTime ?? this.createdTime,
    expiresAt: expiresAt ?? this.expiresAt,
    newOffer: newOffer ?? this.newOffer,
    message: message ?? this.message,
    unread: unread ?? this.unread,
    instrument: instrument ?? this.instrument,
    percentageCoverage: percentageCoverage ?? this.percentageCoverage,
    distanceKm: distanceKm ?? this.distanceKm,
    requestDecision: requestDecision ?? this.requestDecision,
    gameRequestType: gameRequestType ?? this.gameRequestType,
  );
}