GalleryAttachmentBuilder class

A widget builder for AttachmentType.image, AttachmentType.video and AttachmentType.giphy attachment types.

This builder will render a StreamGalleryAttachment widget when the message has more than one image or video or giphy attachment.

Inheritance

Constructors

GalleryAttachmentBuilder({ShapeBorder? shape, EdgeInsetsGeometry padding = const EdgeInsets.all(2), double spacing = 2, double runSpacing = 2, BoxConstraints constraints = _kDefaultGalleryConstraints, StreamAttachmentWidgetTapCallback? onAttachmentTap})
A widget builder for AttachmentType.image, AttachmentType.video and AttachmentType.giphy attachment types.
const

Properties

constraints BoxConstraints
The constraints to apply to the gallery attachment widget.
final
hashCode int
The hash code for this object.
no setterinherited
onAttachmentTap StreamAttachmentWidgetTapCallback?
The callback to call when the attachment is tapped.
final
padding EdgeInsetsGeometry
The padding to apply to the gallery attachment widget.
final
runSpacing double
How much space to place between the runs themselves in the cross axis.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
shape ShapeBorder?
The shape of the gallery attachment.
final
spacing double
How much space to place between children in a run in the main axis.
final

Methods

build(BuildContext context, Message message, Map<String, List<Attachment>> attachments) Widget
Builds a widget for the given message and attachments. This will only be called if canHandle returns true.
override
canHandle(Message message, Map<String, List<Attachment>> attachments) bool
Determines whether this builder can handle the given message and attachments. If this returns true, build will be called. Otherwise, the next builder in the list will be called.
override
debugAssertCanHandle(Message message, Map<String, List<Attachment>> attachments) bool
Asserts that this builder can handle the given message and attachments.
inherited
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