flutter_country_state

A customizable Flutter package that displays all countries with there respective states.

Example

Please run the app in the Example folder

Installation

dependencies:
  flutter:
    sdk: flutter
  flutter_country_state:

You can also change the style of the text of list of the country and states

-searchHint

-substringBackground

-subStringStyle

-style

-searchStyle

selectedCountryBackgroundColor

notSelectedCountryBackgroundColor

selectedStateBackgroundColor

notSelectedStateBackgroundColor


Use It

This will display the countries; You can display the country and state either with bottom sheet or dialog

 ShowMyDialog(
searchHint: 'Search country',
substringBackground: Colors.green,
style: TextStyle(),
searchStyle: TextStyle(),
subStringStyle: TextStyle(),
selectedCountryBackgroundColor: Colors.orange,
notSelectedCountryBackgroundColor: Colors.white,
)

This will display the states of the country selected

StateDialog(
style: TextStyle(),
subStringStyle: TextStyle(),
substringBackground: Colors.blueAccent,
selectedStateBackgroundColor: Colors.orange,
notSelectedStateBackgroundColor: Colors.white,
),

Next goal

  • x Add countries flag
  • x Add countries code

Libraries

cty-list
flutter_country_state
state-list