country_phone_code_picker 0.0.36 copy "country_phone_code_picker: ^0.0.36" to clipboard
country_phone_code_picker: ^0.0.36 copied to clipboard

outdated

Flutter Package that provides easy and customizable country picker widget

example/lib/main.dart

import 'package:flutter/material.dart';

import 'package:country_phone_code_picker/country_phone_code_picker.dart';

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

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: MyHomePage(),
    );
  }
}

class MyHomePage extends StatelessWidget {
  MyHomePage({super.key});

  CountryController countryController = CountryController();

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('Country Phone Code Picker'),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            CountryPhoneCodePicker.withDefaultSelectedCountry(
              defaultCountryCode:
                  Country(name: 'India', countryCode: 'IN', phoneCode: '+91'),
              borderRadius: 5,
              borderWidth: 1,
              borderColor: Colors.grey,
              style: const TextStyle(fontSize: 16),
              searchBarHintText: 'Search by name',
            ),
          ],
        ),
      ),
    );
  }
}
8
likes
0
pub points
79%
popularity

Publisher

unverified uploader

Flutter Package that provides easy and customizable country picker widget

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter, get

More

Packages that depend on country_phone_code_picker