MultiSelectCard<T> constructor
- required T value,
- MultiSelectItemDecorations decorations = const MultiSelectItemDecorations(),
- MultiSelectItemTextStyles textStyles = const MultiSelectItemTextStyles(),
- bool selected = false,
- bool enabled = true,
- EdgeInsets? contentPadding,
- bool perpetualSelected = false,
- String? label,
- Widget? child,
- EdgeInsetsGeometry? margin,
- Clip clipBehavior = Clip.hardEdge,
- MultiSelectPrefix? prefix,
- MultiSelectSuffix? suffix,
- Alignment? alignment,
- Color? splashColor,
- Color? highlightColor,
- double? labelGap,
final T
value --
The value for multi select items. it could be String, int or any type.
Also, This will be the value or list of values return onChange
final MultiSelectItemDecorations decorations -- Unique Decoration for each checklist card. use only if you are willing to add different decorations for each checklist. Otherwise, you can use MultiSelectDecorations in MultiSelectCheckList
final MultiSelectItemTextStyles textStyles -- Unique TextStyles for each checklist card. use only if you are willing to add different TextStyles for each checklist. Otherwise, you can use MultiSelectTextStyles in MultiSelectCheckList
final EdgeInsetsGeometry? contentPadding -- Content padding
final bool enabled -- if true - enable checklist card
bool selected -- if true - initially selected, Can be changed at any time
final bool perpetualSelected -- if true - perpetual in the selected status
Implementation
MultiSelectCard({
required T value,
MultiSelectItemDecorations decorations = const MultiSelectItemDecorations(),
MultiSelectItemTextStyles textStyles = const MultiSelectItemTextStyles(),
bool selected = false,
bool enabled = true,
EdgeInsets? contentPadding,
bool perpetualSelected = false,
this.label,
this.child,
this.margin,
this.clipBehavior = Clip.hardEdge,
this.prefix,
this.suffix,
this.alignment,
this.splashColor,
this.highlightColor,
this.labelGap,
}) : super(
value: value,
decorations: decorations,
textStyles: textStyles,
contentPadding: contentPadding,
enabled: enabled,
selected: selected,
perpetualSelected: perpetualSelected,
) {
if (child == null && label == null) {
throw FlutterError(
'The child or label must be provided \n ex - SimpleMultiSelectCard(label: "Dart")');
}
}