flutter_user_recorder 0.3.3
flutter_user_recorder: ^0.3.3 copied to clipboard
Record and replay user interactions in Flutter apps. Automatically captures taps, text input, scrolls, navigation, and gestures. Perfect for automated testing, user flow analysis, and interaction repl [...]
example/lib/main.dart
import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart';
import 'app.dart';
import 'app_router.dart';
import 'recorder_config.dart';
/// Example app demonstrating flutter_user_recorder package
///
/// This example shows:
/// - How to set up RecorderController and Replayer
/// - How to integrate with go_router (automatic!)
/// - How to wrap MaterialApp.router with RecorderLayer
/// - How to use RecorderNavigatorObserver for navigation recording
///
/// Key Features:
/// - ✅ Automatic go_router integration - no manual setup needed!
/// - ✅ Sessions are automatically saved and loaded
/// - ✅ You can name your recording sessions
/// - ✅ Modern UI with glassmorphism design
/// - ✅ Replay automatically starts from the initial screen
///
/// Setup Steps:
/// 1. Create RecorderController and Replayer instances (see recorder_config.dart)
/// 2. Create GoRouter with RecorderNavigatorObserver (see app_router.dart)
/// 3. Wrap MaterialApp.router with RecorderLayer (see app.dart)
/// 4. That's it! go_router integration is automatic!
///
/// Usage:
/// 1. Start recording: Tap the record button in RecorderFAB
/// 2. Interact with the app: Navigate, tap, scroll, type text
/// 3. Stop recording: Tap stop button and give your session a name
/// 4. Replay: Open sessions list and tap on any session to replay it
///
/// All sessions are automatically saved and persist across app restarts!
void main() {
// That's it! RecorderLayer will automatically configure go_router integration.
// No manual setup needed - just wrap your app with RecorderLayer!
//
// The app structure:
// - main.dart: Entry point (this file)
// - app.dart: MyApp widget with RecorderLayer setup
// - app_router.dart: GoRouter configuration with RecorderNavigatorObserver
// - recorder_config.dart: Global RecorderController and Replayer instances
runApp(const MyApp());
}