selectedChoices function

List<String> selectedChoices(
  1. dynamic value
)

Implementation

List<String> selectedChoices(dynamic value) {
  if (value is String) return value.isEmpty ? [] : [value];
  if (value is List) return value.whereType<String>().toList();
  if (value is Map && value['selected'] is List) return (value['selected'] as List).whereType<String>().toList();
  return [];
}