AttachmentFile class Null safety

The class that contains the information about an attachment file

Annotations

Constructors

AttachmentFile({required int? size, String? path, String? name, Uint8List? bytes})
Creates a new AttachmentFile instance.
AttachmentFile.fromJson(Map<String, dynamic> json)
Create a new instance from a json
factory

Properties

bytes Uint8List?
Byte data for this file. Particularly useful if you want to manipulate its data or easily upload to somewhere else.
@JsonKey(toJson: _toString, fromJson: _fromString), final
extension String?
File extension for this file.
read-only
hashCode int
The hash code for this object. [...]
read-only, inherited
mimeType MediaType?
The mime type of this file.
read-only
name String?
File name including its extension.
read-only
path String?
The absolute path for a cached copy of this file. It can be used to create a file instance with a descriptor for the given path. [...]
final
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
size int?
The file size in bytes.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toJson() Map<String, dynamic>
Serialize to json
toMultipartFile() Future<MultipartFile>
Converts this into a MultipartFile
toString() String
A string representation of this object. [...]
inherited

Operators

operator ==(Object other) bool
The equality operator. [...]
inherited