CupertinoNavigationBar class

An iOS-styled navigation bar.

The navigation bar is a toolbar that minimally consists of a widget, normally a page title, in the middle of the toolbar.

It also supports a leading and trailing widget before and after the middle widget while keeping the middle widget centered.

The leading widget will automatically be a back chevron icon button (or a close button in case of a fullscreen dialog) to pop the current route if none is provided and automaticallyImplyLeading is true (true by default).

The middle widget will automatically be a title text from the current route if none is provided and automaticallyImplyMiddle is true (true by default).

It should be placed at top of the screen and automatically accounts for the OS's status bar.

If the given backgroundColor's opacity is not 1.0 (which is the case by default), it will produce a blurring effect to the content behind it.

When transitionBetweenRoutes is true, this navigation bar will transition on top of the routes instead of inside it if the route being transitioned to also has a CupertinoNavigationBar or a CupertinoSliverNavigationBar with transitionBetweenRoutes set to true. If transitionBetweenRoutes is true, none of the Widget parameters can contain a key in its subtree since that widget will exist in multiple places in the tree simultaneously.

See also:

Inheritance
Implements

Constructors

CupertinoNavigationBar({Key key, Widget leading, bool automaticallyImplyLeading: true, bool automaticallyImplyMiddle: true, String previousPageTitle, Widget middle, Widget trailing, Border border: _kDefaultNavBarBorder, Color backgroundColor: _kDefaultNavBarBackgroundColor, EdgeInsetsDirectional padding, Color actionsForegroundColor: CupertinoColors.activeBlue, bool transitionBetweenRoutes: true, Object heroTag: _defaultHeroTag })
Creates a navigation bar in the iOS style.
const

Properties

actionsForegroundColor Color
Default color used for text and icons of the leading and trailing widgets in the navigation bar. [...]
final
automaticallyImplyLeading → bool
final
automaticallyImplyMiddle → bool
Controls whether we should try to imply the middle widget if null. [...]
final
backgroundColor Color
final
border Border
final
fullObstruction → bool
True if the navigation bar's background color has no transparency.
read-only
heroTag → Object
final
leading Widget
final
middle Widget
Widget to place in the middle of the navigation bar. Normally a title or a segmented control. [...]
final
padding EdgeInsetsDirectional
final
preferredSize Size
The size this widget would prefer if it were otherwise unconstrained. [...]
read-only
previousPageTitle → String
final
trailing Widget
final
transitionBetweenRoutes → bool
final
hashCode → int
The hash code for this object. [...]
read-only, inherited
key Key
Controls how one widget replaces another widget in the tree. [...]
final, inherited
runtimeType → Type
A representation of the runtime type of the object.
read-only, inherited

Methods

createState() → _CupertinoNavigationBarState
Creates the mutable state for this widget at a given location in the tree. [...]
createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree. [...]
inherited
debugDescribeChildren() → List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children. [...]
@protected, inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node. [...]
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent 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 toStringDeep. [...]
inherited
toString({DiagnosticLevel minLevel: DiagnosticLevel.debug }) → String
Returns a string representation of this object.
inherited
toStringDeep({String prefixLineOne: '', String prefixOtherLines, DiagnosticLevel minLevel: DiagnosticLevel.debug }) → 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 ==(dynamic other) → bool
The equality operator. [...]
inherited