buildCustom method
_CupertinoSwitch
buildCustom({
- ChildWidgetBuilder? childBuilder,
- required BuildContext context,
- required JsonWidgetData data,
- Key? key,
Custom builder that subclasses must override and implement to return the actual Widget to be placed on the tree.
Implementation
@override
_CupertinoSwitch buildCustom({
ChildWidgetBuilder? childBuilder,
required BuildContext context,
required JsonWidgetData data,
Key? key,
}) {
final model = createModel(
childBuilder: childBuilder,
data: data,
);
final validatorsDecoded = _decodeValidators(
value: model.validators,
);
return _CupertinoSwitch(
activeColor: model.activeColor,
autovalidateMode: model.autovalidateMode,
data: data,
dragStartBehavior: model.dragStartBehavior,
enabled: model.enabled,
label: model.label,
onChanged: model.onChanged,
onSaved: model.onSaved,
restorationId: model.restorationId,
thumbColor: model.thumbColor,
trackColor: model.trackColor,
validators: validatorsDecoded,
value: model.value,
visualDensity: model.visualDensity,
);
}