Dynatrace Flutter Plugin support with Dio

This plugin adds support/instrumentation for dio when used with the Dynatrace Flutter Plugin.


  • Dynatrace Flutter Plugin.
  • Flutter Version >= 1.12.0
  • Dart Version >= 2.15
  • Dio Version >= 5.0.0
  • Gradle: >= 5.x
  • Android API Level >= 21
  • iOS SDK >= 11


Our plugin for Dio provides an extension method, .instrument(), which can be used to automatically tag and time the web requests that are called with the Dio package.

import 'package:dynatrace_flutter_plugin_dio/dynatrace_flutter_plugin_dio.dart';

final dio = Dio();

Create a user action and correlate the dio request shown in the Waterfall analysis:

import 'package:dynatrace_flutter_plugin_dio/dynatrace_flutter_plugin_dio.dart';
import 'package:dynatrace_flutter_plugin/dynatrace_flutter_plugin.dart';

final dio = Dio();

var url = 'https://dynatrace.com';
DynatraceRootAction dioAction =
        Dynatrace().enterAction('Dio Action');

try {
  await dio.get(url);
} catch (error) {
  // insert error handling here
} finally {

Note: If you do not create a user action around the dio request, our plugin will automatically create a user action which will include the request in the Waterfall analysis of such action. The name of this action is **Dio Request: