all_country_picker 0.0.1 copy "all_country_picker: ^0.0.1" to clipboard
all_country_picker: ^0.0.1 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', '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, plugin_platform_interface

More

Packages that depend on all_country_picker

Packages that implement all_country_picker