PrintState class
A named visual state of a widget or page.
Used with pages and widgets to capture multiple variants of the same screen or component.
Constructors
-
PrintState({required String name, required Widget widget, Future<
void> setup(WidgetTester tester)?}) -
Creates a print state with the given
nameandwidget.const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- name → String
-
Identifier used in the output file name.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
setup
→ Future<
void> Function(WidgetTester tester)? -
Callback that runs after the widget is pumped but before the screenshot
is captured. Use this to interact with the widget — tap buttons, switch
tabs, scroll to a position, enter text, etc.
final
- widget → Widget
-
The widget to render for this state.
final
Methods
-
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