build method

  1. @override
Widget build(
  1. BuildContext context
)
override

Build the widget underneath this widget in the tree

Implementation

@override
Widget build(BuildContext context) {
  return CupertinoSwitch(
    value: value(),
    onChanged: enabled() ? (v) => value.value = v : null,
    activeColor: activeColor,
    trackColor: trackColor,
    activeTrackColor: activeTrackColor,
    inactiveTrackColor: inactiveTrackColor,
    thumbColor: thumbColor,
    inactiveThumbColor: inactiveThumbColor,
    applyTheme: applyTheme,
    focusColor: focusColor,
    onLabelColor: onLabelColor,
    offLabelColor: offLabelColor,
    activeThumbImage: activeThumbImage,
    onActiveThumbImageError: onActiveThumbImageError,
    inactiveThumbImage: inactiveThumbImage,
    onInactiveThumbImageError: onInactiveThumbImageError,
    trackOutlineColor: trackOutlineColor,
    trackOutlineWidth: trackOutlineWidth,
    thumbIcon: thumbIcon,
    mouseCursor: mouseCursor,
    focusNode: focusNode,
    onFocusChange: onFocusChange,
    autofocus: autofocus,
    dragStartBehavior: dragStartBehavior,
  );
}