clearSelection method

void clearSelection(
  1. TreeNode option
)

clear specific selected option TreeSelectController is used to clear specific selected option.

Implementation

void clearSelection(TreeNode option) {
  if (!value._selectedOptions
      .any((item) => item.code == option.code && item.name == option.name)) {
    return;
  }
  value._selectedOptions.removeWhere(
      (item) => item.code == option.code && item.name == option.name);
  notifyListeners();
}