connect_flutter_plugin 2.38.1-beta copy "connect_flutter_plugin: ^2.38.1-beta" to clipboard
connect_flutter_plugin: ^2.38.1-beta copied to clipboard

Acoustic Connect can monitor traffic between your application and server. It captures device context and user activity to monitor and evaluate the performance of your applications

connect_flutter_plugin #

Overview #

The Flutter plugin can be instrumented with your Flutter applications so you can capture user interactions and application data and then play back and analyze the data with Acoustic Connect. For more information, see the Flutter SDK overview.

Getting Started #

To start working with the Connect Flutter plugin, Add the plugin to your application and configure Connect. Refer to Installation instructions.

Build the sample app #

Example sample app files you can use to build to view quick example implementations of all core functionalities are provided with the plugin. To start working with the example files, refer to Build the sample app.

Logging Configuration #

The Connect Flutter Plugin provides configurable logging levels to control SDK log verbosity for Flutter level code. This setting does not affect logs generated by native modules.

Quick Start #

No configuration needed! The SDK automatically adapts:

  • Debug builds → Full logging (debug + trace + error)
  • Release builds → Errors only

Log Levels #

Level Description
ConnectLogLevel.auto Default - Adapts to build mode automatically
ConnectLogLevel.off No logging
ConnectLogLevel.error Only error messages
ConnectLogLevel.debug Debug and error messages (always, regardless of build mode)
ConnectLogLevel.trace All messages including trace (most verbose)

Usage Examples #

Use Default (Auto Mode)

import 'package:connect_flutter_plugin/connect_flutter_plugin.dart';

void main() {
  // No configuration needed - auto mode is default
  runApp(Connect(child: const MyApp()));
}

Disable All Logging

void main() {
  PluginConnect.setLogLevel(ConnectLogLevel.off);
  runApp(Connect(child: const MyApp()));
}

Force Verbose Logging (for debugging)

void main() {
  PluginConnect.setLogLevel(ConnectLogLevel.trace);
  runApp(Connect(child: const MyApp()));
}

Check Current Log Level

ConnectLogLevel currentLevel = PluginConnect.getLogLevel();
print('Current log level: $currentLevel');

Best Practices #

  1. Use auto mode (default) for most cases - Zero configuration, automatically adapts
  2. Configure before Connect.init() to capture all initialization logs
  3. Use ConnectLogLevel.off or ConnectLogLevel.error in production to minimize logs
  4. Use ConnectLogLevel.trace only when troubleshooting - it's very verbose

API Methods #

// Set log level
PluginConnect.setLogLevel(ConnectLogLevel.trace);

// Get current log level
ConnectLogLevel level = PluginConnect.getLogLevel();
2
likes
0
points
538
downloads

Publisher

unverified uploader

Weekly Downloads

Acoustic Connect can monitor traffic between your application and server. It captures device context and user activity to monitor and evaluate the performance of your applications

Homepage
Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

crypto, flutter, http, logger, package_info_plus, yaml

More

Packages that depend on connect_flutter_plugin

Packages that implement connect_flutter_plugin