StreamGalleryAttachment constructor

const StreamGalleryAttachment({
  1. Key? key,
  2. required List<Attachment> attachments,
  3. required Message message,
  4. ShapeBorder? shape,
  5. BoxConstraints constraints = const BoxConstraints(),
  6. double spacing = 2.0,
  7. double runSpacing = 2.0,
  8. required IndexedWidgetBuilder itemBuilder,
})

Constructs a gallery of images, videos, and gifs from a list of attachments.

This widget uses a FlexGrid to display the attachments in a grid format. The grid will automatically resize based on the size of the attachment.

Implementation

const StreamGalleryAttachment({
  super.key,
  required this.attachments,
  required this.message,
  this.shape,
  this.constraints = const BoxConstraints(),
  this.spacing = 2.0,
  this.runSpacing = 2.0,
  required this.itemBuilder,
});