I want to return a Uint8List type in my custom function, but i cannot see a data type for this in custom action return type data types. Here's the custom function:
import 'package:file_picker/file_picker.dart';
Future<Uint8List?> pickFile() async {
// Add your function code here!
final FilePickerResult? result = await FilePicker.platform.pickFiles(
type: FileType.custom,
allowedExtensions: ['pdf', 'png', 'jpg', 'jpeg'],
);
if (result != null) {
return result.files.single.bytes; // Return the file path
}
return null;
}