NUIMiniProgramFile constructor
NUIMiniProgramFile({})
Implementation
NUIMiniProgramFile({required this.filename, String? bytesString, required this.extensions, Uint8List? bytes}){
assert(bytesString != null || bytes != null, "Either bytesString or bytes must be provided");
// If the bytes is provided, convert the bytes from [Uint8List] into base64 to before message transfer
if(bytes != null) {
try {
bytesString = base64.encode(bytes);
} catch (e, s) {
print("[NUIMiniProgramMessage] Failed to base64 encode bytes to bytes string with error: $e, stack: $s");
}
}
}