radioListTile<T> function

Widget radioListTile<T>({
  1. required T value,
  2. required T groupValue,
  3. required String title,
  4. required String subTitle,
  5. required dynamic onChanged(
    1. T?
    )?,
  6. bool toggleable = true,
})

Implementation

Widget radioListTile<T>({
  required final T value,
  required final T groupValue,
  required final String title,
  required final String subTitle,
  required final Function(T?)? onChanged,
  final bool toggleable = true,
}) =>
    RadioListTile<T>(
      toggleable: toggleable,
      controlAffinity: ListTileControlAffinity.leading,
      title: Text(title),
      subtitle: FittedBox(alignment: Alignment.centerRight, fit: BoxFit.scaleDown, child: Text(subTitle)),
      groupValue: groupValue,
      value: value,
      onChanged: onChanged,
    ).container(
      radius: 20,
      borderColor: Theme.of(navigatorKey.currentContext!).colorScheme.onSurface.withValues(alpha: 0.2),
      margin: const EdgeInsets.symmetric(horizontal: 20),
    );