label property

String? label
final

Optional text label displayed inside the capsule.

Mutually exclusive with child. Can be paired with icon. A label wider than the space the toggle gets wraps onto more lines, as at large text sizes, and the capsule grows to fit; with an explicit height it stays on one line and ends in an ellipsis.

Implementation

final String? label;