v1.3.1
us_states
Simple Dart library to deal with state names and abbreviations.
12Likes 6.3K30-day downloads160Pub points
AndroidiOSWebmacOSWindowsLinux
Simple Dart library to deal with state names and abbreviations.
^1.15.0^1.21.0^6.0.0English project snapshot. Visit GitHub for the latest content.
Simple Dart library to deal with state names and abbreviations.
Add the following to dependencies section in your pubspec.yml:
us_states: ^1.3.1
Returns null if not found.
USStates.getName("IA");
// returns "Iowa"
Returns null if not found.
USStates.getAbbreviation("Iowa");
// returns "IA"
USStates.getAllNames();
// returns ["Alaska", "Alabama", ...]
USStates.getAllAbbreviations();
// returns ["AK", "AL", ...]
USStates.getAbbreviationMap();
// returns {"AK": "Alaska", "AL": "Alabama", ...}
USStates.getNameMap();
// returns {"Alaska": "AK", "Alabama": "AL", ...}