activate static method

Future<void> activate(
  1. AppMetricaConfig config
)

Initializes the library in the application with the initial configuration config.

Implementation

static Future<void> activate(AppMetricaConfig config) async {
  if (config.logs == true) {
    setUpLogger(appMetricaRootLogger);
  }
  setUpErrorHandlingWithAppMetrica();
  var activationCompleter = ActivationCompleter(config);
  return _appMetrica.activate(config.toPigeon()).then(
      activationCompleter.complete,
      onError: activationCompleter.onError
  );
}