openFilePicker method
Opens the file picker and adds the selected files to _list.
See also:
FilePicker.platform.pickFiles
Implementation
Future<void> openFilePicker() async {
FilePickerResult? result = await FilePicker.platform.pickFiles(
allowMultiple: true, // Allow selecting multiple files
);
if (result != null) {
_list.addAll(result.xFiles);
}
}