CurrencyInput constructor
const
CurrencyInput({
- Key? key,
- String? label = 'Amount',
- bool isRequired = false,
- int? characterLimit,
- InputControlType type = InputControlType.gray,
- NumberGroupingSystem groupingSystem = NumberGroupingSystem.international,
- bool allowDecimals = true,
- int? decimalPlaces = 2,
- num? minValue,
- num? maxValue,
- IconData? leftIcon = Icons.euro_rounded,
- Widget? leftIconWidget,
- String? prefix,
- Widget? prefixWidget,
- String placeholder = '0.00',
- num? initialValue,
- TextEditingController? controller,
- FocusNode? focusNode,
- String? suffix,
- Widget? suffixWidget,
- ButtonIconGhost? rightButton,
- bool isError = false,
- bool showErrorMessage = true,
- String errorMessage = 'Error Message',
- List<
String> ? errorMessages, - Widget? errorIconWidget,
- bool enabled = true,
- bool readOnly = false,
- bool autofocus = false,
- ValueChanged<
num?> ? onAmountChanged, - ValueChanged<
String> ? onChanged, - ValueChanged<
String> ? onSubmitted, - 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,
});