v1.0.5mask
This project is for you to be able to make validations and formatting in a simple and easy way in your projects
35Likes 29430-day downloads160Pub points
AndroidiOSWebmacOSWindowsLinux
welitonsousa/mask open-source repository details.
{"sdk":"flutter"}{"sdk":"flutter"}^1.0.0English project snapshot. Visit GitHub for the latest content.
Validations are for you to be able to simply validate your field
The masks are for you to be able to customize your field, according to that information
// money mask and validation
TextFormField(
autovalidateMode: AutovalidateMode.onUserInteraction,
validator: (value) => Mask.validations.money(
value,
min: 100.0, // optional field
),
inputFormatters: [Mask.money()],
),
// cpf or cnpj mask and validation
TextFormField(
validator: Mask.validations.cpfOrCnpj,
inputFormatters: [Mask.cpfOrCnpj()],
),
// your custom mask and validation
TextFormField(
validator: (value) => Mask.validations.generic(value, min:8, error: 'info erro'),
inputFormatters: [
Mask.generic(
masks: ['##-##-##'],
hashtag: Hashtag.numbers, // optional field
),
),
)
Feito com ❤️ by Weliton Sousa