GithubHelp home page GithubHelp logo

j-mary / country_state_city Goto Github PK

View Code? Open in Web Editor NEW

This project forked from paulpascal/country_state_city

0.0 0.0 0.0 2.77 MB

License: MIT License

Objective-C 0.47% Kotlin 1.54% Dart 92.98% Swift 5.01%

country_state_city's Introduction

country_state_city

version version

A flutter package to display list of world wide Countries, States and Cities. It also allows to get a list of States and Cities depends on given country (by ISO CODE).

How to Use

To use this Package, add country_state_city as a dependency in your pubspec.yaml.

        # import country_state_city package
        import 'package:country_state_city/country_state_city.dart';
        # Get all countries
        final countries = await getAllCountries();

        # Get all states that belongs to a country by country ISO CODE
        final states = await getStatesOfCountry('AF') # Afghanistan

APIs

Function Description
Future<List<Country>> getAllCountries() Get world wide countries list.
Future<Country?> getCountryFromCode(String countryCode) Get country from its ISO CODE
Future<List<State>> getAllStates() Get world wide states list.
Future<List<State>> getStatesOfCountry(String countryCode) Get the list of states that belongs to a country by the country ISO CODE
Future<State?> getStateByCode(String countryCode, String stateCode,) Get a state from its code and its belonging country code
Future<List<City>> getAllCities() If Get world wide cities list.
Future<List<City>> getStateCities(String countryCode, String stateCode) Get the list of states that belongs to a state by the state ISO CODE and the country ISO CODE
Future<List<City>> getCountryCities(String countryCode) Get the list of cities that belongs to a country by the country ISO CODE

Classes

Class Description
Country Handle country data such as: (name, isoCode, phoneCode, flag, currency, latitude, longitude, timezones)
State Handle state data such as: (name, countryCode, isoCode, latitude, longitude)
City Handle city data such as: (name, countryCode, stateCode, latitude, longitude)
Timezone Handle timezone data such as: (name, gmtOffset, gmtOffsetName, abbreviation, tzName)

Special Thanks to

country_state_city's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.