Skip to main content

flutter_metrics_sdk 1.0.1 copy "flutter_metrics_sdk: ^1.0.1" to clipboard
flutter_metrics_sdk: ^1.0.1 copied to clipboard

A lightweight Flutter performance analytics SDK to capture real-user metrics such as render time, frame drops, user interactions, and crashes.

Flutter Metrics SDK #

A Flutter performance analytics SDK that captures real-user performance metrics and sends them securely to a web-based dashboard for analysis and optimization.


๐Ÿš€ Features #

  • Screen render time tracking
  • Frame drop (UI jank) detection
  • User interaction tracking
  • Crash signal reporting
  • Secure API key-based ingestion
  • Non-blocking and production-safe design
  • Supports Android, iOS, and Web

๐Ÿ“ฆ Installation #

Add the dependency to your pubspec.yaml:

dependencies:
  flutter_metrics_sdk: ^1.0.0

Then run:

flutter pub get

๐ŸŒ Dashboard Setup (Required) #

This SDK integrates with a web-based performance dashboard.

Dashboard URL #

https://ai-performance-intelligence-dashboa.vercel.app

Setup Steps #

  1. Create an account on the dashboard
  2. Create an application
  3. Copy the generated API key
  4. Use the API key while initializing the SDK

Backend API URL #

https://ai-performance-intelligence-backend.onrender.com

โš™๏ธ Initialization #

final metrics = MetricsClient(
  apiKey: 'app_live_xxxxxxxxx',
  baseUrl: 'https://ai-performance-intelligence-backend.onrender.com',
);

๐Ÿงช Usage #

Track screen render time #

metrics.sendMetric(
  event: 'screen_render',
  screen: 'home',
  renderTimeMs: 420,
);

Track frame drops (UI jank) #

metrics.sendMetric(
  event: 'frame_drop',
  screen: 'profile',
  frameTimeMs: 34,
  frameDropped: true,
);

Track crash signals #

FlutterError.onError = (details) {
  metrics.sendMetric(
    event: 'app_crash',
    screen: 'unknown',
  );
};

๐Ÿ” Security #

  • Uses app-level API keys for metrics ingestion
  • API keys are generated from the dashboard
  • API keys should not be committed to source control
  • Supports API key rotation

๐ŸŒ Platform Support #

  • Flutter Android
  • Flutter iOS
  • Flutter Web
0
likes
0
points
49
downloads

Publisher

unverified uploader

Weekly Downloads

A lightweight Flutter performance analytics SDK to capture real-user metrics such as render time, frame drops, user interactions, and crashes.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

dio, flutter

More

Packages that depend on flutter_metrics_sdk