A simple Dart library to convert state names to abbreviations and vice-versa
Add the following to dependencies
section in your pubspec.yml:
states_and_ut_india: ^1.0.1
- All methods that take a string are case-insensitive.
Returns empty string if not found.
INStates.getAbbreviation("Karnataka");
// returns "KA"
Returns empty string if not found.
INStates.getName("KA");
// returns "Karnataka"
INStates.getAllAbbreviationsList();
// returns ["AP", "AN", ...]
INStates.getAllStateNamesList();
// returns ["Andhra Pradesh", "Andaman and Nicobar Islands", ...]
INStates.getAbbreviationMap();
// returns {"AP": "Andhra Pradesh", "AN": "Andaman and Nicobar Islands", ...}
INStates.getNameMap();
// returns {"Andhra Pradesh": "AP", "Andaman and Nicobar Islands": "AN", ...}
- This app is inspired by us_states.