SwitchB function

Switch SwitchB(
  1. Binder<bool> binder, {
  2. Color? activeColor,
  3. Color? activeTrackColor,
  4. Color? inactiveThumbColor,
  5. Color? inactiveTrackColor,
  6. ImageProvider<Object>? activeThumbImage,
  7. void onActiveThumbImageError(
    1. Object,
    2. StackTrace?
    )?,
  8. ImageProvider<Object>? inactiveThumbImage,
  9. void onInactiveThumbImageError(
    1. Object,
    2. StackTrace?
    )?,
  10. WidgetStateProperty<Color?>? thumbColor,
  11. WidgetStateProperty<Color?>? trackColor,
  12. WidgetStateProperty<Color?>? trackOutlineColor,
  13. WidgetStateProperty<double?>? trackOutlineWidth,
  14. WidgetStateProperty<Icon?>? thumbIcon,
  15. MaterialTapTargetSize? materialTapTargetSize,
  16. DragStartBehavior dragStartBehavior = DragStartBehavior.start,
  17. MouseCursor? mouseCursor,
  18. Color? focusColor,
  19. Color? hoverColor,
  20. WidgetStateProperty<Color?>? overlayColor,
  21. double? splashRadius,
  22. FocusNode? focusNode,
  23. void onFocusChange(
    1. bool
    )?,
  24. bool autofocus = false,
})

Implementation

Switch SwitchB(Binder<bool> binder,
    {Color? activeColor,
    Color? activeTrackColor,
    Color? inactiveThumbColor,
    Color? inactiveTrackColor,
    ImageProvider<Object>? activeThumbImage,
    void Function(Object, StackTrace?)? onActiveThumbImageError,
    ImageProvider<Object>? inactiveThumbImage,
    void Function(Object, StackTrace?)? onInactiveThumbImageError,
    WidgetStateProperty<Color?>? thumbColor,
    WidgetStateProperty<Color?>? trackColor,
    WidgetStateProperty<Color?>? trackOutlineColor,
    WidgetStateProperty<double?>? trackOutlineWidth,
    WidgetStateProperty<Icon?>? thumbIcon,
    MaterialTapTargetSize? materialTapTargetSize,
    DragStartBehavior dragStartBehavior = DragStartBehavior.start,
    MouseCursor? mouseCursor,
    Color? focusColor,
    Color? hoverColor,
    WidgetStateProperty<Color?>? overlayColor,
    double? splashRadius,
    FocusNode? focusNode,
    void Function(bool)? onFocusChange,
    bool autofocus = false}) {
  return Switch(
      value: binder.value,
      onChanged: (b) {
        binder.value = b;
        binder.fireUpdateUI();
        binder.fireChanged();
      },
      activeThumbColor: activeColor,
      activeTrackColor: activeTrackColor,
      inactiveThumbColor: inactiveThumbColor,
      inactiveTrackColor: inactiveTrackColor,
      activeThumbImage: activeThumbImage,
      onActiveThumbImageError: onActiveThumbImageError,
      inactiveThumbImage: inactiveThumbImage,
      onInactiveThumbImageError: onInactiveThumbImageError,
      thumbColor: thumbColor,
      trackColor: trackColor,
      trackOutlineColor: trackOutlineColor,
      trackOutlineWidth: trackOutlineWidth,
      thumbIcon: thumbIcon,
      materialTapTargetSize: materialTapTargetSize,
      dragStartBehavior: dragStartBehavior,
      mouseCursor: mouseCursor,
      focusColor: focusColor,
      hoverColor: hoverColor,
      overlayColor: overlayColor,
      splashRadius: splashRadius,
      focusNode: focusNode,
      onFocusChange: onFocusChange,
      autofocus: autofocus);
}