copyWith method

RealtimeMessage copyWith({
  1. List<String>? events,
  2. Map<String, dynamic>? payload,
  3. List<String>? channels,
  4. String? timestamp,
})

Returns a copy of this RealtimeMessage with specified attributes overridden.

Implementation

RealtimeMessage copyWith({
  List<String>? events,
  Map<String, dynamic>? payload,
  List<String>? channels,
  String? timestamp,
}) {
  return RealtimeMessage(
    events: events ?? this.events,
    payload: payload ?? this.payload,
    channels: channels ?? this.channels,
    timestamp: timestamp ?? this.timestamp,
  );
}