switchStyle<T> static method
Creates a single selection dropdown with switch style
Implementation
static Widget switchStyle<T>({
required List<T> items,
T? value,
required void Function(dynamic) onChanged,
required Widget Function(T) itemBuilder,
String? hintText,
Color? activeColor,
}) {
return CustomAnimatedMultiDropDown<T>(
animationType: DropdownAnimationType.liquid,
items: items,
value: value,
onChanged: onChanged,
itemBuilder: itemBuilder,
hint: Text(hintText ?? 'Select an option'),
config: MultiDropDownConfig(
selectionMode: SelectionMode.single,
highlightColor: activeColor ?? Colors.blue,
selectorHeight: 56,
indicatorConfig: IndicatorConfig.switchStyle(
activeColor: activeColor ?? Colors.blue,
size: 32,
),
),
);
}