phone_util 0.0.1 copy "phone_util: ^0.0.1" to clipboard
phone_util: ^0.0.1 copied to clipboard

Helps you to build a phone input field with easy steps, you can change the country and separate the country box style as you want and the phone input field as you want. you can add empty space between [...]

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:phone_util/models/country_box.dart';
import 'package:phone_util/models/phone_model.dart';
import 'package:phone_util/view/phone_util.dart';

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

class MyApp extends StatelessWidget {
  final _formKey = GlobalKey<FormState>();

  MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Material App',
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Material App Bar'),
        ),
        body: Form(
          key: _formKey,
          child: Column(
            children: [
              PhoneUtil(
                onInputChanged: (PhoneNumber value) {},
                countryBoxType: PhoneInputSelectorType.BOTTOM_SHEET,
                separatedWidth: 12,
                inputDecoration: InputDecoration(
                  fillColor: Colors.white10,
                  filled: true,
                  enabledBorder: OutlineInputBorder(
                    borderRadius: BorderRadius.circular(8),
                    borderSide: const BorderSide(
                      color: Colors.white,
                    ),
                  ),
                  focusedBorder: OutlineInputBorder(
                    borderRadius: BorderRadius.circular(8),
                    borderSide: const BorderSide(
                      color: Colors.white,
                    ),
                  ),
                  errorBorder: OutlineInputBorder(
                    borderRadius: BorderRadius.circular(8),
                    borderSide: const BorderSide(
                      color: Colors.red,
                    ),
                  ),
                  contentPadding: const EdgeInsets.symmetric(
                    horizontal: 12,
                    vertical: 18,
                  ),
                ),
                countryDecoration: CountryBox(),
              ),
              const SizedBox(height: 20),
            ],
          ),
        ),
      ),
    );
  }
}
2
likes
0
points
44
downloads

Publisher

unverified uploader

Weekly Downloads

Helps you to build a phone input field with easy steps, you can change the country and separate the country box style as you want and the phone input field as you want. you can add empty space between the country and phone field..

Homepage
Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, get

More

Packages that depend on phone_util