SegmentsRadioB<T> function

  1. @Deprecated("Use SegmentsBind instead.")
SegmentedButton<T> SegmentsRadioB<T>(
  1. Binder<T?> binder, {
  2. Key? key,
  3. required List<ButtonSegment<T>> segments,
  4. bool emptySelectionAllowed = true,
  5. ButtonStyle? style,
  6. bool showSelectedIcon = false,
  7. Widget? selectedIcon,
})

Implementation

@Deprecated("Use SegmentsBind instead.")
SegmentedButton<T> SegmentsRadioB<T>(Binder<T?> binder,
    {Key? key, required List<ButtonSegment<T>> segments, bool emptySelectionAllowed = true, ButtonStyle? style, bool showSelectedIcon = false, Widget? selectedIcon}) {
  return SegmentedButton<T>(
      key: key,
      multiSelectionEnabled: false,
      emptySelectionAllowed: emptySelectionAllowed,
      style: style ?? SegStyle,
      segments: segments,
      selected: binder.value == null ? {} : {binder.value as T},
      showSelectedIcon: showSelectedIcon,
      selectedIcon: selectedIcon,
      onSelectionChanged: (vset) {
        binder.value = vset.firstOrNull;
        binder.fireUpdateUI();
        binder.fireChanged();
      });
}