ReactiveRadioListTile<T> constructor
ReactiveRadioListTile<T> ({
- 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,
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,
);
},
);