widget method
Implementation
widget(context) {
switch (_switchListTileType) {
case _NikuSwitchListTileType.adaptive:
return SwitchListTile.adaptive(
key: key,
value: value ?? false,
onChanged: onChanged,
activeColor: activeColor,
activeTrackColor: activeTrackColor,
inactiveThumbColor: inactiveThumbColor,
inactiveTrackColor: inactiveTrackColor,
activeThumbImage: activeThumbImage,
onActiveThumbImageError: onActiveThumbImageError,
inactiveThumbImage: inactiveThumbImage,
onInactiveThumbImageError: onInactiveThumbImageError,
thumbColor: thumbColorState?.value,
trackColor: trackColorState?.value,
trackOutlineColor: trackOutlineColorState?.value,
thumbIcon: thumbIconState?.value,
materialTapTargetSize: materialTapTargetSize,
dragStartBehavior: dragStartBehavior ?? DragStartBehavior.start,
mouseCursor: mouseCursor,
overlayColor: overlayColorState?.value,
splashRadius: splashRadius,
focusNode: focusNode,
onFocusChange: onFocusChange,
autofocus: autofocus ?? false,
tileColor: tileColor,
title: title,
subtitle: subtitle,
secondary: secondary,
isThreeLine: isThreeLine ?? false,
dense: dense,
contentPadding: contentPadding?.value,
selected: selected ?? false,
controlAffinity: controlAffinity ?? ListTileControlAffinity.platform,
shape: shape,
selectedTileColor: selectedTileColor,
visualDensity: visualDensity,
enableFeedback: enableFeedback,
hoverColor: hoverColor,
applyCupertinoTheme: applyCupertinoTheme,
);
case _NikuSwitchListTileType.cupertino:
return CupertinoSwitch(
key: key,
value: value ?? false,
onChanged: onChanged,
activeColor: activeColor,
dragStartBehavior: dragStartBehavior ?? DragStartBehavior.start,
);
default:
return SwitchListTile(
key: key,
value: value ?? false,
onChanged: onChanged,
activeColor: activeColor,
activeTrackColor: activeTrackColor,
inactiveThumbColor: inactiveThumbColor,
inactiveTrackColor: inactiveTrackColor,
activeThumbImage: activeThumbImage,
onActiveThumbImageError: onActiveThumbImageError,
inactiveThumbImage: inactiveThumbImage,
onInactiveThumbImageError: onInactiveThumbImageError,
thumbColor: thumbColorState?.value,
trackColor: trackColorState?.value,
trackOutlineColor: trackOutlineColorState?.value,
thumbIcon: thumbIconState?.value,
materialTapTargetSize: materialTapTargetSize,
dragStartBehavior: dragStartBehavior ?? DragStartBehavior.start,
mouseCursor: mouseCursor,
overlayColor: overlayColorState?.value,
splashRadius: splashRadius,
focusNode: focusNode,
onFocusChange: onFocusChange,
autofocus: autofocus ?? false,
tileColor: tileColor,
title: title,
subtitle: subtitle,
secondary: secondary,
isThreeLine: isThreeLine ?? false,
dense: dense,
contentPadding: contentPadding?.value,
selected: selected ?? false,
controlAffinity: controlAffinity ?? ListTileControlAffinity.platform,
shape: shape,
selectedTileColor: selectedTileColor,
visualDensity: visualDensity,
enableFeedback: enableFeedback,
hoverColor: hoverColor,
);
}
}