buildCupertino method
Implementation
@override
Widget buildCupertino(BuildContext context) => CupertinoSwitch(
key: cupertinoSwitchData?.widgetKey ?? platformSwitchData!.widgetKey,
value: cupertinoSwitchData?.value ?? platformSwitchData!.value!,
onChanged: !(cupertinoSwitchData?.isEnabled ?? platformSwitchData!.isEnabled)
? null
: cupertinoSwitchData?.onChanged ?? platformSwitchData!.onChanged,
activeTrackColor: cupertinoSwitchData?.activeTrackColor ?? platformSwitchData?.activeTrackColor,
inactiveTrackColor:
cupertinoSwitchData?.inactiveTrackColor ?? platformSwitchData?.inactiveTrackColor,
thumbColor: cupertinoSwitchData?.activeThumbColor ?? platformSwitchData?.activeThumbColor,
inactiveThumbColor:
cupertinoSwitchData?.inactiveThumbColor ?? platformSwitchData?.inactiveThumbColor,
applyTheme: cupertinoSwitchData?.applyTheme,
focusColor: cupertinoSwitchData?.focusColor ?? platformSwitchData?.focusColor,
onLabelColor: cupertinoSwitchData?.onLabelColor,
offLabelColor: cupertinoSwitchData?.offLabelColor,
activeThumbImage: cupertinoSwitchData?.activeThumbImage ?? platformSwitchData?.activeThumbImage,
onActiveThumbImageError:
cupertinoSwitchData?.onActiveThumbImageError ?? platformSwitchData?.onActiveThumbImageError,
inactiveThumbImage:
cupertinoSwitchData?.inactiveThumbImage ?? platformSwitchData?.inactiveThumbImage,
onInactiveThumbImageError:
cupertinoSwitchData?.onInactiveThumbImageError ??
platformSwitchData?.onInactiveThumbImageError,
trackOutlineColor:
cupertinoSwitchData?.trackOutlineColor ?? platformSwitchData?.trackOutlineColor,
trackOutlineWidth:
cupertinoSwitchData?.trackOutlineWidth ?? platformSwitchData?.trackOutlineWidth,
thumbIcon: cupertinoSwitchData?.thumbIcon ?? platformSwitchData?.thumbIcon,
mouseCursor: cupertinoSwitchData?.mouseCursor ?? platformSwitchData?.mouseCursor,
focusNode: cupertinoSwitchData?.focusNode ?? platformSwitchData?.focusNode,
onFocusChange: cupertinoSwitchData?.onFocusChange ?? platformSwitchData?.onFocusChange,
autofocus:
cupertinoSwitchData?.autofocus ??
platformSwitchData?.autofocus ??
PlatformSwitchData.kDefaultAutofocus,
dragStartBehavior:
cupertinoSwitchData?.dragStartBehavior ??
platformSwitchData?.dragStartBehavior ??
PlatformSwitchData.kDefaultDragStartBehavior,
);