money static method

TextInputFormatter money({
  1. int decimalLenght = 2,
  2. String decimal = '.',
  3. String fracion = ',',
  4. String moneySymbol = r'R$',
})

use to format money fields

TextFormField(
  autovalidateMode: AutovalidateMode.onUserInteraction,
  inputFormatters: [Mask.money()],
),

Implementation

static TextInputFormatter money({
  int decimalLenght = 2,
  String decimal = '.',
  String fracion = ',',
  String moneySymbol = r'R$',
}) {
  return MoneyMask(
    decimalLenght: decimalLenght,
    decimal: decimal,
    fracion: fracion,
    moneySymbol: moneySymbol,
  );
}