FormCast.chips constructor

FormCast.chips({
  1. required List options,
  2. Color? backgroundColor,
  3. Color? selectedColor,
  4. double headerSpacing = 5,
  5. double footerSpacing = 5,
  6. OutlinedBorder shape = const RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(8))),
  7. BorderSide unselectedSide = const BorderSide(color: Colors.grey, width: 1),
  8. BorderSide selectedSide = const BorderSide(color: Colors.grey, width: 1),
  9. TextStyle labelStyle = const TextStyle(fontWeight: FontWeight.bold, color: Colors.black),
  10. TextStyle unselectedTextStyle = const TextStyle(fontWeight: FontWeight.bold, color: Colors.black),
  11. TextStyle selectedTextStyle = const TextStyle(fontWeight: FontWeight.bold, color: Colors.white),
  12. EdgeInsets padding = const EdgeInsets.all(8.0),
  13. double runSpacing = 8.0,
  14. double spacing = 8.0,
  15. Color checkmarkColor = Colors.white,
})

Cast to a chips

Implementation

FormCast.chips({
  required List<dynamic> options,
  Color? backgroundColor,
  Color? selectedColor,
  double headerSpacing = 5,
  double footerSpacing = 5,
  OutlinedBorder shape = const RoundedRectangleBorder(
      borderRadius: BorderRadius.all(Radius.circular(8))),
  BorderSide unselectedSide = const BorderSide(color: Colors.grey, width: 1),
  BorderSide selectedSide = const BorderSide(color: Colors.grey, width: 1),
  TextStyle labelStyle =
      const TextStyle(fontWeight: FontWeight.bold, color: Colors.black),
  TextStyle unselectedTextStyle =
      const TextStyle(fontWeight: FontWeight.bold, color: Colors.black),
  TextStyle selectedTextStyle =
      const TextStyle(fontWeight: FontWeight.bold, color: Colors.white),
  EdgeInsets padding = const EdgeInsets.all(8.0),
  double runSpacing = 8.0,
  double spacing = 8.0,
  Color checkmarkColor = Colors.white,
}) {
  type = "chip";
  metaData = {};
  metaData['options'] = options;
  metaData['backgroundColor'] = backgroundColor;
  metaData['selectedColor'] = selectedColor;
  metaData['headerSpacing'] = headerSpacing;
  metaData['footerSpacing'] = footerSpacing;
  metaData['shape'] = shape;
  metaData['unselectedSide'] = unselectedSide;
  metaData['selectedSide'] = selectedSide;
  metaData['labelStyle'] = labelStyle;
  metaData['unselectedTextStyle'] = unselectedTextStyle;
  metaData['selectedTextStyle'] = selectedTextStyle;
  metaData['padding'] = padding;
  metaData['runSpacing'] = runSpacing;
  metaData['spacing'] = spacing;
  metaData['checkmarkColor'] = checkmarkColor;
}