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
-
- Object
- StreamAttachmentWidgetBuilder
- GalleryAttachmentBuilder
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< attachments) → WidgetAttachment> > -
Builds a widget for the given
message
andattachments
. This will only be called if canHandle returnstrue
.override -
canHandle(
Message message, Map< String, List< attachments) → boolAttachment> > -
Determines whether this builder can handle the given
message
andattachments
. If this returnstrue
, build will be called. Otherwise, the next builder in the list will be called.override -
debugAssertCanHandle(
Message message, Map< String, List< attachments) → boolAttachment> > -
Asserts that this builder can handle the given
message
andattachments
.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