pickSegmentSingle<T> static method

Future<T?> pickSegmentSingle<T>(
  1. List<LabelValue<T>> items, {
  2. String? title,
  3. String? message,
  4. T? selected,
  5. bool allowEmpty = false,
})

Implementation

static Future<T?> pickSegmentSingle<T>(List<LabelValue<T>> items, {String? title, String? message, T? selected, bool allowEmpty = false}) async {
  Set<T>? st = await pickSegmentValue(items, title: title, message: message, selected: selected == null ? null : {selected}, allowEmpty: allowEmpty, multi: false);
  return st?.firstOrNull;
}