launch static method

Future<bool> launch(
  1. String appToken, {
  2. LaunchOptions? launchOptions,
})

Implementation

static Future<bool> launch(String appToken,
    {LaunchOptions? launchOptions}) async {
  bool launched = false;

  Future<void> launchCallback() async {
    launched = await _initAndLaunch(appToken, launchOptions: launchOptions);
    _exceptionHandler?.installGlobalErrorHandler();
  }

  await runZonedGuarded<FutureOr<void>>(() async {
    await launchCallback();
  }, (error, stackTrace) async {
    await Defaultify.logHandledException(error, stackTrace);
  });

  return Future.value(launched);
}