fl_country_code_picker 0.1.9+1 fl_country_code_picker: ^0.1.9+1 copied to clipboard
A Flutter package for showing a modal that contains country dial code. The user can also search for the available codes and select right from the modal.
import 'package:fl_country_code_picker/fl_country_code_picker.dart' as flc;
import 'package:flutter/material.dart';
import 'package:flutter_localizations/flutter_localizations.dart';
import 'demo/demo.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',
// supportedLocales: flc.supportedLocales.map(Locale.new),
supportedLocales:
flc.CountryLocalizations.supportedLocales.map(Locale.new),
localizationsDelegates: const [
flc.CountryLocalizations.delegate,
GlobalWidgetsLocalizations.delegate,
GlobalMaterialLocalizations.delegate,
GlobalCupertinoLocalizations.delegate,
],
home: const DemoPage(),
);
}
}