extended_masked_text 2.3.1
extended_masked_text: ^2.3.1 copied to clipboard

A small set of custom TextEditingControllers that allows masked text inputs for flutter apps

example/lib/main.dart

import 'package:example/pages/masked_text_sample.dart';
import 'package:example/pages/money_masked_text_sample.dart';
import 'package:flutter/material.dart';

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

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) => MaterialApp(
        title: 'Masked Text Demo',
        theme: ThemeData(
          primarySwatch: Colors.blue,
          visualDensity: VisualDensity.adaptivePlatformDensity,
        ),
        home: const MyHomePage(title: 'Extended Masked Text Demo'),
      );
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({Key key, this.title}) : super(key: key);

  final String title;

  @override
  _MyHomePageState createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  @override
  Widget build(BuildContext context) => Scaffold(
        appBar: AppBar(
          title: Text(widget.title),
        ),
        body: Center(
          child: Column(
            crossAxisAlignment: CrossAxisAlignment.center,
            children: <Widget>[
              ElevatedButton(
                onPressed: () => Navigator.of(context).push(
                  MaterialPageRoute(
                    builder: (context) => MaskedTextSample(),
                  ),
                ),
                child: const Text('Masked Controller'),
              ),
              ElevatedButton(
                onPressed: () => Navigator.of(context).push(
                  MaterialPageRoute(
                    builder: (context) => MoneyMaskedTextSample(),
                  ),
                ),
                child: const Text('Money Masked Controller'),
              )
            ],
          ),
        ),
      );
}
66
likes
120
pub points
95%
popularity

A small set of custom TextEditingControllers that allows masked text inputs for flutter apps

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on extended_masked_text