FrostedPreview 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 close on a sheet. A pushed or sheet page is raised over a blank stage so its exit renders as it does live; a preview is looked at, not walked out of, so the exit leaves the page standing. A root stands over the tab bar on a phone; at desktop width a root and a pushed page stand beside the sidebar (tabs, activeIndex its current), as the shell stands every page there. Given the page's location, the sidebar 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.
FrostedPreview(presentation: FrostedPresentation.pushed, child: const AccountPage())
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- FrostedPreview
Constructors
-
FrostedPreview({required Widget child, FrostedThemeData? light, FrostedThemeData? dark, FrostedPresentation presentation = FrostedPresentation.root, List<
FrostedNavItem> tabs = const <FrostedNavItem>[], int activeIndex = 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}) -
Creates a FrostedPreview.
const
Properties
- action → ShellAction?
-
The shell's act, the ink pill in the bar's middle.
final
- activeIndex → int
-
The current tab, on a root.
final
- back → bool
-
With FrostedPresentation.sheet, closing by the way back.
final
- brand → String?
-
The sidebar's wordmark at desktop width.
final
- brightness → Brightness
-
The appearance the preview stands in.
final
- child → Widget
-
The page.
final
- dark → FrostedThemeData?
-
The dark theme; null is the light theme's twin.
final
- device → bool
-
Whether the preview draws on the register's own device box.
final
- drawer → bool
-
With FrostedPresentation.sheet, as tall as its content.
final
- fullScreen → bool
-
With FrostedPresentation.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 → FrostedThemeData?
-
The light and dark themes; null is the default preset's.
final
- location → String?
-
The page's path in the app ('/home/profile'): at desktop width the
sidebar's foot is current when it is the account's profile
(FrostedAccount.profileLocation), and nothing is current on its
notifications (FrostedAccount.notificationsLocation), as the shell
marks them live.
final
- platform → PreviewPlatform
-
The platform register the page behaves in.
final
- presentation → FrostedPresentation
-
How the page stands in the app.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
tabs
→ List<
FrostedNavItem> -
The shell's tabs when the page is a nav root: the bar renders with
activeIndex selected; 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