FastDigitCalculatorField constructor

const FastDigitCalculatorField({
  1. Key? key,
  2. required String labelText,
  3. Widget? validIcon,
  4. bool isEnabled = true,
  5. String? valueText,
  6. String? placeholderText,
  7. ValueChanged<String?>? onValueChanged,
  8. String? captionText,
  9. Widget? suffixIcon,
  10. bool? acceptDecimal = true,
  11. FastRoundingMethod? roundingMethod = FastRoundingMethod.round,
  12. bool? acceptNegative = false,
  13. bool? transformInvalidNumber = true,
})

Creates a new instance of FastDigitCalculatorField.

labelText is the label of the input field. isEnabled, and valueText are optional parameters. Other optional parameters include placeholderText, onValueChanged, captionText, suffixIcon, and validIcon.

Implementation

const FastDigitCalculatorField({
  super.key,
  required this.labelText,
  this.validIcon,
  this.isEnabled = true,
  String? valueText,
  this.placeholderText,
  this.onValueChanged,
  this.captionText,
  this.suffixIcon,
  bool? acceptDecimal = true,
  FastRoundingMethod? roundingMethod = FastRoundingMethod.round,
  bool? acceptNegative = false,
  bool? transformInvalidNumber = true,
})  : roundingMethod = roundingMethod ?? FastRoundingMethod.round,
      valueText = valueText ?? '',
      acceptDecimal = acceptDecimal ?? true,
      acceptNegative = acceptNegative ?? false,
      transformInvalidNumber = transformInvalidNumber ?? true;