country_code_text_field 1.1.2 copy "country_code_text_field: ^1.1.2" to clipboard
country_code_text_field: ^1.1.2 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",
              ),
            ),
          ),
        ),
      ),
    );
  }
}
3
likes
160
points
400
downloads

Publisher

unverified uploader

Weekly Downloads

Introducing Country Code Text Field: a Flutter package for streamlined mobile logins worldwide. Customizable with flags & codes for easy selection.

Homepage

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on country_code_text_field