Radio<T>.adaptive constructor

const Radio<T>.adaptive({
  1. Key? key,
  2. required T value,
  3. @Deprecated('Use a RadioGroup ancestor to manage group value instead. ' 'This feature was deprecated after v3.32.0-0.0.pre.') T? groupValue,
  4. @Deprecated('Use RadioGroup to handle value change instead. ' 'This feature was deprecated after v3.32.0-0.0.pre.') ValueChanged<T?>? onChanged,
  5. MouseCursor? mouseCursor,
  6. bool toggleable = false,
  7. Color? activeColor,
  8. MaterialStateProperty<Color?>? fillColor,
  9. Color? focusColor,
  10. Color? hoverColor,
  11. MaterialStateProperty<Color?>? overlayColor,
  12. double? splashRadius,
  13. MaterialTapTargetSize? materialTapTargetSize,
  14. VisualDensity? visualDensity,
  15. FocusNode? focusNode,
  16. bool autofocus = false,
  17. bool useCupertinoCheckmarkStyle = false,
  18. bool? enabled,
  19. RadioGroupRegistry<T>? groupRegistry,
  20. WidgetStateProperty<Color?>? backgroundColor,
  21. BorderSide? side,
  22. WidgetStateProperty<double?>? innerRadius,
})

Creates an adaptive Radio based on whether the target platform is iOS or macOS, following Material design's Cross-platform guidelines.

On iOS and macOS, this constructor creates a CupertinoRadio, which has matching functionality and presentation as Material checkboxes, and are the graphics expected on iOS. On other platforms, this creates a Material design Radio.

If a CupertinoRadio is created, the following parameters are ignored: mouseCursor, fillColor, hoverColor, overlayColor, splashRadius, materialTapTargetSize, visualDensity.

useCupertinoCheckmarkStyle is used only if a CupertinoRadio is created.

The target platform is based on the current Theme: ThemeData.platform.

Implementation

const Radio.adaptive({
  super.key,
  required this.value,
  @Deprecated(
    'Use a RadioGroup ancestor to manage group value instead. '
    'This feature was deprecated after v3.32.0-0.0.pre.',
  )
  this.groupValue,
  @Deprecated(
    'Use RadioGroup to handle value change instead. '
    'This feature was deprecated after v3.32.0-0.0.pre.',
  )
  this.onChanged,
  this.mouseCursor,
  this.toggleable = false,
  this.activeColor,
  this.fillColor,
  this.focusColor,
  this.hoverColor,
  this.overlayColor,
  this.splashRadius,
  this.materialTapTargetSize,
  this.visualDensity,
  this.focusNode,
  this.autofocus = false,
  this.useCupertinoCheckmarkStyle = false,
  this.enabled,
  this.groupRegistry,
  this.backgroundColor,
  this.side,
  this.innerRadius,
}) : _radioType = _RadioType.adaptive;