extended_masked_text 1.0.0
extended_masked_text: ^1.0.0 copied to clipboard

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

extended_masked_text #

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

Usage #

Import the library

import 'package:extended_masked_text/extended_masked_text.dart';

MaskedTextController #

Create your mask controller:

final controller = MaskedTextController(mask: '000.000.000-00');

Set controller to your text field:

return MaterialApp(
    title: 'Masked Text Demo',
    theme: ThemeData(
        primarySwatch: Colors.blue,
    ),
    home: SafeArea(
        child: Scaffold(
            body: Column(
                children: <Widget>[
                    TextField(
                        // Add controller to TextField
                        controller: controller,
                    ),
                ],
            ),
        ),
    ),
);

MoneyMaskedTextController #

Create your mask controller:

final controller = MoneyMaskedTextController(leftSymbol: 'R\$ ');

Set controller to your text field:

return MaterialApp(
    title: 'Money Masked Text Demo',
    theme: ThemeData(
        primarySwatch: Colors.blue,
    ),
    home: SafeArea(
        child: Scaffold(
            body: Column(
                children: <Widget>[
                    TextField(
                        // Add controller to TextField
                        controller: controller,
                    ),
                ],
            ),
        ),
    ),
);
71
likes
110
pub points
95%
popularity

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

Homepage

Documentation

API reference

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on extended_masked_text