listOrNull<T> method
T?
listOrNull<T>({
- required String label,
- required List<
T?> options, - T? initialOption,
- String? description,
- LabelBuilder<
T?> ? labelBuilder,
Allow the users to select from a list of options in a drop down box that might contain a null value.
Implementation
T? listOrNull<T>({
required String label,
required List<T?> options,
T? initialOption,
String? description,
LabelBuilder<T?>? labelBuilder,
}) {
return onKnobAdded(
ListKnob<T?>.nullable(
label: label,
initialValue: initialOption,
description: description,
options: options,
labelBuilder: labelBuilder,
),
);
}