AdvancedPill class
Reusable AdvancedPill component for the Alter Design System.
Figma Specifications (Node 349:15869):
- Variants:
type=Gray(130:8539): FillbaseGray(#F9FAFB), Border 1pxbaseBorder(#E5E7EB)type=White(349:15870): FillbaseWhite(#FFFFFF), Border 1pxbaseBorder(#E5E7EB)
- Border Radius: 24px
- Padding: 12px vertical, 16px horizontal
- Gap: 8px
- Left Slot:
ButtonIconGhost(24x24,ButtonIconGhostType.secondary), visible whenhasLeftSlot(default: true) - Right Slot:
ButtonIconGhost(24x24,ButtonIconGhostType.secondary), visible whenhasRightSlot(default: false) - Title: Geist 12px SemiBold 600 (
AlterTypography.captionBold), TexttextPrimary(#000000) - Subtitle: Geist 12px Regular 400 (
AlterTypography.caption), TexttextDisabled(#99A1AF)
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- AdvancedPill
Constructors
- AdvancedPill({Key? key, String title = 'Title', String? subtitle = 'Subtitle', bool hasSubtitle = true, AdvancedPillType type = AdvancedPillType.gray, bool hasLeftSlot = true, IconData? leftIcon, Widget? leftSlot, bool hasRightSlot = false, IconData? rightIcon, Widget? rightSlot})
-
Creates an AdvancedPill instance.
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasLeftSlot → bool
-
Whether the leading slot should be rendered.
final
- hasRightSlot → bool
-
Whether the trailing slot should be rendered.
final
- hasSubtitle → bool
-
Whether the subtitle should be rendered when available.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- leftIcon → IconData?
-
Icon to show in the leading slot if leftSlot is not provided.
final
- leftSlot → Widget?
-
Custom widget for the leading slot.
final
- rightIcon → IconData?
-
Icon to show in the trailing slot if rightSlot is not provided.
final
- rightSlot → Widget?
-
Custom widget for the trailing slot.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- subtitle → String?
-
Optional secondary subtitle displayed below the title.
final
- title → String
-
Primary label text displayed in the pill.
final
- type → AdvancedPillType
-
Visual theme style type.
final
Methods
-
build(
BuildContext context) → Widget -
Describes the part of the user interface represented by this widget.
override
-
createElement(
) → StatelessElement -
Creates a StatelessElement to manage this widget's location in the tree.
inherited
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of DiagnosticsNode objects describing this node's
children.
inherited
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A short, textual description of this widget.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- version → const String
- Component version for reference. v1.2.0: Added explicit hasSubtitle boolean property matching Figma Node 349:15869 and aligned White variant border with AlterSemanticTokens.baseBorder. v1.1.0: Removed onTap, onLeftTap, onRightTap. Slots now directly receive child widgets (such as ButtonIconGhost) that manage their own interactions. Set generic default strings for title and subtitle. v1.0.0: Initial release matching Figma Node 349:15869.