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) {
    setUpAppMetricaLogger(appMetricaRootLogger);
  }
  setUpErrorHandlingWithAppMetrica(config);
  var activationCompleter = AppMetricaActivationCompleter(config);
  return _appMetrica.activate(config.toPigeon()).then(
      activationCompleter.complete,
      onError: activationCompleter.onError
  );
}