Checks if a folder is expanded or collapsed
bool isUnfolded(String dirPath, String rootPath) => dirPath == rootPath ? _folderStates[rootPath] = isParentOpen : (_folderStates[dirPath] ?? false);