testerpaykit 0.4.1
testerpaykit: ^0.4.1 copied to clipboard
Privacy-first Flutter SDK for app testing with pay-by-use testers. Local-first data capture with weekly summaries.
example/README.md
TesterPayKit example #
Minimal integration of the TesterPayKit Flutter SDK. A complete, runnable
demo app (todo app with seeded bugs, AI-Tester, voice bugs, dashboards) lives
at apps/sdk_example/ in the workspace.
1. Initialize the SDK #
import 'package:flutter/material.dart';
import 'package:testerpaykit/testerpaykit.dart';
Future<void> main() async {
WidgetsFlutterBinding.ensureInitialized();
final sdk = await TesterPayKit.initialize(
config: TesterPayKitConfig(
projectId: 'your-project-id',
apiBaseUrl: 'https://api.testerpaykit.com', // or http://<lan-ip>:18080 locally
enableTesterMode: true,
debugMode: true,
),
);
runApp(MyApp(sdk: sdk));
}
2. Wrap your app #
TesterPayKitWrapper adds the floating feedback button, shake-to-report,
session lifecycle, the daily tester dashboard, and the in-widget notification
inbox.
class MyApp extends StatelessWidget {
const MyApp({required this.sdk, super.key});
final TesterPayKit sdk;
@override
Widget build(BuildContext context) {
return MaterialApp(
navigatorObservers: [TpkNavigatorObserver()], // captures the screen path
home: TesterPayKitWrapper(
child: const HomeScreen(),
),
);
}
}
3. (Optional) Runtime invite-code onboarding #
For testers who join with an invite code instead of a baked-in testerId:
await TesterPayKit.instance.loginAnonymous(
code: 'INVITE-CODE',
projectId: 'your-project-id',
);
Gated by TesterPayKitConfig.enableInviteCodeOnboarding (default true):
when no tester is authenticated, the wrapper shows the invite-code screen.
See the project README for the full API surface.