fileAttachment static method

Widget fileAttachment(
  1. Attachment e, {
  2. void onFileTap(
    1. FileAttachment
    )?,
})

Returns a visual representation of the provided file-Attachment.

Implementation

static Widget fileAttachment(
  Attachment e, {
  void Function(FileAttachment)? onFileTap,
}) {
  return DataAttachment(
    e,
    onPressed: () {
      if (e is FileAttachment) {
        onFileTap?.call(e);
      }
    },
  );
}