LedgerPreview 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.
LedgerPreview(presentation: LedgerPresentation.pushed, child: const AccountPage())
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- LedgerPreview
Constructors
-
LedgerPreview({required Widget child, LedgerThemeData? light, LedgerThemeData? dark, LedgerPresentation presentation = LedgerPresentation.root, List<
LedgerNavItem> tabs = const <LedgerNavItem>[], 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}) -
A preview of
child, standing aspresentationsays.const
Properties
- action → ShellAction?
-
The shell's act, the disc in the bar's middle.
final
- activeIndex → int
-
The index of the current tab.
final
- back → bool
-
With LedgerPresentation.sheet, closing by the way back.
final
- brand → String?
-
The app's name: the sidebar's wordmark at desktop width, and the
phone bar's (the preview's app takes it as its title, which the bar's
wordmark reads, as it reads the running app's).
final
- brightness → Brightness
-
The appearance the preview stands in.
final
- child → Widget
-
The page previewed.
final
- dark → LedgerThemeData?
-
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 LedgerPresentation.sheet, as tall as its content.
final
- fullScreen → bool
-
With LedgerPresentation.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 → LedgerThemeData?
-
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
(LedgerAccount.profileLocation), and nothing is current on its
notifications (LedgerAccount.notificationsLocation), as the shell
marks them live.
final
- platform → PreviewPlatform
-
The platform register the page behaves in.
final
- presentation → LedgerPresentation
-
How the page stands in the app.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
tabs
→ List<
LedgerNavItem> -
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