TemplateComponent class

Component of a WhatsApp message template.

Annotations

Constructors

TemplateComponent.new({required ComponentType type, String? subType, int? index, List<TemplateParameter> parameters = const []})
Creates a new template component.
const

Properties

hashCode int
The hash code for this object.
no setteroverride
index int?
Index of the component (used for buttons)
final
parameters List<TemplateParameter>
Parameters for the component
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
subType String?
Subtype of the component (optional)
final
type ComponentType
Type of the component
final

Methods

isValid() bool
Validates the component.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Converts the component to a JSON-serializable map.
toString() String
A string representation of this object.
inherited

Operators

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