PreviewBuilder class final

A utility class used to build a Preview instance.

Constructors

PreviewBuilder()
Creates a PreviewBuilder with no initial state.

Properties

brightness Brightness?
Sets the initial theme brightness.
getter/setter pair
group String?
The group the preview belongs to.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
localizations PreviewLocalizations?
A callback to return a localization configuration to be applied to the previewed Widget.
getter/setter pair
name String?
A description to be displayed alongside the preview.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
size Size?
Artificial constraints to be applied to the previewed widget.
getter/setter pair
textScaleFactor double?
Applies font scaling to text within the previewed widget.
getter/setter pair
theme PreviewTheme?
A callback to return Material and Cupertino theming data to be applied to the previewed Widget.
getter/setter pair
wrapper WidgetWrapper?
Wraps the previewed Widget in a Widget tree.
getter/setter pair

Methods

addWrapper(WidgetWrapper newWrapper) → void
Applies newWrapper to the returned value of the current wrapper.
build() Preview
Returns the Preview instance created from the builder's state.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited