country_code_text_field 1.0.8
country_code_text_field: ^1.0.8 copied to clipboard
Introducing Country Code Text Field: a Flutter package for streamlined mobile logins worldwide. Customizable with flags & codes for easy selection.
example/lib/main.dart
import 'package:flutter/material.dart';
import 'package:intl_phone_field/country_code_text_field.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatefulWidget {
@override
_MyAppState createState() => _MyAppState();
}
class _MyAppState extends State<MyApp> {
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
home: Scaffold(
appBar: AppBar(
title: Text('Country Text Field Example'),
),
body: Center(
// Center is a layout widget. It takes a single child and positions it
// in the middle of the parent.
child: Padding(
padding: const EdgeInsets.all(24.0),
child: CountryCodeTextField(
decoration: InputDecoration(
enabledBorder: OutlineInputBorder(
borderSide: const BorderSide(width: 1),
borderRadius: BorderRadius.circular(8.0),
),
focusedBorder: OutlineInputBorder(
borderSide: const BorderSide(width: 1),
borderRadius: BorderRadius.circular(8.0),
),
labelText: "XXX XX XX XXX",
),
),
),
),
),
);
}
}