cupertino_country_state_picker 1.1.2 copy "cupertino_country_state_picker: ^1.1.2" to clipboard
cupertino_country_state_picker: ^1.1.2 copied to clipboard

A Flutter package providing a Cupertino-style country and state picker with smooth UI, flag support, and easy integration.

example/lib/main.dart

import 'package:cupertino_country_state_picker/views/cupertino_country_state_picker.dart';
import 'package:flutter/material.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
      ),
      home: const MyHomePage(title: 'Flutter Demo Home Page'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({super.key, required this.title});

  final String title;

  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: Colors.white,
      body: SafeArea(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: [
            Padding(
              padding: EdgeInsets.all(16),
              child: CupertinoCountryStatePicker(
                onCountryChanged: (value) {},
                onStateChanged: (value) {},
                initialCountry: "Bangladesh",
                initialState: "Rangpur",
                pickedValueTextStyle: TextStyle(fontSize: 14),
                borderRadius: 16,
                labelTextStyle: TextStyle(fontSize: 13),
                pickerAnimationDuration: Duration(seconds: 5),
                pickerSearchIcon: Icon(Icons.search),
                pickerAnimation: Curves.easeIn,
              ),
            ),
          ],
        ),
      ),
    );
  }
}
2
likes
150
points
49
downloads

Publisher

unverified uploader

Weekly Downloads

A Flutter package providing a Cupertino-style country and state picker with smooth UI, flag support, and easy integration.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on cupertino_country_state_picker