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,
})

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({
  Key? key,
  String? formControlName,
  FormControl<T>? 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,
  FocusNode? focusNode,
  bool? enableFeedback,
}) : super(
        key: key,
        formControl: formControl,
        formControlName: formControlName,
        builder: (field) {
          final state = field as _ReactiveRadioListTileState<T, T>;

          state._setFocusNode(focusNode);

          return RadioListTile<T>(
            value: value,
            groupValue: field.value,
            onChanged: field.control.enabled ? field.didChange : null,
            activeColor: activeColor,
            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: state.focusNode,
            enableFeedback: enableFeedback,
          );
        },
      );