copyWith method

SmsMessage copyWith({
  1. String? id,
  2. String? phoneNumber,
  3. String? message,
  4. DateTime? timestamp,
  5. bool? isSent,
  6. String? error,
})

Implementation

SmsMessage copyWith({
  String? id,
  String? phoneNumber,
  String? message,
  DateTime? timestamp,
  bool? isSent,
  String? error,
}) {
  return SmsMessage(
    id: id ?? this.id,
    phoneNumber: phoneNumber ?? this.phoneNumber,
    message: message ?? this.message,
    timestamp: timestamp ?? this.timestamp,
    isSent: isSent ?? this.isSent,
    error: error ?? this.error,
  );
}