CLTextField.number constructor

CLTextField.number({
  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. List<FormFieldValidator<String>>? validators,
  13. String? initValue,
  14. bool withDecimal = false,
})

Implementation

factory CLTextField.number({
  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,
  List<FormFieldValidator<String>>? validators,
  String? initValue,
  bool withDecimal = false,
}) => CLTextField(
      key: key, controller: controller, labelText: labelText,
      isRequired: isRequired,
      inputType: TextInputType.numberWithOptions(decimal: withDecimal),
      onChanged: onChanged, focusNode: focusNode, onTap: onTap,
      initValue: initValue, isReadOnly: isReadOnly, isRounded: isRounded,
      isEnabled: isEnabled, validators: validators,
    );