Fluent2Scaffold class

Root of every page: the ground (the page's ground on a phone, the content layer on the desktop), its top bar and the body in a column at the gutter. On a phone the bar is pinned over the page on the acrylic with a hairline under it, and the page scrolls under it; on the desktop the bar stands in the page and scrolls away with it, spanning the layer (its title on the column's start, its commands and the account's bell and avatar at the layer's end, as an app's head does), and the column under it runs at most 1120 wide from the layer's start.

Top contract. A Fluent2AppBar in topBar takes the register its route earns: a tab's title on a root, the way back and the title on a pushed page, the sheet's head on a sheet. Leave topBar unset and the route's own bar is derived: the way back on a pushed page, the close on a sheet, nothing on a root, so a page authors a bar only to add a title or commands, never to draw its own back or close. topBar: Fluent2AppBar.none is the explicit opt-out.

The column. On a phone the page stands 16 in from either edge and keeps 24 under its last part; on the desktop the gutter is 24 with 40 under it.

Bottom contract. The body reserves whatever stands over the bottom edge: the safe-area inset or, on a nav root, the shell's tab bar, published as ShellInsets. In scroll mode the reserve is scroll padding; with scroll: false it is published as MediaQuery bottom padding for the page's own scrollable. A nav root never owns the bottom edge: a footer (the page's acts, a primary button with its secondary) belongs to pushed, sheet and shell-free pages, standing in a band of the surface over a hairline.

On a sheet's card the page is the sheet: the card's room, the handle on a phone, its bar as the head, the body 8 under it and the footer 16 under that.

Fluent2Scaffold(topBar: const Fluent2AppBar(title: 'Files'), body: Column(crossAxisAlignment: CrossAxisAlignment.stretch, children: sections))
Inheritance

Constructors

Fluent2Scaffold({Key? key, required Widget body, Widget? topBar, Widget? footer, bool scroll = true, EdgeInsetsGeometry? padding})
A page: topBar over body.
const

Properties

body → Widget
The page's content.
final
Pinned above the bottom edge: the page's acts. Gets the footer band and the safe-area inset.
final
hashCode → int
The hash code for this object.
no setterinherited
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
padding → EdgeInsetsGeometry?
Override the page's room round its content.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
scroll → bool
Wrap the page in a scroll view.
final
topBar → Widget?
Usually a Fluent2AppBar; unset derives the route's own (see above).
final

Methods

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

insetsOf(BuildContext context) → EdgeInsets
The room round a page's content at context: the gutter at the sides, the foot under the last part.