ns_intl_phone_input 0.0.3 copy "ns_intl_phone_input: ^0.0.3" to clipboard
ns_intl_phone_input: ^0.0.3 copied to clipboard

Package for international phone number input with country code

example/lib/main.dart

// ignore_for_file: avoid_print

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

void main() {
  runApp(
    const MaterialApp(
      home: SampleScreen(),
    ),
  );
}

class SampleScreen extends StatefulWidget {
  const SampleScreen({super.key});

  @override
  State<SampleScreen> createState() => _SampleScreenState();
}

class _SampleScreenState extends State<SampleScreen> {
  // Initialize the controller for Intl Text editing
  final _phoneNumberController = IntlTextEditingController();

  @override
  Widget build(BuildContext context) {
    return Scaffold(
        appBar: AppBar(
          title: Text('NsIntlPhoneInput Example',
              style: Theme.of(context).textTheme.titleLarge),
        ),
        body: Center(
          child: NsIntlPhoneInput(
            textEditingController: _phoneNumberController,
            enableValidation: false,
            onPhoneChange: (countrySelection) {
              print(countrySelection);
            },
          ),
        ));
  }
}
8
likes
160
points
33
downloads

Publisher

verified publisherdart.nonstopio.com

Weekly Downloads

Package for international phone number input with country code

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

equatable, flutter, mask_text_input_formatter

More

Packages that depend on ns_intl_phone_input