addPlugin method

Future<void> addPlugin(
  1. PluginConfiguration plugin
)

Adds a plugin, replacing any plugin with the same identifier.

The plugin only sees events tracked after it is added. To also see the events tracked while the tracker is being created, pass the plugin to Snowplow.createTracker instead.

Implementation

Future<void> addPlugin(PluginConfiguration plugin) async {
  await Snowplow.addPlugin(plugin, tracker: namespace);
}