LinkAttachment constructor

LinkAttachment({
  1. required String name,
  2. required Uri url,
  3. String? mimeType,
})

Creates a LinkAttachment with the given name and URL.

name is the name of the link attachment. url is the URI of the link.

Implementation

LinkAttachment({required super.name, required this.url, String? mimeType})
  : mimeType =
        mimeType ?? lookupMimeType(url.path) ?? 'application/octet-stream';