init static method

Future<void> init(
  1. AllStackOptions options, {
  2. void appRunner()?,
})

Implementation

static Future<void> init(AllStackOptions options,
    {void Function()? appRunner}) async {
  if (_instance == null) {
    _instance = AllStack._(
      apiKey: options.apiKey,
      environment: options.environment,
    );

    _instance!._setupGlobalErrorHandler();
  }

  if (appRunner != null) {
    appRunner();
  }
}