RadioCards<T> constructor

const RadioCards<T>({
  1. Key? key,
  2. required Widget builder(
    1. T
    ),
  3. required void onChanged(
    1. T
    ),
  4. required List<T> items,
  5. T? value,
})

Creates a RadioCards widget.

The builder function renders each item as a child of RadioCard, allowing custom UI for options. onChanged is invoked when a selection is made, passing the newly selected value for state updates. items is the list of selectable options to display as radio cards. value is the currently selected item, or null if none is selected, determining the active state.

Initializes a centered Row of RadioCard widgets wrapped in RadioGroup for unified selection handling, with PaddingHorizontal applied for spacing between cards.

Implementation

const RadioCards({
  super.key,
  required this.builder,
  required this.onChanged,
  required this.items,
  this.value,
});