flutter_flight_recorder 0.0.7 copy "flutter_flight_recorder: ^0.0.7" to clipboard
flutter_flight_recorder: ^0.0.7 copied to clipboard

Records a rolling timeline of app events (errors, network, navigation, actions, logs) so QA and developers get the complete story of what happened before a bug.

example/lib/main.dart

import 'dart:convert';

import 'package:flutter/material.dart';
import 'package:flutter_flight_recorder/flutter_flight_recorder.dart';

void main() {
  FlightRecorder.init();
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      navigatorObservers: [FlightRecorderNavigatorObserver()],
      home: const HomeScreen(),
    );
  }
}

class HomeScreen extends StatelessWidget {
  const HomeScreen({super.key});

  void _simulateActivity() {
    FlightRecorder.recordAction('button_tapped', metadata: {'screen': 'home'});
    FlightRecorder.log('User tapped the demo button');

    final incident = FlightRecorder.createIncident(title: 'Demo incident');
    // jsonEncode just makes the output readable in your terminal.
    debugPrint(jsonEncode(incident.toJson()));
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: const Text('flutter_flight_recorder example')),
      body: Center(
        child: ElevatedButton(
          onPressed: _simulateActivity,
          child: const Text('Record activity and create an incident'),
        ),
      ),
    );
  }
}
1
likes
160
points
44
downloads

Documentation

Documentation
API reference

Publisher

unverified uploader

Weekly Downloads

Records a rolling timeline of app events (errors, network, navigation, actions, logs) so QA and developers get the complete story of what happened before a bug.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

flutter

More

Packages that depend on flutter_flight_recorder