HarborPanes class

Two panes, one either side of a hinge or fold, or side by side on a screen wide enough, and one alone otherwise: list and detail, two pages of a book, a canvas and its tools. Modelled on Windows' and .NET MAUI's TwoPaneView, and on the TwoPane of Microsoft's dual_screen.

On a hinge or fold its hinge policy keeps off (the page's HarborHinge.of by default), the panes go either side of it: a vertical hinge puts them side by side, a horizontal one (a dual-screen device on its side, a foldable half open on a table) puts start on top. With no such hinge, they go side by side when the width reaches minWideWidth, one above the other when the height reaches minTallHeight (never, by default), and otherwise priority's pane is shown alone. startFraction is the start pane's share of the width or height when no hinge decides it.

Each pane is built as a screen of its own: its MediaQuery has the pane's size, keeps the system edges only on the pane's outer edges, and lists only the display features inside it. So each can hold a HarborFrame with bars of its own, kept clear of nothing the other pane has.

The display features are read from the MediaQuery above, which is taken to be in this widget's coordinates, as DisplayFeatureSubScreen takes it: mount it where it fills the screen (a route's page, or a frame's body that runs under no bars).

Inheritance

Constructors

HarborPanes({Key? key, required Widget start, required Widget end, HarborPanePriority priority = HarborPanePriority.start, double minWideWidth = 840.0, double minTallHeight = double.infinity, double startFraction = 0.5, HarborHinge? hinge})
const

Properties

end → Widget
final
hashCode → int
The hash code for this object.
no setterinherited
hinge → HarborHinge?
Which hinges and folds the panes are split at; the page's HarborHinge.of when null.
final
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
minTallHeight → double
The height from which two panes go one above the other with no hinge between them, when they are not side by side. Off by default.
final
minWideWidth → double
The width from which two panes go side by side with no hinge between them: 840, Material's expanded width, by default.
final
priority → HarborPanePriority
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
start → Widget
final
startFraction → double
The start pane's share when no hinge decides where the panes meet.
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.
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

layout({required Size size, required List<Rect> hinges, required TextDirection direction, double minWideWidth = 840.0, double minTallHeight = double.infinity, double startFraction = 0.5}) → ({Rect endRect, HarborPanesMode mode, Rect startRect})
The layout HarborPanes would choose for size, with hinges (the bounds of the hinges and folds its policy keeps off) in the same coordinates.
modeOf(BuildContext context) → HarborPanesMode?
How the nearest HarborPanes above context laid its panes out, or null outside one. A list reads it to decide what a tap does: show the item in the end pane when both are up, or open it as a page of its own when only the list is.