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

outdated

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()),
              ),
            ],
          ),
        ),
      ),
    );
  }
}
21
likes
40
pub points
80%
popularity

Publisher

unverified uploader

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

Repository (GitHub)
View/report issues

License

Apache-2.0 (license)

Dependencies

flutter

More

Packages that depend on phonenumbers