Skip to main content

bug_capsule 0.4.1-beta.6 copy "bug_capsule: ^0.4.1-beta.6" to clipboard
bug_capsule: ^0.4.1-beta.6 copied to clipboard

Record and replay Flutter bugs with portable capsules, error monitoring, state and network integrations, and a CLI for verifying fixes.

example/main.dart

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

// Pass your project's SDK token with --dart-define=BUGCAPSULE_TOKEN=...
// Without a token, captures stay on the device.
void main() => BugCapsule.init(
  config: const BugCapsuleConfig(
    token: String.fromEnvironment('BUGCAPSULE_TOKEN'),
    appVersion: '1.0.0',
    appBuild: '1',
  ),
  appRunner: () => runApp(const ExampleApp()),
);

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

  @override
  Widget build(BuildContext context) => MaterialApp(
    title: 'BugCapsule example',
    navigatorObservers: [BugCapsuleNavigatorObserver()],
    home: const CapturePage(),
  );
}

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

  @override
  Widget build(BuildContext context) => Scaffold(
    appBar: AppBar(title: const Text('BugCapsule example')),
    body: Center(
      child: ElevatedButton(
        onPressed: () async {
          final result = await BugCapsule.capture(
            note: 'Captured from the example app',
          );
          if (!context.mounted) return;
          await showDialog<void>(
            context: context,
            builder: (context) => AlertDialog(
              title: const Text('Capture result'),
              content: Text(
                result == null ? 'Capture unavailable.' : 'Capsule saved.',
              ),
              actions: [
                TextButton(
                  onPressed: () => Navigator.pop(context),
                  child: const Text('OK'),
                ),
              ],
            ),
          );
        },
        child: const Text('Capture a capsule'),
      ),
    ),
  );
}
0
likes
0
points
70
downloads

Documentation

Documentation

Publisher

unverified uploader

Weekly Downloads

Record and replay Flutter bugs with portable capsules, error monitoring, state and network integrations, and a CLI for verifying fixes.

Homepage
Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

args, bloc, clock, dio, flutter, get, go_router, http, mobx, path_provider, riverpod, shared_preferences

More

Packages that depend on bug_capsule