Skip to content
pubscout

firebase_performance_dio

0.7.1, released 2 years ago by an unverified publisher

Dio interceptor that records HTTP request metrics in Firebase Performance.

WASM-ready
$ flutter pub add firebase_performance_dio
Source repository

What it does

The package provides a Dio interceptor which creates a Firebase Performance HttpMetric for each request and reports timing data. It stores the metric in the request's extra field and finishes it when the response arrives.

AI-written summary of version 0.7.1, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You already use Dio for network calls and want automatic performance monitoring with Firebase.
  • You need minimal code to add Firebase Performance metrics to existing Dio requests.

Skip it when

  • You are not using Firebase Performance in your project.
  • You use a different HTTP client (e.g., http package) and cannot add a Dio interceptor.

Strengths

  • Zero‑boilerplate integration with existing Dio instances
  • Keeps metric lifecycle tied to Dio request lifecycle

Weaknesses

  • Works only with Dio, not other HTTP clients
  • Relies on firebase_performance plugin setup separately

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
2

Ensure firebase_performance is initialized in your app (e.g., call Firebase.initializeApp and enable Performance collection). Then add the interceptor to your Dio instance.

final dio = Dio();
final interceptor = DioFirebasePerformanceInterceptor();
dio.interceptors.add(interceptor);

Alternatives

Packages that do the same job and could replace firebase_performance_dio.

Works with

Packages commonly used together with firebase_performance_dio: ones it builds on, ones built on it, and its own family.