FLUTTER ECOSYSTEM

cameronwebbable/us_states

राज्य नामों और संक्षिप्त रूपों के साथ काम करने के लिए सरल Dart पुस्तकालय।

us_states प्रोजेक्ट कवर
Stars
0
Forks
1
अंतिम पुश (UTC)
16 अप्रैल 2026
प्रोजेक्ट स्थिति
सक्रिय
Cameron Webb GitHub avatar
GITHUB User

Cameron Webb ↗

Webb EngineeringWaukee, Iowa
भाषाएँDart

इस रिपॉज़िटरी के पैकेज

उपयोग की गई निर्भरताएँ

निर्भरता सूची 3 आइटम

मूल README

यह अंग्रेज़ी मूल स्नैपशॉट है। नवीनतम सामग्री GitHub पर देखें।

README खोलें / बंद करें

us_states

Simple Dart library to deal with state names and abbreviations.

CircleCI

Installation

Add the following to dependencies section in your pubspec.yml:

  us_states: ^1.3.1

Usage

Note
  • All methods that take a string are case-insensitive. No need to adjust case before passing string into a method.
Get a state's name from an abbreviation

Returns null if not found.

USStates.getName("IA");
// returns "Iowa"
Get a state's abbreviation from name

Returns null if not found.

USStates.getAbbreviation("Iowa");
// returns "IA"
Get a list of all state names
USStates.getAllNames();
// returns ["Alaska", "Alabama", ...]
Get a list of all state abbreviations
USStates.getAllAbbreviations();
// returns ["AK", "AL", ...]
Get a map with state abbreviations as keys and names as values
USStates.getAbbreviationMap();
// returns {"AK": "Alaska", "AL": "Alabama", ...}
Get a map with state names as keys and abbreviations as values
USStates.getNameMap();
// returns {"Alaska": "AK", "Alabama": "AL", ...}