GlassSegment constructor

const GlassSegment({
  1. Widget? icon,
  2. String? label,
  3. Object? id,
  4. String? tooltip,
  5. String? semanticLabel,
  6. bool enabled = true,
})

Creates a segment configuration.

At least one of icon or label must be provided.

Implementation

const GlassSegment({
  this.icon,
  this.label,
  this.id,
  this.tooltip,
  this.semanticLabel,
  this.enabled = true,
}) : assert(
        icon != null || label != null,
        'GlassSegment must have either an icon or a label.',
      );