removeRule method

bool removeRule(
  1. String id
)

Remove a rule by ID. Returns true if found.

Implementation

bool removeRule(String id) {
  final index = _rules.indexWhere((r) => r.id == id);
  if (index == -1) return false;
  _rules.removeAt(index);
  return true;
}