uploadAttachment method
Upload an attachment and get its token.
fileName: The original file namefilePath: Absolute path to the file on the devicemimeType: The MIME type of the file (e.g., "image/png")
Returns a ZendeskAttachment with the upload token.
Implementation
@override
Future<ZendeskAttachment?> uploadAttachment({
required String fileName,
required String filePath,
required String mimeType,
}) async {
final result = await methodChannel.invokeMethod<Map>(
'uploadAttachment',
{
'fileName': fileName,
'filePath': filePath,
'mimeType': mimeType,
},
);
if (result == null) return null;
return ZendeskAttachment.fromMap(Map<String, dynamic>.from(result));
}