OudsToolbarTop class

OUDS iOS tool bar top design guidelines

Reference design version : 1.0.0

The Toolbar top sits at the top of the screen and provides contextual information and controls related to the current view. It typically displays the page title, and may include navigation actions such as “Back,” as well as supplementary actions like menus.

OudsToolbarTop default appearance is opaque but, if you need a translucent blurred toolbar top as specified on OUDS design side. To do this, use OudsToolbarTop with translucent parameter set to true and avoid wrapping the body in a SafeArea as the content must scroll behind the toolbar top to be visible through the blur.

Parameters:

Action Guidelines:

  • Back Action: When using OudsTopBarActionConfig.back, if the previousPageTitle is too long (more than 12 characters), it will automatically be replaced by the default localized "Back" label to maintain a clean layout, following iOS design conventions.

  • Text Actions: For actions created with OudsTopBarActionConfig.text, it is recommended to use short, concise labels (e.g., "Done", "Edit"). Long labels may be truncated or cause layout issues.

Example of code:

OudsToolbarTop(
  style: OudsTopBarSize.small,
  title: 'Profile',
  translucent: true,
  leadingActions: [
      OudsTopBarActionConfig.back(
        previousPageTitle: 'Settings', // Shows: "← Settings"
        onActionPressed: () => Navigator.of(context).pop(),
      ),
    ],
    trailingActions: [
      OudsTopBarActionConfig.icon(
        customIcon: "assets/icons/settings.svg",
        contentDescription: "Settings",
        onActionPressed: () {
          // Handle settings action
        },
      ),
    ],
)
Inheritance
Implemented types

Constructors

OudsToolbarTop({Key? key, OudsTopBarSize? style = OudsTopBarSize.small, String? title, bool translucent = false, List<OudsTopBarActionConfig>? leadingActions, List<OudsTopBarActionConfig>? trailingActions})
const

Properties

hashCode int
The hash code for this object.
no setterinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
leadingActions List<OudsTopBarActionConfig>?
final
preferredSize Size
The size this widget would prefer if it were otherwise unconstrained.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
style OudsTopBarSize?
final
title String?
final
trailingActions List<OudsTopBarActionConfig>?
final
translucent bool
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<OudsToolbarTop>
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

Static Properties

getPreferredSize Size
no setter