FormItemSwitch constructor

FormItemSwitch({
  1. TextEditingController? controller,
  2. Widget? leading,
  3. bool dense = false,
  4. Color? backgroundColor,
  5. Color? borderColor,
  6. Color? color,
  7. FormItemSwitchType type = FormItemSwitchType.form,
  8. void onChanged(
    1. bool? value
    )?,
  9. Color? activeColor,
  10. Color? activeTrackColor,
  11. Color? inactiveThumbColor,
  12. EdgeInsetsGeometry padding = const EdgeInsets.symmetric(horizontal: 12, vertical: 4.5),
  13. EdgeInsetsGeometry? margin,
  14. Color? inactiveTrackColor,
  15. String? hintText,
  16. String? labelText,
  17. Key? key,
  18. void onSaved(
    1. bool? value
    )?,
  19. String? validator(
    1. bool? value
    )?,
  20. bool? initialValue,
  21. bool enabled = true,
})

Implementation

FormItemSwitch(
    {this.controller,
    this.leading,
    this.dense = false,
    this.backgroundColor,
    this.borderColor,
    this.color,
    this.type = FormItemSwitchType.form,
    this.onChanged,
    this.activeColor,
    this.activeTrackColor,
    this.inactiveThumbColor,
    this.padding = const EdgeInsets.symmetric(horizontal: 12, vertical: 4.5),
    this.margin,
    this.inactiveTrackColor,
    this.hintText,
    this.labelText,
    Key? key,
    void Function(bool? value)? onSaved,
    String? Function(bool? value)? validator,
    bool? initialValue,
    bool enabled = true})
    : super(
        key: key,
        builder: (state) {
          return const Empty();
        },
        onSaved: onSaved,
        validator: validator,
        initialValue: initialValue,
        enabled: enabled,
      );