country_state_city_pro 0.0.2 copy "country_state_city_pro: ^0.0.2" to clipboard
country_state_city_pro: ^0.0.2 copied to clipboard

outdated

A new Flutter package to get world's all of Country, State, and City. And items are also searchable. In addition if city can't be found then user manually write city on dialog window.

0.0.2 #

Platforms: #

This widget has been successfully tested on iOS, Android and Chrome.

Screenshots #

Outlook Country Dialog
image info image info
Country Searching State Dialog
image info image info
City Dialog Final Data
image info image info

Usage #

CountryStateCityPicker(
                country: country,
                state: state,
                city: city,
                textFieldInputBorder: UnderlineInputBorder(),
            ),

Example Code #

import 'package:flutter/material.dart';
import 'package:country_state_city/country_state_city_picker.dart';

void main() {
  runApp(MyApp());
}
class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Country->State->City',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: HomePage(),
    );
  }
}

class HomePage extends StatefulWidget {
  @override
  _HomePageState createState() => _HomePageState();
}
class _HomePageState extends State<HomePage> {
  TextEditingController country=TextEditingController();
  TextEditingController state=TextEditingController();
  TextEditingController city=TextEditingController();
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('Country->State->City'),
      ),
      body: Padding(
          padding: EdgeInsets.all(15.0),
          child: Column(
            children: [
              CountryStateCityPicker(
                country: country,
                state: state,
                city: city,
                textFieldInputBorder: UnderlineInputBorder(),
              ),
              SizedBox(height: 20),

              Text("${country.text}, ${state.text}, ${city.text}")
            ],
          )
      ),
    );
  }
}
54
likes
0
pub points
92%
popularity

Publisher

unverified uploader

A new Flutter package to get world's all of Country, State, and City. And items are also searchable. In addition if city can't be found then user manually write city on dialog window.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on country_state_city_pro