TesterPayKitConfig class

Configuration for TesterPayKit SDK

Constructors

TesterPayKitConfig({required String projectId, required String apiBaseUrl, String? testerId, String? bundleId, bool enableTesterMode = false, bool captureScreenViews = true, bool captureTapEvents = true, bool captureErrors = true, bool captureCrashes = true, bool crashAutoUpload = false, int weeklySubmissionDay = DateTime.sunday, bool debugMode = false, bool enableInviteCodeOnboarding = true, Duration acquisitionTimeout = const Duration(seconds: 5), int acquisitionMaxRetries = 4})
const
TesterPayKitConfig.localFirst({required String prodApiBaseUrl, required String prodProjectId, required String devApiBaseUrl, required String devProjectId, String? testerId, String? bundleId, bool enableTesterMode = false, bool captureScreenViews = true, bool captureTapEvents = true, bool captureErrors = true, bool captureCrashes = true, bool crashAutoUpload = false, int weeklySubmissionDay = DateTime.sunday, bool? forceLocal})
Standard local-first dev config: picks the dev or prod target based on Flutter's kDebugMode. Use this from any host that follows the Moinsen "local docker stack in debug, prod in release" convention so the host doesn't need to re-implement the same kDebugMode ? local : prod switch on every site.
factory

Properties

acquisitionMaxRetries → int
Max attempts for background token acquisition before giving up. Default 4 (exponential backoff: 5s, 10s, 20s between attempts).
final
acquisitionTimeout → Duration
Max time the auth handshake (POST /auth/tester/anonymous) may take before a single attempt is considered failed. Default 5s. Set higher for known-slow environments (e.g. CI). Retry logic lives in TokenAcquirer — see acquisitionMaxRetries.
final
apiBaseUrl → String
API base URL (e.g., 'https://api.testerpaykit.com')
final
bundleId → String?
Explicit bundle ID override. When set, this value is used as AppMetadata.bundleId for every bug + crash submission instead of PackageInfo.fromPlatform().packageName. Host apps set this when they want to point a debug-mode build at a prod TPK project (whose project metadata expects e.g. dev.moinsen.bonblick, not the seed-DB fallback de.bonblick.app) without changing the real iOS Bundle Identifier / Android applicationId.
final
captureCrashes → bool
Capture crash events
final
captureErrors → bool
Capture non-fatal errors
final
captureScreenViews → bool
Capture screen view events
final
captureTapEvents → bool
Capture tap/interaction events
final
crashAutoUpload → bool
Auto-upload crashes the moment they happen instead of waiting for the user to confirm via the "App crashed — report?" dialog on the next launch. When true, CrashHandlerService saves the crash locally AND queues a bug-report submit through BugReportUploadService (local-first + WiFi-respecting). The user is never prompted; the crash is reported to the host's developer as soon as the upload queue drains.
final
debugMode → bool
Enable debug logging
final
enableInviteCodeOnboarding → bool
When true (default), TesterPayKitWrapper auto-presents the invite-code onboarding screen if the SDK is unauthenticated and no build-time testerId (or saved runtime code) is available. Set false when the host drives anonymous login itself and doesn't want the SDK to pop the code screen.
final
enableTesterMode → bool
Enable tester mode UI overlay
final
environment → String
Stable label for the environment this build talks to. Derived from apiBaseUrl (anything with localhost or 127.0.0.1 or 192.168. is 'local'; otherwise 'prod'). Stamped into the appSnapshot of every bug report + crash report so a coordinator can tell at a glance "this bug came from a local dev build, not the App-Store release." When the host uses TesterPayKitConfig.localFirst this stays in sync with the chosen target automatically.
no setter
hashCode → int
The hash code for this object.
no setterinherited
projectId → String
Project identifier
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
testerId → String?
Tester identifier (optional, can be set later)
final
weeklySubmissionDay → int
Day of week for weekly submissions (1-7, Monday-Sunday)
final

Methods

copyWith({String? projectId, String? apiBaseUrl, String? testerId, bool? enableTesterMode, bool? captureScreenViews, bool? captureTapEvents, bool? captureErrors, bool? captureCrashes, bool? crashAutoUpload, int? weeklySubmissionDay, bool? debugMode, bool? enableInviteCodeOnboarding, Duration? acquisitionTimeout, int? acquisitionMaxRetries}) → TesterPayKitConfig
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