NumberInputPrefabbed.directionalButtons constructor

NumberInputPrefabbed.directionalButtons({
  1. required TextEditingController controller,
  2. Key? key,
  3. bool enabled = true,
  4. ButtonArrangement buttonArrangement = ButtonArrangement.rightEnd,
  5. num min = 0,
  6. num max = double.infinity,
  7. num initialValue = 0,
  8. num incDecFactor = 1,
  9. bool isInt = true,
  10. AutovalidateMode autovalidateMode = AutovalidateMode.always,
  11. bool enableMinMaxClamping = false,
  12. InputDecoration? numberFieldDecoration,
  13. Decoration widgetContainerDecoration = const BoxDecoration(),
  14. FormFieldValidator<String>? validator,
  15. TextStyle? style,
  16. IconData incIcon = Icons.arrow_drop_up,
  17. IconData decIcon = Icons.arrow_drop_down,
  18. int fractionDigits = 2,
  19. double scaleWidth = 1.0,
  20. double scaleHeight = 1.0,
  21. double incIconSize = 28,
  22. double decIconSize = 28,
  23. Color? decIconColor,
  24. Color? incIconColor,
  25. DiffIncDecCallBack? onDecrement,
  26. DiffIncDecCallBack? onIncrement,
  27. ValueCallBack? onSubmitted,
  28. ValueCallBack? onChanged,
  29. bool separateIcons = true,
  30. Color incDecBgColor = Colors.lightGreen,
  31. TextAlign textAlign = TextAlign.center,
})

A pre-fabricated NumberInputWithIncrementDecrement widget with the increment/decrement buttons decorated as directional buttons.

NumberInputPrefabbed.directionalButtons

Implementation

NumberInputPrefabbed.directionalButtons({
  required TextEditingController controller,
  Key? key,
  bool enabled = true,
  ButtonArrangement buttonArrangement = ButtonArrangement.rightEnd,
  num min = 0,
  num max = double.infinity,
  num initialValue = 0,
  num incDecFactor = 1,
  bool isInt = true,
  AutovalidateMode autovalidateMode = AutovalidateMode.always,
  bool enableMinMaxClamping = false,
  InputDecoration? numberFieldDecoration,
  Decoration widgetContainerDecoration = const BoxDecoration(),
  FormFieldValidator<String>? validator,
  TextStyle? style,
  IconData incIcon = Icons.arrow_drop_up,
  IconData decIcon = Icons.arrow_drop_down,
  int fractionDigits = 2,
  double scaleWidth = 1.0,
  double scaleHeight = 1.0,
  double incIconSize = 28,
  double decIconSize = 28,
  Color? decIconColor,
  Color? incIconColor,
  DiffIncDecCallBack? onDecrement,
  DiffIncDecCallBack? onIncrement,
  ValueCallBack? onSubmitted,
  ValueCallBack? onChanged,
  bool separateIcons = true,
  Color incDecBgColor = Colors.lightGreen,
  TextAlign textAlign = TextAlign.center,
}) : super(
        controller: controller,
        key: key,
        enabled: enabled,
        min: min,
        max: max,
        initialValue: initialValue,
        incDecFactor: incDecFactor,
        isInt: isInt,
        autovalidateMode: autovalidateMode,
        enableMinMaxClamping: enableMinMaxClamping,
        buttonArrangement: buttonArrangement,
        numberFieldDecoration: numberFieldDecoration,
        widgetContainerDecoration: widgetContainerDecoration,
        validator: validator,
        style: style,
        incIcon: incIcon,
        decIcon: decIcon,
        fractionDigits: fractionDigits,
        scaleHeight: scaleHeight,
        scaleWidth: scaleWidth,
        incIconSize: incIconSize,
        decIconSize: decIconSize,
        decIconColor: decIconColor,
        incIconColor: incIconColor,
        onDecrement: onDecrement,
        onIncrement: onIncrement,
        onSubmitted: onSubmitted,
        onChanged: onChanged,
        separateIcons: separateIcons,
        incDecBgColor: incDecBgColor,
        incIconDecoration: BoxDecoration(
          color: incDecBgColor,
          borderRadius: BorderRadius.only(
            topRight: Radius.circular(15),
            topLeft: Radius.circular(15),
          ),
          border: Border.all(
            color: Colors.black,
            width: 0.25,
          ),
        ),
        decIconDecoration: BoxDecoration(
          color: incDecBgColor,
          borderRadius: BorderRadius.only(
            bottomRight: Radius.circular(15),
            bottomLeft: Radius.circular(15),
          ),
          border: Border.all(
            color: Colors.black,
            width: 0.25,
          ),
        ),
        textAlign: textAlign,
      );