Uint8List Return Type in custom action

Custom Code

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;

}

What have you tried so far?

Tried Uploaded file as return type

Did you check FlutterFlow's Documentation for this topic?
Yes
5 replies