phonenumbers 1.1.1 copy "phonenumbers: ^1.1.1" to clipboard
phonenumbers: ^1.1.1 copied to clipboard

Phone number validation and input widget written in pure dart without any native dependency

example/lib/main.dart

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

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

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
        visualDensity: VisualDensity.adaptivePlatformDensity,
        brightness: Brightness.dark,
      ),
      home: Scaffold(
        appBar: AppBar(
          title: Text('Phone Number Input'),
        ),
        body: Padding(
          padding: const EdgeInsets.all(24),
          child: Column(
            children: <Widget>[
              PhoneNumberField(
                controller: PhoneNumberEditingController.fromCountryCode('AZ'),
                decoration: InputDecoration(border: OutlineInputBorder()),
              ),
              SizedBox(height: 24),
              PhoneNumberFormField(
                autovalidateMode: AutovalidateMode.always,
                controller: PhoneNumberEditingController.fromCountryCode('TR'),
                decoration: InputDecoration(border: UnderlineInputBorder()),
              ),
            ],
          ),
        ),
      ),
    );
  }
}
23
likes
150
points
238
downloads

Publisher

unverified uploader

Weekly Downloads

Phone number validation and input widget written in pure dart without any native dependency

Repository (GitHub)
View/report issues

Documentation

API reference

License

Apache-2.0 (license)

Dependencies

flutter, phonenumbers_core

More

Packages that depend on phonenumbers