FormItemSwitch constructor
FormItemSwitch({
- TextEditingController? controller,
- Widget? leading,
- bool dense = false,
- Color? backgroundColor,
- Color? borderColor,
- Color? color,
- FormItemSwitchType type = FormItemSwitchType.form,
- void onChanged(
- bool? value
- Color? activeColor,
- Color? activeTrackColor,
- Color? inactiveThumbColor,
- EdgeInsetsGeometry padding = const EdgeInsets.symmetric(horizontal: 12, vertical: 4.5),
- EdgeInsetsGeometry? margin,
- Color? inactiveTrackColor,
- String? hintText,
- String? labelText,
- Key? key,
- void onSaved(
- bool? value
- String? validator(
- bool? value
- bool? initialValue,
- 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,
);