ReactiveRadioListTile<T> constructor

ReactiveRadioListTile<T>({
  1. Key? key,
  2. String? formControlName,
  3. FormControl<T>? formControl,
  4. required T value,
  5. Color? activeColor,
  6. Color? selectedTileColor,
  7. Color? tileColor,
  8. Widget? title,
  9. Widget? subtitle,
  10. bool isThreeLine = false,
  11. bool? dense,
  12. Widget? secondary,
  13. ListTileControlAffinity controlAffinity = ListTileControlAffinity.platform,
  14. EdgeInsetsGeometry? contentPadding,
  15. bool toggleable = false,
  16. ShapeBorder? shape,
  17. bool autofocus = false,
  18. bool selected = false,
  19. VisualDensity? visualDensity,
  20. FocusNode? focusNode,
  21. bool? enableFeedback,
  22. ReactiveFormFieldCallback<T>? onChanged,
  23. MouseCursor? mouseCursor,
  24. WidgetStateProperty<Color?>? fillColor,
  25. Color? hoverColor,
  26. WidgetStateProperty<Color?>? overlayColor,
  27. double? splashRadius,
  28. MaterialTapTargetSize? materialTapTargetSize,
  29. double radioScaleFactor = 1.0,
  30. ValueChanged<bool>? onFocusChange,
})

Create an instance of a ReactiveRadioListTile.

Can optionally provide a formControl to bind this widget to a control.

Can optionally provide a formControlName to bind this ReactiveFormField to a FormControl.

Must provide one of the arguments formControl or a formControlName, but not both at the same time.

See also RadioListTile

Implementation

ReactiveRadioListTile({
  super.key,
  super.formControlName,
  super.formControl,
  required T value,
  Color? activeColor,
  Color? selectedTileColor,
  Color? tileColor,
  Widget? title,
  Widget? subtitle,
  bool isThreeLine = false,
  bool? dense,
  Widget? secondary,
  ListTileControlAffinity controlAffinity = ListTileControlAffinity.platform,
  EdgeInsetsGeometry? contentPadding,
  bool toggleable = false,
  ShapeBorder? shape,
  bool autofocus = false,
  bool selected = false,
  VisualDensity? visualDensity,
  super.focusNode,
  bool? enableFeedback,
  ReactiveFormFieldCallback<T>? onChanged,
  MouseCursor? mouseCursor,
  WidgetStateProperty<Color?>? fillColor,
  Color? hoverColor,
  WidgetStateProperty<Color?>? overlayColor,
  double? splashRadius,
  MaterialTapTargetSize? materialTapTargetSize,
  double radioScaleFactor = 1.0,
  ValueChanged<bool>? onFocusChange,
}) : super(
       builder: (field) {
         return RadioListTile<T>(
           value: value,
           groupValue: field.value,
           mouseCursor: mouseCursor,
           activeColor: activeColor,
           hoverColor: hoverColor,
           overlayColor: overlayColor,
           materialTapTargetSize: materialTapTargetSize,
           fillColor: fillColor,
           splashRadius: splashRadius,
           onFocusChange: onFocusChange,
           selectedTileColor: selectedTileColor,
           tileColor: tileColor,
           title: title,
           subtitle: subtitle,
           isThreeLine: isThreeLine,
           dense: dense,
           secondary: secondary,
           controlAffinity: controlAffinity,
           contentPadding: contentPadding,
           toggleable: toggleable,
           shape: shape,
           selected: selected,
           autofocus: autofocus,
           visualDensity: visualDensity,
           focusNode: field.focusNode,
           enableFeedback: enableFeedback,
           radioScaleFactor: radioScaleFactor,
           onChanged:
               field.control.enabled
                   ? (value) {
                     field.didChange(value);
                     onChanged?.call(field.control);
                   }
                   : null,
         );
       },
     );