Fluent2Preview class

One page's isolated preview: the same host, bar, route and sheet the app gives the page live, without the router, so preview pixels match in-app pixels and the chrome the route derives is the real one: the way back when pushed, the dismiss on a sheet. A pushed or sheet page is raised over a blank stage so its exit renders as it does live. A root stands over the tab bar on a phone; at desktop width a root and a pushed page stand on the content layer beside the nav pane (tabs, selectedIndex its current). Given the page's location, the pane marks the account's foot when the page is its profile.

The preview stands in a PreviewFrame of the platform register and brightness, so the page's behaviour follows that platform.

Fluent2Preview(presentation: Fluent2Presentation.pushed, child: const FilePage())
Inheritance

Constructors

Fluent2Preview({required Widget child, Fluent2ThemeData? light, Fluent2ThemeData? darkData, Fluent2Presentation presentation = Fluent2Presentation.root, List<Fluent2NavItem> tabs = const <Fluent2NavItem>[], int selectedIndex = 0, ShellAction? action, String? brand, bool drawer = false, bool fullScreen = false, bool back = false, PreviewPlatform platform = PreviewPlatform.android, Brightness brightness = Brightness.light, bool device = false, String? location, Key? key})
A preview of child as a page of an app.
const

Properties

action → ShellAction?
The shell's act.
final
back → bool
With Fluent2Presentation.sheet, closing by the way back.
final
brand → String?
The nav pane's name at desktop width.
final
brightness → Brightness
The appearance the preview draws in.
final
child → Widget
The page.
final
darkData → Fluent2ThemeData?
The dark theme; null is the default preset's.
final
device → bool
Whether the preview draws on the register's own device box.
final
drawer → bool
With Fluent2Presentation.sheet, as tall as its content (the end drawer on the desktop).
final
fullScreen → bool
With Fluent2Presentation.sheet, the full-screen cover.
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 → Fluent2ThemeData?
The light and dark themes; null is the default preset's.
final
location → String?
The page's path in the app ('/home/profile').
final
platform → PreviewPlatform
The platform register the preview stands in.
final
presentation → Fluent2Presentation
How the page is reached: a tab's root, pushed, or a sheet.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
selectedIndex → int
The index of the current tab.
final
tabs → List<Fluent2NavItem>
The shell's tabs when the page is a nav root; empty renders no bar.
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