all_country_picker 0.0.7 copy "all_country_picker: ^0.0.7" to clipboard
all_country_picker: ^0.0.7 copied to clipboard

outdated

A country picker plugin with textfield, and it will format as you type.

example/lib/main.dart

import 'package:all_country_picker/all_country_picker.dart';
import 'package:flutter/material.dart';

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

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

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  final TextEditingController phoneNumberController = TextEditingController();

  @override
  void initState() {
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      theme: ThemeData(useMaterial3: true),
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app'),
        ),
        body: Center(
          child: Padding(
            padding: const EdgeInsets.all(15),
            child: CountryField(
              phoneNumberController: phoneNumberController,
              countryList: const [
                'us',
                'tt',
                'jm',
                'eg',
                'dz',
                'gm',
                'gn',
                'mu',
                'lr',
                'ng',
                'cmr',
                'ao',
                'et',
                'so',
                'ke',
                'zw',
                'za',
                'fr',
                'lt',
                'it',
                'jm',
                'mx',
                'bo',
                'my',
                'au',
                'vn',
                'la',
                'bd',
                'tr',
                'in',
                'af',
                'jo',
                'sa',
                'ye',
                'om',
                'ae',
                'ae',
                'ae',
              ],
              onDropdownChanged: (value) {
                // print(value!.isoCode);
              },
            ),
          ),
        ),
      ),
    );
  }
}
3
likes
0
points
22
downloads

Publisher

unverified uploader

Weekly Downloads

A country picker plugin with textfield, and it will format as you type.

License

unknown (license)

Dependencies

flutter

More

Packages that depend on all_country_picker

Packages that implement all_country_picker