removeFile method

int removeFile(
  1. FileWrapper file,
  2. {bool notify = true}
)

Programmatically removes files from the linked ZdsFilePicker.

Implementation

int removeFile(FileWrapper file, {bool notify = true}) {
  final int index = items.indexWhere((FileWrapper element) => element == file);
  if (index >= 0) {
    items.removeAt(index);
    if (notify) notifyListeners();
  }

  return index;
}