MessagePayload class
Constructors
-
MessagePayload({String? type, required String message, String? yesLabel, String? noLabel, required List<
MessageHighlight> highlights, required List<MessageSection> sections, MessageCta? cta, List<ProductCard> products = const [], List<OfferItem> offers = const [], List<String> quickReplies = const [], bool selectProducts = false}) - MessagePayload.fromJson(dynamic raw, {dynamic fallbackProducts, dynamic fallbackOffers})
-
Parses a reply object.
factory
Properties
- cta → MessageCta?
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
highlights
→ List<
MessageHighlight> -
final
- message → String
-
final
- noLabel → String?
-
final
-
offers
→ List<
OfferItem> -
Offers the reply is about, sent alongside it as
offers_referenced.final -
products
→ List<
ProductCard> -
Products the reply is about, sent alongside it as
products_referenced.final -
quickReplies
→ List<
String> -
Short answers the visitor can tap instead of typing, sent as
quick_replies.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
sections
→ List<
MessageSection> -
final
- selectProducts → bool
-
Whether products should render a "Select" button, sent alongside them
as
select_products.final - type → String?
-
final
- yesLabel → String?
-
final
Methods
-
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.
inherited