copyWith method

MessageData copyWith({
  1. String? type,
  2. dynamic payload,
})

Implementation

MessageData copyWith({String? type, dynamic payload}) {
  return MessageData(
    type: type ?? this.type,
    payload: payload ?? this.payload,
  );
}