OudsLink class

OUDS Link design guidelines

Reference design version : 2.4.0

Link is a UI element that allows to navigate from one location to another, either within the same page or across different pages in the same resource, or to an external resource. Link's primary function is navigation and it communicates its interactive nature visually and semantically.

parameters :

OudsLink provides a dedicated named constructor for every supported variant:

  • The default (unnamed) constructor renders a text-only link.
  • OudsLink.icon renders a label with a custom icon.
  • OudsLink.previous renders a "backward" navigation link with a leading chevron.
  • OudsLink.next renders a "forward" navigation link with a trailing chevron.
  • OudsLink.external renders a link navigating outside the current context, with a trailing indicator.

Small Text only :

This is the default layout of the component.

OudsLink(
      label: 'Label',
      size: OudsLinkSize.small,
      onPressed: () {}
    );

Creates an OudsLink displaying its label alongside a custom icon.

OudsLink.icon(
      label: 'Label',
      icon: OudsIcon('assets/ic_heart.svg'),
      onPressed: () {}
    );

Next :

Creates an OudsLink used for standard navigation, displaying a trailing chevron after the label.

OudsLink.next(
      label: 'Label',
      onPressed: () {}
    );

Previous :

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

OudsLink.previous(
      label: 'Label',
      onPressed: () {}
    );

External :

Creates an OudsLink used to navigate outside the current product, service or application. The external navigation indicator informs users that the destination belongs to another context.

OudsLink.external(
      label: 'Label',
      onPressed: () {}
    );

Reduces the link's minimum height and block padding, useful in dense layouts.

OudsLink(
      label: 'Label',
      density: OudsLinkDensity.compact,
      onPressed: () {}
    );
Inheritance

Constructors

OudsLink({Key? key, required String label, @Deprecated('This parameter is deprecated and will be removed in a future version. Use the dedicated OudsLink.icon constructor instead with new object OudsIcon.') OudsIcon? icon, @Deprecated('OudsLinkLayout is deprecated and will be removed in a future version. ' 'Use the dedicated OudsLink.icon, OudsLink.previous, OudsLink.next or ' 'OudsLink.external constructors instead.') OudsLinkLayout layout = OudsLinkLayout.textOnly, OudsLinkSize size = OudsLinkSize.defaultSize, OudsLinkDensity density = OudsLinkDensity.defaultDensity, VoidCallback? onPressed})
Creates a text-only OudsLink.
const
OudsLink.external({Key? key, required String label, OudsLinkSize size = OudsLinkSize.defaultSize, OudsLinkDensity density = OudsLinkDensity.defaultDensity, VoidCallback? onPressed})
Creates an OudsLink navigating outside the current product, service or application, displaying a trailing external indicator after the label.
const
OudsLink.icon({Key? key, required String label, required OudsIcon? icon, OudsLinkSize size = OudsLinkSize.defaultSize, OudsLinkDensity density = OudsLinkDensity.defaultDensity, VoidCallback? onPressed})
Creates an OudsLink displaying its label alongside a custom icon.
const
OudsLink.next({Key? key, required String label, OudsLinkSize size = OudsLinkSize.defaultSize, OudsLinkDensity density = OudsLinkDensity.defaultDensity, VoidCallback? onPressed})
Creates an OudsLink used for standard navigation, displaying a trailing chevron after the label.
const
OudsLink.previous({Key? key, required String label, OudsLinkSize size = OudsLinkSize.defaultSize, OudsLinkDensity density = OudsLinkDensity.defaultDensity, VoidCallback? onPressed})
Creates an OudsLink used for "backward" navigation, displaying a leading chevron before the label.
const

Properties

density → OudsLinkDensity
final
hashCode → int
The hash code for this object.
no setterinherited
icon → OudsIcon?
final
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
label → String
final
layout → OudsLinkLayout
final
onPressed → VoidCallback?
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
size → OudsLinkSize
final

Methods

createElement() → StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → State<OudsLink>
Creates the mutable state for this widget at a given location in the tree.
override
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