MinimalPreview class
One page's isolated preview: the same host, bar, route and card the app gives the page live, without the router, so preview pixels match in-app pixels. The route decides the page's chrome exactly as it does live: a root leads with its title, a pushed page gets the back button and breadcrumb, a sheet page stands in the card with its close.
A pushed or sheet page is raised over a stage, so it can pop and its exit renders as it does live — but a preview is looked at, not walked out of: the exit leaves the page standing, and nothing reveals the stage. The stage is blank unless under names the page the sheet (or the push) was raised from: that page then stands beneath as a nav root, with tabs under it — a create sheet over the dimmed list it adds to.
The preview reads the way the tree around it does: right to left under a right-to-left Directionality, though its own app's locale is English.
MinimalPreview(light: MinimalThemeData.preset('standard', Brightness.light), dark: MinimalThemeData.preset('standard', Brightness.dark), tabs: tabs, child: const TodayPage())
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- MinimalPreview
Constructors
-
MinimalPreview({required MinimalThemeData light, required MinimalThemeData dark, required Widget child, MinimalPresentation presentation = MinimalPresentation.root, List<
MinimalNavItem> tabs = const <MinimalNavItem>[], int activeIndex = 0, MinimalShellAction? action, Brightness? brightness, Widget? under, Key? key}) -
A preview of the page
child.const
Properties
- action → MinimalShellAction?
-
The shell's create action.
final
- activeIndex → int
-
The current tab.
final
- brightness → Brightness?
-
Pins the appearance; null follows the platform.
final
- child → Widget
-
The page.
final
- dark → MinimalThemeData
-
The theme in the dark appearance.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- light → MinimalThemeData
-
The theme in the light appearance.
final
- presentation → MinimalPresentation
-
How the page stands: a tab's root, pushed, or in a sheet.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
tabs
→ List<
MinimalNavItem> -
The shell's tabs when the page is a nav root — the bar renders under
it, activeIndex current; empty renders no bar.
final
- under → Widget?
-
The page a pushed or sheet child was raised from, standing beneath
it as a nav root (with tabs); null stands it over a blank stage. A
root presentation ignores it.
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