flutter_country_widget 3.0.2 copy "flutter_country_widget: ^3.0.2" to clipboard
flutter_country_widget: ^3.0.2 copied to clipboard

Flutter pre-defined widget by using country, generated country class by using countries.

example/lib/main.dart

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

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

class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: const CountryExample(),
    );
  }
}

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

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(),
      body: Center(
        child: Column(
          children: [
            CountryDropdownButton.predefined(
              type: CountryDropDownButtonType.name,
              onChanged: (value) {},
              hint: const Text('Please select a country'),
            ),
            CountryDropdownButton.predefined(
              type: CountryDropDownButtonType.callingCode,
              onChanged: (value) {},
              hint: const Text('Phone code'),
            ),
            CountryDropdownButton.predefined(
              type: CountryDropDownButtonType.currency,
              onChanged: (value) {},
              hint: const Text('Currency'),
            ),
          ],
        ),
      ),
    );
  }
}
1
likes
150
points
15
downloads

Publisher

unverified uploader

Weekly Downloads

Flutter pre-defined widget by using country, generated country class by using countries.

Homepage
Repository (GitHub)
View/report issues

Topics

#country #countries

Documentation

API reference

License

MIT (license)

Dependencies

flutter, flutter_country_utility

More

Packages that depend on flutter_country_widget