toggleFolder method

void toggleFolder(
  1. String dirPath,
  2. String rootPath
)

Toggles folder expansion/collapse state

Implementation

void toggleFolder(String dirPath, String rootPath) {
  if (dirPath != rootPath) {
    _folderStates[dirPath] = !(_folderStates[dirPath] ?? false);
  }
  notifyListeners();
}