v1.0.5mask
该项目旨在让您能够在项目中以简单便捷的方式进行验证和格式化
35喜欢 294近 30 天下载160Pub 分数
AndroidiOSWebmacOSWindowsLinux
welitonsousa/mask open-source repository details.
{"sdk":"flutter"}{"sdk":"flutter"}^1.0.0以下为英文项目原文快照,最新内容请访问 GitHub。
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