OudsLink.previous constructor

const OudsLink.previous({
  1. Key? key,
  2. required String label,
  3. OudsLinkSize size = OudsLinkSize.defaultSize,
  4. OudsLinkDensity density = OudsLinkDensity.defaultDensity,
  5. VoidCallback? onPressed,
})

Creates an OudsLink used for "backward" navigation, displaying a leading chevron before the label.

  • key : Controls how one widget replaces another widget in the tree.
  • label : The text displayed by the link. Required, non-empty; wraps onto multiple lines automatically if it doesn't fit the available width.
  • size : The size of the link, OudsLinkSize.defaultSize or OudsLinkSize.small, controlling text style, chevron size and touch target dimensions. Defaults to OudsLinkSize.defaultSize.
  • density : The density of the link, OudsLinkDensity.defaultDensity or OudsLinkDensity.compact, controlling the minimum height and block padding. Defaults to OudsLinkDensity.defaultDensity.
  • onPressed : Callback invoked when the link is tapped or activated (keyboard/screen reader), typically to navigate back. When null, the link is rendered and announced as disabled and cannot receive focus.

The leading chevron icon is fixed and cannot be customized (unlike OudsLink.icon).

Implementation

const OudsLink.previous({
  super.key,
  required this.label,
  this.size = OudsLinkSize.defaultSize,
  this.density = OudsLinkDensity.defaultDensity,
  this.onPressed,
}) : icon = null,
     tinted = true,
     _indicator = OudsLinkIndicator.previous,
     layout = OudsLinkLayout.back;