JsonCupertinoSwitch constructor
JsonCupertinoSwitch({
- Map<
String, dynamic> args = const {}, - JsonWidgetRegistry? registry,
- Color? activeColor,
- AutovalidateMode? autovalidateMode,
- DragStartBehavior? dragStartBehavior,
- bool enabled = true,
- String? label,
- void onChanged()?,
- void onSaved(
- bool?
- String? restorationId,
- Color? thumbColor,
- Color? trackColor,
- required dynamic validators,
- bool value = false,
- VisualDensity? visualDensity,
Implementation
JsonCupertinoSwitch({
Map<String, dynamic> args = const {},
JsonWidgetRegistry? registry,
this.activeColor,
this.autovalidateMode,
this.dragStartBehavior,
this.enabled = true,
this.label,
this.onChanged,
this.onSaved,
this.restorationId,
this.thumbColor,
this.trackColor,
required this.validators,
this.value = false,
this.visualDensity,
}) : super(
jsonWidgetArgs: JsonCupertinoSwitchBuilderModel.fromDynamic(
{
'activeColor': activeColor,
'autovalidateMode': autovalidateMode,
'dragStartBehavior': dragStartBehavior,
'enabled': enabled,
'label': label,
'onChanged': onChanged,
'onSaved': onSaved,
'restorationId': restorationId,
'thumbColor': thumbColor,
'trackColor': trackColor,
'validators': validators,
'value': value,
'visualDensity': visualDensity,
...args,
},
args: args,
registry: registry,
),
jsonWidgetBuilder: () => JsonCupertinoSwitchBuilder(
args: JsonCupertinoSwitchBuilderModel.fromDynamic(
{
'activeColor': activeColor,
'autovalidateMode': autovalidateMode,
'dragStartBehavior': dragStartBehavior,
'enabled': enabled,
'label': label,
'onChanged': onChanged,
'onSaved': onSaved,
'restorationId': restorationId,
'thumbColor': thumbColor,
'trackColor': trackColor,
'validators': validators,
'value': value,
'visualDensity': visualDensity,
...args,
},
args: args,
registry: registry,
),
),
jsonWidgetType: JsonCupertinoSwitchBuilder.kType,
);