GlassChip constructor

const GlassChip({
  1. required String label,
  2. Key? key,
  3. Widget? icon,
  4. VoidCallback? onTap,
  5. bool? enabled,
  6. VoidCallback? onDeleted,
  7. bool selected = false,
  8. Color? selectedColor,
  9. Widget? deleteIcon,
  10. double deleteIconSize = 16.0,
  11. double iconSize = 16.0,
  12. Color? iconColor,
  13. TextStyle? labelStyle,
  14. EdgeInsetsGeometry padding = const EdgeInsets.symmetric(horizontal: 12, vertical: 8),
  15. double spacing = 6.0,
  16. LiquidGlassSettings? settings,
  17. bool useOwnLayer = false,
  18. GlassQuality? quality,
  19. GlassSurfaceStyle? surfaceStyle,
  20. Color? color,
  21. bool platformViewBackdrop = false,
  22. double interactionScale = 1.03,
  23. double stretch = 0.3,
  24. double glowRadius = 0.8,
  25. bool anchorStretch = true,
  26. AnchorStretchSettings anchorStretchSettings = const AnchorStretchSettings(),
  27. FocusNode? focusNode,
  28. bool autofocus = false,
  29. String? semanticLabel,
  30. String? deleteSemanticLabel,
})

Creates a glass chip.

Implementation

const GlassChip({
  required this.label,
  super.key,
  this.icon,
  this.onTap,
  this.enabled,
  this.onDeleted,
  this.selected = false,
  this.selectedColor,
  Widget? deleteIcon,
  this.deleteIconSize = 16.0,
  this.iconSize = 16.0,
  this.iconColor,
  this.labelStyle,
  this.padding = const EdgeInsets.symmetric(horizontal: 12, vertical: 8),
  this.spacing = 6.0,
  this.settings,
  this.useOwnLayer = false,
  this.quality,
  this.surfaceStyle,
  this.color,
  this.platformViewBackdrop = false,
  // GlassButton properties
  this.interactionScale = 1.03,
  this.stretch = 0.3,
  this.glowRadius = 0.8,
  this.anchorStretch = true,
  this.anchorStretchSettings = const AnchorStretchSettings(),
  this.focusNode,
  this.autofocus = false,
  this.semanticLabel,
  this.deleteSemanticLabel,
}) : deleteIcon = deleteIcon ?? const Icon(CupertinoIcons.xmark_circle_fill);