MessageDraft class

A message composed locally by the customer that has not (yet) been successfully delivered to the server.

Attached to SendFailure so the caller can retry transmission without re-collecting user input.

Annotations
  • @immutable

Constructors

MessageDraft({required String body, Map<String, dynamic> metadata = const {}})
Creates a MessageDraft.
const

Properties

body String
The plain-text body the user typed.
final
hashCode int
The hash code for this object.
no setteroverride
metadata Map<String, dynamic>
Arbitrary merchant-supplied metadata to attach to the eventual Message.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

copyWith({String? body, Map<String, dynamic>? metadata}) MessageDraft
Returns a copy with the given fields overridden.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
override