mask 1.0.1 copy "mask: ^1.0.1" to clipboard
mask: ^1.0.1 copied to clipboard

outdated

This project is for you to be able to make validations and formatting in a simple and easy way in your projects

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:mask/mask/mask.dart';

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

class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      theme: ThemeData(),
      home: const HomePage(),
    );
  }
}

class HomePage extends StatelessWidget {
  const HomePage({Key? key}) : super(key: key);
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(),
      body: Padding(
        padding: const EdgeInsets.all(8.0),
        child: Column(
          children: [
            TextFormField(
              autovalidateMode: AutovalidateMode.onUserInteraction,
              validator: (value) => Mask.validations.money(value, min: 100.0),
              inputFormatters: [Mask.money()],
            ),
          ],
        ),
      ),
    );
  }
}
35
likes
0
points
451
downloads

Publisher

unverified uploader

Weekly Downloads

This project is for you to be able to make validations and formatting in a simple and easy way in your projects

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on mask