CLTextField.currency constructor

CLTextField.currency({
  1. Key? key,
  2. required TextEditingController controller,
  3. required String labelText,
  4. bool isReadOnly = false,
  5. GestureTapCallback? onTap,
  6. FocusNode? focusNode,
  7. Future onChanged(
    1. String value
    )?,
  8. bool isRequired = false,
  9. IconAlignment iconAlignment = IconAlignment.start,
  10. bool isRounded = false,
  11. bool isEnabled = true,
  12. String? initValue,
  13. List<FormFieldValidator<String>>? validators,
})

Implementation

factory CLTextField.currency({
  Key? key,
  required TextEditingController controller,
  required String labelText,
  bool isReadOnly = false,
  GestureTapCallback? onTap,
  FocusNode? focusNode,
  Future Function(String value)? onChanged,
  bool isRequired = false,
  IconAlignment iconAlignment = IconAlignment.start,
  bool isRounded = false,
  bool isEnabled = true,
  String? initValue,
  List<FormFieldValidator<String>>? validators,
}) => CLTextField(
      key: key, controller: controller, labelText: labelText,
      isRequired: isRequired,
      prefixIcon: iconAlignment == IconAlignment.start
          ? const Icon(FontAwesomeIcons.moneyCheck, size: 14, color: Colors.grey)
          : null,
      inputType: const TextInputType.numberWithOptions(decimal: true),
      suffixIcon: iconAlignment == IconAlignment.end
          ? const Icon(FontAwesomeIcons.moneyCheck, size: 14, color: Colors.grey)
          : null,
      onChanged: onChanged, focusNode: focusNode, onTap: onTap,
      isReadOnly: isReadOnly, isRounded: isRounded, isEnabled: isEnabled,
      validators: validators, initValue: initValue,
    );