CurrencyInput constructor

const CurrencyInput({
  1. Key? key,
  2. String? label = 'Amount',
  3. bool isRequired = false,
  4. int? characterLimit,
  5. InputControlType type = InputControlType.gray,
  6. NumberGroupingSystem groupingSystem = NumberGroupingSystem.international,
  7. bool allowDecimals = true,
  8. int? decimalPlaces = 2,
  9. num? minValue,
  10. num? maxValue,
  11. IconData? leftIcon = Icons.euro_rounded,
  12. Widget? leftIconWidget,
  13. String? prefix,
  14. Widget? prefixWidget,
  15. String placeholder = '0.00',
  16. num? initialValue,
  17. TextEditingController? controller,
  18. FocusNode? focusNode,
  19. String? suffix,
  20. Widget? suffixWidget,
  21. ButtonIconGhost? rightButton,
  22. bool isError = false,
  23. bool showErrorMessage = true,
  24. String errorMessage = 'Error Message',
  25. List<String>? errorMessages,
  26. Widget? errorIconWidget,
  27. bool enabled = true,
  28. bool readOnly = false,
  29. bool autofocus = false,
  30. ValueChanged<num?>? onAmountChanged,
  31. ValueChanged<String>? onChanged,
  32. ValueChanged<String>? onSubmitted,
  33. VoidCallback? onTap,
})

Creates a CurrencyInput instance.

Implementation

const CurrencyInput({
  super.key,
  this.label = 'Amount',
  this.isRequired = false,
  this.characterLimit,
  this.type = InputControlType.gray,
  this.groupingSystem = NumberGroupingSystem.international,
  this.allowDecimals = true,
  this.decimalPlaces = 2,
  this.minValue,
  this.maxValue,
  this.leftIcon = Icons.euro_rounded,
  this.leftIconWidget,
  this.prefix,
  this.prefixWidget,
  this.placeholder = '0.00',
  this.initialValue,
  this.controller,
  this.focusNode,
  this.suffix,
  this.suffixWidget,
  this.rightButton,
  this.isError = false,
  this.showErrorMessage = true,
  this.errorMessage = 'Error Message',
  this.errorMessages,
  this.errorIconWidget,
  this.enabled = true,
  this.readOnly = false,
  this.autofocus = false,
  this.onAmountChanged,
  this.onChanged,
  this.onSubmitted,
  this.onTap,
});