setStateName method

void setStateName(
  1. String? stateName
)

Sets the selected state and resets the city selection.

Implementation

void setStateName(String? stateName) {
  emit(state.copyWith(selectedState: stateName, selectedCity: null));
}