Files
CountryCodePicker/example/lib/main.dart
Benni Heiss 71ca7a0b34 refactored selectiondialog _buildoption
OnlyCountrymode now also displays only country when closed
width doesn't change on search
2019-03-26 11:20:17 +01:00

34 lines
918 B
Dart

import 'package:flutter/material.dart';
import 'package:country_code_picker/country_code_picker.dart';
void main() => runApp(new MyApp());
class MyApp extends StatefulWidget {
@override
_MyAppState createState() => new _MyAppState();
}
class _MyAppState extends State<MyApp> {
@override
void initState() {
super.initState();
}
@override
Widget build(BuildContext context) {
return new MaterialApp(
home: new Scaffold(
appBar: new AppBar(
title: const Text('CountryPicker Example'),
),
body: new Center(
child: new CountryCodePicker(
onChanged: print,
// Initial selection and favorite can be one of code ('IT') OR dial_code('+39')
initialSelection: 'IT',
// showCountryOnly: true,
favorite: ['+39', 'FR']),
)));
}
}