logpane 0.1.2 copy "logpane: ^0.1.2" to clipboard
logpane: ^0.1.2 copied to clipboard

Lightweight analytics and error tracking SDK for Flutter. Privacy-friendly event tracking and error monitoring.

Logpane Flutter SDK #

Lightweight analytics and error tracking SDK for Flutter. Privacy-friendly event tracking and error monitoring.

Note: This SDK is in active development and not yet ready for production use. The API may change between versions. Use at your own risk.

Using an AI coding agent? Give your agent this link and it will set up Logpane in your project automatically: https://app.logpane.dev/sdk/integration-guide.txt

Installation #

dependencies:
  logpane: ^0.1.0
flutter pub get

Quick Start #

import 'package:logpane/logpane.dart';

void main() {
  runZonedGuarded(() async {
    WidgetsFlutterBinding.ensureInitialized();

    await Logpane.init(
      apiKey: 'YOUR_API_KEY',
    );

    FlutterError.onError = (details) {
      FlutterError.presentError(details);
      Logpane.instance.captureFlutterError(details);
    };

    PlatformDispatcher.instance.onError = (error, stack) {
      Logpane.instance.captureError(error, stack);
      return true;
    };

    runApp(const MyApp());
  }, (error, stack) {
    Logpane.instance.captureError(error, stack);
  });
}

Screen Tracking #

MaterialApp(
  navigatorObservers: [Logpane.instance.navigatorObserver],
);

Custom Events #

Logpane.instance.track('purchase', {
  'item': 'sword',
  'price': 9.99,
});

Error Capture #

try {
  await riskyOperation();
} catch (e, stack) {
  Logpane.instance.captureError(e, stack,
    context: 'riskyOperation',
  );
}

User Identification #

Logpane.instance.identify(userId: user.id, traits: {
  'username': user.name,
});

// On logout
Logpane.instance.reset();

Features #

  • Offline event queue (SQLite-backed, events sent when connectivity returns)
  • Automatic error capture across all three Dart error layers
  • Automatic screen tracking via NavigatorObserver
  • Session management with 30-minute background timeout
  • Device metadata (platform, model, OS, app version)
  • Gzip-compressed event batching
  • Privacy-friendly (no fingerprinting, opt-out toggle)

Configuration #

await Logpane.init(
  endpoint: 'https://api.yourdomain.com',
  apiKey: 'your-api-key',
  flushIntervalSeconds: 30,    // How often to send batched events
  maxBatchSize: 50,            // Max events per batch
  maxQueueSize: 1000,          // Max events in offline queue
  enableInDebug: false,        // Disable in debug mode
);

License #

MIT

0
likes
0
points
31
downloads

Publisher

unverified uploader

Weekly Downloads

Lightweight analytics and error tracking SDK for Flutter. Privacy-friendly event tracking and error monitoring.

Homepage
Repository (GitHub)
View/report issues

Topics

#analytics #error-tracking #monitoring #privacy

License

unknown (license)

Dependencies

connectivity_plus, device_info_plus, flutter, http, package_info_plus, path, shared_preferences, sqflite, uuid

More

Packages that depend on logpane