addChoice method

void addChoice(
  1. String choice
)

Implementation

void addChoice(String choice) {
  List<String> newValues = [...state];
  newValues.add(choice);
  state = newValues;
}