getStatesByCountryId method

Future<List<StateModel>> getStatesByCountryId(
  1. String countryId
)

Implementation

Future<List<StateModel>> getStatesByCountryId(String countryId) async {
  final states = await loadStates();
  return states.where((state) => state.countryId == countryId).toList();
}