telephone_check 0.1.3 copy "telephone_check: ^0.1.3" to clipboard
telephone_check: ^0.1.3 copied to clipboard

This package will help you to validate if a telephone number is well written.

example/main.dart

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

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    String number = "1-800-555-5555";
    String resultString = '';
    if (TelephoneChecker.isValid(number)) {
      print('The number: $number you entered is valid');
      resultString = 'The number: $number you entered is valid';
    } else {
      resultString = 'The number: $number you entered is valid';
      print('The number: $number you entered is invalid');
    }

    return MaterialApp(
      title: 'Material App',
      home: Scaffold(
        appBar: AppBar(
          title: Text('Material App Bar'),
        ),
        body: Center(
          child: Container(
            child: Text(resultString),
          ),
        ),
      ),
    );
  }
}
4
likes
160
points
45
downloads

Publisher

verified publisherneryad.dev

Weekly Downloads

This package will help you to validate if a telephone number is well written.

Homepage
Repository (GitHub)

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on telephone_check