updateGroupRule method
Update group rule.
Implementation
void updateGroupRule(int index, {int? limitSlot, String? alg, String? type, String? group}) {
final current = selected;
if (current == null) return;
draft ??= NmZoneDraft(current);
final rules = List<NmGroupRule>.of(draft!.working.groupRules);
if (index < 0 || index >= rules.length) return;
rules[index] = rules[index].copyWith(limitSlot: limitSlot, alg: alg, type: type, group: group);
draft!.working = draft!.working.copyWith(groupRules: rules);
notifyListeners();
}