buildCustom method
_Switch
buildCustom({
- ChildWidgetBuilder? childBuilder,
- required BuildContext context,
- required JsonWidgetData data,
- Key? key,
Builds the widget to render to the tree. If the data
object has a
non-empty id
associated with it and the enabled
property is true
then this will attach the selected value to the JsonWidgetRegistry
using the id
as the key any time the selected value is changed.
Likewise, this will set any error messages using the key '$id.error'. An empty string will be used to represent no error message.
Implementation
@override
_Switch buildCustom({
ChildWidgetBuilder? childBuilder,
required BuildContext context,
required JsonWidgetData data,
Key? key,
}) {
final model = createModel(
childBuilder: childBuilder,
data: data,
);
return _Switch(
activeColor: model.activeColor,
activeThumbImage: model.activeThumbImage,
activeTrackColor: model.activeTrackColor,
autofocus: model.autofocus,
autovalidateMode: model.autovalidateMode,
data: data,
dragStartBehavior: model.dragStartBehavior,
enabled: model.enabled,
focusColor: model.focusColor,
focusNode: model.focusNode,
hoverColor: model.hoverColor,
inactiveThumbColor: model.inactiveThumbColor,
inactiveThumbImage: model.inactiveThumbImage,
inactiveTrackColor: model.inactiveTrackColor,
label: model.label,
materialTapTargetSize: model.materialTapTargetSize,
mouseCursor: model.mouseCursor,
onActiveThumbImageError: model.onActiveThumbImageError,
onChanged: model.onChanged,
onInactiveThumbImageError: model.onInactiveThumbImageError,
onSaved: model.onSaved,
overlayColor: model.overlayColor,
splashRadius: model.splashRadius,
thumbColor: model.thumbColor,
thumbIcon: model.thumbIcon,
trackColor: model.trackColor,
validator: model.validator,
value: model.value,
visualDensity: model.visualDensity,
);
}