AttachmentFile constructor

AttachmentFile({
  1. String? path,
  2. String? name,
  3. Uint8List? bytes,
  4. int? size,
})

Builds an AttachmentFile.

Implementation

AttachmentFile({
  this.path,
  this.name,
  this.bytes,
  this.size,
})  : assert(
        path != null || bytes != null,
        'Either path or bytes should be != null',
      ),
      assert(
        !CurrentPlatform.isWeb || bytes != null,
        'File by path is not supported in web, Please provide bytes',
      );