MultiSelectCard<T> constructor

MultiSelectCard<T>({
  1. required T value,
  2. MultiSelectItemDecorations decorations = const MultiSelectItemDecorations(),
  3. MultiSelectItemTextStyles textStyles = const MultiSelectItemTextStyles(),
  4. bool selected = false,
  5. bool enabled = true,
  6. EdgeInsets? contentPadding,
  7. bool perpetualSelected = false,
  8. String? label,
  9. Widget? child,
  10. EdgeInsetsGeometry? margin,
  11. Clip clipBehavior = Clip.hardEdge,
  12. MultiSelectPrefix? prefix,
  13. MultiSelectSuffix? suffix,
  14. Alignment? alignment,
  15. Color? splashColor,
  16. Color? highlightColor,
  17. 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")');
  }
}