country_state_selector 1.0.1
country_state_selector: ^1.0.1 copied to clipboard
A Flutter package for selecting country and state with a smooth dropdown and search functionality.
import 'package:flutter/material.dart';
import 'package:country_state_selector/country_state_selector.dart';
void main() => runApp(const MyApp());
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(title: const Text('Country State Picker')),
body: CountryStatePicker(
onSelected: (country, state) {
print('Selected Country: $country, State: $state');
},
),
),
);
}
}