toggle static method
Implementation
static TFormField<bool> toggle(
TFieldProp<bool> prop,
String? label, {
FocusNode? focusNode,
bool isRequired = false,
List<String? Function(bool?)>? rules,
bool autoFocus = false,
bool disabled = false,
Color? color,
TInputSize? size,
}) {
return TFormField<bool>(
prop: prop,
builder: (onValueChanged) => TSwitch(
label: label,
focusNode: focusNode,
isRequired: isRequired,
rules: rules,
autoFocus: autoFocus,
disabled: disabled,
color: color,
size: size,
value: prop.value,
valueNotifier: prop.valueNotifier,
onValueChanged: onValueChanged,
),
);
}