TesterPayKitWrapper class
Wrapper widget that shows tester dashboard before the actual app
This wrapper provides:
- Tester dashboard on first app launch each day
- FloatingFeedbackButton for easy access to bug reporting
- Screenshot capture support via RepaintBoundary
- Shake-to-report gesture detection
- Three-finger tap gesture detection (Clarity pattern)
Demo Mode: When enableWrapper is false, the wrapper is completely
invisible and returns the child unwrapped. This allows the app to run
cleanly without any TesterPayKit UI elements.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- TesterPayKitWrapper
Constructors
-
TesterPayKitWrapper({required Widget child, required TesterPayKit sdk, List<
TestTask> ? testTasks, BuildInfo? buildInfo, List<FocusArea> ? focusAreas, bool forceShowDashboard = false, bool enableWrapper = true, bool enableTesterDashboard = true, String? aiCoordinatorToken, String? aiProjectId, String? aiApiBaseUrl, bool aiRemoteTrigger = false, int aiRemotePollSeconds = 15, bool enableLiveLink = false, TpkLanguage? language, Key? key}) -
const
Properties
- aiApiBaseUrl → String?
-
Base URL for the AI session-start POST + WS. Defaults to the
SDK config's apiBaseUrl when null but aiCoordinatorToken +
aiProjectId are set.
final
- aiCoordinatorToken → String?
-
AI-Tester support (Phase 1.6). When all three are provided, the
FAB shows an "Auto Test (AI)" entry that opens the
AiRemoteControlsurface — a server-side LLM drives the app for a bounded number of actions. Phase-1 demo wiring: the developer ships these in a dev build; Phase 2 replaces the coordinator token with a per-tester invitation. When any is null, the menu item is hidden.final - aiProjectId → String?
-
final
- aiRemotePollSeconds → int
-
Poll interval for aiRemoteTrigger. Default 15.
final
- aiRemoteTrigger → bool
-
Let AI-tester runs started from outside (console "Start AI test",
tpk autotest) drive this app: while the app is resumed and no AI run is open, the wrapper asks the API every aiRemotePollSeconds whether a run waits for this project and, if so, hands the app to it — no persona picker, no coordinator token. The overlay closes itself 3 s after the run ends and polling resumes. Off by default — only enable it in builds you want remote-controlled.final - buildInfo → BuildInfo?
-
Custom build info (optional, uses mock data if not provided)
final
- child → Widget
-
The actual app to wrap
final
- enableLiveLink → bool
-
Live link to the developer's Claude Code session. Adds two items to
the TPK menu: "Connect to Claude" (while switched on and the app is
in front, the session can ask what the screen shows — MCP
device_snapshot) and "Send to Claude" (one line plus the current screen, read withlist_device_notes). Off by default — enable it in builds the developer uses on their own device. Extra state for both: TesterPayKit.liveStateProvider.final - enableTesterDashboard → bool
-
Whether the tester-onboarding dashboard ("Welcome, Tester! 👋" with
today's tasks + focus areas + build info) should be shown once per
day before the host app appears.
final
- enableWrapper → bool
-
Whether to enable TesterPayKit wrapper features
final
-
focusAreas
→ List<
FocusArea> ? -
Custom focus areas (optional, uses mock data if not provided)
final
- forceShowDashboard → bool
-
Whether to force show dashboard (for testing)
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- language → TpkLanguage?
-
UI language of the tester surface.
null(default) follows the device: German devices get German, all others English.final -
Optional handle to the host MaterialApp's NavigatorState. Required
when the wrapper is mounted via
MaterialApp.builder— in that position the wrapper sits ABOVE the MaterialApp's Navigator, so its ownBuildContexthas no Navigator ancestor and anyNavigator.of(context)call from the wrapper would crash with "context does not include a Navigator". When this key is provided, the wrapper pushes routes through it instead.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sdk → TesterPayKit
-
TesterPayKit SDK instance
final
-
testTasks
→ List<
TestTask> ? -
Custom test tasks (optional, uses mock data if not provided)
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< TesterPayKitWrapper> -
Creates the mutable state for this widget at a given location in the tree.
override
-
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.
inherited
-
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
Static Properties
-
screenshotKey
→ GlobalKey<
State< StatefulWidget> > -
Global key for screenshot capture
Allows bug reporting to capture screenshots of the entire app
final