StatePickerUtils<T> constructor

StatePickerUtils<T>({
  1. required List<T> states,
  2. required String getCode(
    1. T
    ),
  3. required String getName(
    1. T
    ),
  4. required String getCapital(
    1. T
    ),
  5. required String getImagePath(
    1. T
    ),
})

Constructs a StatePickerHelper with the provided state data and helper functions.

  • states: A list of states or regions.
  • getCode: A function to extract the code of a state.
  • getName: A function to extract the name of a state.
  • getCapital: A function to extract the capital of a state.
  • getImagePath: A function to extract the image path of a state.

Implementation

StatePickerUtils({
  required this.states,
  required this.getCode,
  required this.getName,
  required this.getCapital,
  required this.getImagePath,
});