SafaehBranchSidenav class
A navigation rail whose rows branch with the current context, ported from Hisab's shell sidenav.
- The rail is one widget for the whole app: changing items reconciles the rows by SafaehBranchNavItem.id. Rows that stay keep their place; new rows grow and fade in, gone rows shrink and fade out.
- title crossfades when it changes (the app name, then the open list).
- Rows indent by SafaehBranchNavItem.depth. When the selected row is two levels deep, its parent turns bold and shows an expand arrow.
- pinnedItems stay at the bottom (settings, account) and never move.
- Collapsing morphs the width; labels fade out and icons stay centered.
- asDrawer lays the same content out for a temporary drawer.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- SafaehBranchSidenav
Constructors
-
const
Properties
- asDrawer → bool
-
final
- collapsed → bool
-
final
- collapseKey → Key
-
final
- collapseTooltip → String?
-
final
- compactWidth → double?
-
final
- duration → Duration?
-
Width morph, row insert/remove and title crossfade. Defaults to
SafaehThemeData.navMotion; reduced motion makes it instant.
final
- expandedWidth → double?
-
final
- expandKey → Key
-
final
- expandTooltip → String?
-
final
-
A small line under the pinned rows (a version), hidden when compact.
final
- haptics → bool
-
A light haptic on every row tap.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- indentStep → double
-
final
-
items
→ List<
SafaehBranchNavItem> -
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- onToggleCompact → VoidCallback?
-
Shows the menu / chevron button in the header. Null hides it.
final
-
pinnedItems
→ List<
SafaehBranchNavItem> -
final
- railKey → Key
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- selectedId → Key?
-
The id of the selected row, in items or pinnedItems.
final
- title → String
-
final
Methods
-
build(
BuildContext context) → Widget -
Describes the part of the user interface represented by this widget.
override
-
createElement(
) → StatelessElement -
Creates a StatelessElement to manage this widget's location in the tree.
inherited
-
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