Flutter SDK - One-page setup
Create your app and get the key
- Log in to
testernest.comand create an app. - Copy the
publicKeyfrom your app settings. - Copy the
baseUrlfrom SDK Setup for your environment.
1) Install
Add the SDK to your pubspec.yaml:
dependencies:
testernest_flutter: ^0.1.1
Then run:
flutter pub get
2) Permissions
No extra permissions required.
3) Initialize
Initialize once during app startup, typically in main() before runApp():
Future<void> main() async {
WidgetsFlutterBinding.ensureInitialized();
await TesterNestFlutter.init(
publicKey: 'YOUR_PUBLIC_KEY',
baseUrl: 'https://testernest.com',
);
runApp(const MyApp());
}
4) Connect tester (6-digit code)
Add the connect prompt widget on your main screen so testers can enter a 6-digit code:
class HomePage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
body: Stack(
children: [
const AppContent(),
TesterNestConnectPrompt(),
],
),
);
}
}
5) Track screens + events (minimal)
Use named routes so screen names are stable in analytics.
Navigator.pushNamed(context, '/checkout');
Navigator.push(
context,
MaterialPageRoute(
settings: const RouteSettings(name: '/checkout'),
builder: (_) => const CheckoutPage(),
),
);
Avoid leaving all screen names as '/'.
6) Verify
- In the app, the prompt displays and accepts a 6-digit code.
- In logs, you should see bootstrap and claim events after entering a code.
- The TesterNest dashboard should show an active session.
Troubleshooting
- No prompt appears: Ensure
TesterNestConnectPromptis mounted and visible on top of your UI. - Invalid key: Confirm the
publicKeymatches the app in the dashboard. - Network errors: Verify device internet access and the configured
baseUrlvalue. - Nothing in logs: Make sure initialization runs before the prompt renders.
- Screen name shows as
/in dashboard: Use named routes or setRouteSettings(name: '/your-screen').