CurrencyTextFieldController constructor

CurrencyTextFieldController({
  1. String currencySymbol = 'R\$',
  2. String decimalSymbol = ',',
  3. String thousandSymbol = '.',
  4. String currencySeparator = ' ',
  5. double? initDoubleValue,
  6. int? initIntValue,
  7. int maxDigits = 15,
  8. int numberOfDecimals = 2,
  9. bool currencyOnLeft = true,
  10. bool enableNegative = true,
  11. double? maxValue,
})

Implementation

CurrencyTextFieldController({
  String currencySymbol = 'R\$',
  String decimalSymbol = ',',
  String thousandSymbol = '.',
  String currencySeparator = ' ',
  double? initDoubleValue,
  int? initIntValue,
  int maxDigits = 15,
  int numberOfDecimals = 2,
  bool currencyOnLeft = true,
  bool enableNegative = true,
  double? maxValue,
})  : assert(thousandSymbol != decimalSymbol,
          "thousandSymbol must be different from decimalSymbol."),
      _currencySymbol = currencySymbol,
      _decimalSymbol = decimalSymbol,
      _thousandSymbol = thousandSymbol,
      _currencySeparator = currencySeparator,
      _maxDigits = maxDigits,
      _numberOfDecimals = numberOfDecimals,
      _currencyOnLeft = currencyOnLeft,
      _enableNegative = enableNegative,
      _maxValue = maxValue {
  _changeSymbol();
  forceValue(initDoubleValue: initDoubleValue, initIntValue: initIntValue);
  addListener(_listener);
}