removeOption method
Implementation
@override
int removeOption(String templateId, String optionId) {
int actionIndex = -1;
if (optionsMap[templateId] != null) {
int? optionIndex = optionsMap[templateId]
?.indexWhere((element) => (element.id == optionId));
if (optionIndex != null && optionIndex != -1) {
optionsMap[templateId]!.removeAt(optionIndex);
actionIndex = optionIndex;
update();
}
}
return actionIndex;
}