MultiSelectDropDown.network constructor
const
MultiSelectDropDown.network({
- Key? key,
- required NetworkConfig? networkConfig,
- required Future<
List< responseParser(ValueItem> >- dynamic
- Widget responseErrorBuilder(
- BuildContext,
- dynamic
- required OnOptionSelected? onOptionSelected,
- Color? selectedOptionTextColor,
- Widget? optionSeperator,
- ChipConfig chipConfig = const ChipConfig(),
- SelectionType selectionType = SelectionType.multi,
- String hint = 'Select',
- Color? hintColor = Colors.grey,
- double? hintFontSize = 14.0,
- List<
ValueItem> selectedOptions = const [], - List<
ValueItem> disabledOptions = const [], - bool alwaysShowOptionIcon = false,
- TextStyle? optionTextStyle,
- Icon? selectedOptionIcon = const Icon(Icons.check),
- Color? selectedOptionBackgroundColor,
- Color? optionsBackgroundColor,
- Color? backgroundColor = Colors.white,
- double dropdownHeight = 200,
- bool showChipInSingleSelectMode = false,
- IconData? suffixIcon = Icons.arrow_drop_down,
- Widget selectedItemBuilder()?,
- Widget? optionSeparator,
- Decoration? inputDecoration,
- TextStyle? hintStyle,
- EdgeInsets? padding = const EdgeInsets.symmetric(horizontal: 8, vertical: 8),
- Color? borderColor = Colors.grey,
- double? borderWidth = 0.4,
- double? borderRadius = 12.0,
- BorderRadiusGeometry? radiusGeometry,
- bool showClearIcon = true,
Constructor for MultiSelectDropDown that fetches the options from a network call.
networkConfig
is the configuration for the network call.
responseParser
is the parser that is used to parse the response from the network call.
responseErrorBuilder
is the builder that is used to build the error widget when the network call fails.
Implementation
const MultiSelectDropDown.network(
{Key? key,
required this.networkConfig,
required this.responseParser,
this.responseErrorBuilder,
required this.onOptionSelected,
this.selectedOptionTextColor,
this.optionSeperator,
this.chipConfig = const ChipConfig(),
this.selectionType = SelectionType.multi,
this.hint = 'Select',
this.hintColor = Colors.grey,
this.hintFontSize = 14.0,
this.selectedOptions = const [],
this.disabledOptions = const [],
this.alwaysShowOptionIcon = false,
this.optionTextStyle,
this.selectedOptionIcon = const Icon(Icons.check),
this.selectedOptionBackgroundColor,
this.optionsBackgroundColor,
this.backgroundColor = Colors.white,
this.dropdownHeight = 200,
this.showChipInSingleSelectMode = false,
this.suffixIcon = Icons.arrow_drop_down,
this.selectedItemBuilder,
this.optionSeparator,
this.inputDecoration,
this.hintStyle,
this.padding = const EdgeInsets.symmetric(
horizontal: 8,
vertical: 8,
),
this.borderColor = Colors.grey,
this.borderWidth = 0.4,
this.borderRadius = 12.0,
this.radiusGeometry,
this.showClearIcon = true})
: options = const [],
super(key: key);