copyWith method

Message copyWith({
  1. PayloadType? type,
  2. String? payload,
  3. String? responseToken,
})

Use this to get modified message

Implementation

Message copyWith({
  final PayloadType? type,
  final String? payload,
  final String? responseToken,
}) =>
    Message(
      payload: payload ?? this.payload,
      type: type ?? this.type,
      responseToken: responseToken ?? this.responseToken,
    );