ChannelResponse class
Response to send to a channel.
Constructors
-
ChannelResponse({required ConversationKey conversation, required String type, String? text, List<
Map< ? blocks, List<String, dynamic> >ChannelAttachment> ? attachments, String? replyTo, Map<String, dynamic> ? options}) -
const
-
ChannelResponse.fromJson(Map<
String, dynamic> json) -
Create from JSON.
factory
-
ChannelResponse.rich({required ConversationKey conversation, required List<
Map< blocks, String? text, String? replyTo, Map<String, dynamic> >String, dynamic> ? options}) -
Create a rich response with blocks.
factory
-
ChannelResponse.text({required ConversationKey conversation, required String text, String? replyTo, Map<
String, dynamic> ? options}) -
Create a text response.
factory
Properties
-
attachments
→ List<
ChannelAttachment> ? -
Attachments to send.
final
-
blocks
→ List<
Map< ?String, dynamic> > -
Rich content blocks (for platforms that support them).
final
- conversation → ConversationKey
-
Target conversation.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
options
→ Map<
String, dynamic> ? -
Platform-specific options.
final
- replyTo → String?
-
Reply to a specific message ID.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- text → String?
-
Text content.
final
- type → String
-
Response type (text, rich, file, etc.).
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> - Convert to JSON.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited