relaunch static method
Relaunch (stop and launch) Bugsee with optional new launch options
Implementation
static Future<bool> relaunch([BugseeLaunchOptions? launchOptions]) async {
var launched = false;
if (_channel != null) {
// either use provided options, or fallback to the initially passed
// options
setLaunchOptions(
launchOptions ?? (getLaunchOptions() ?? getDefaultLaunchOptions()));
launched = (await _channel?.invokeMethod('relaunch', <String, dynamic>{
'launchOptions': getLaunchOptions()!.toMap(),
}) ??
0) !=
0;
if (launched) {
_exceptionHandler?.syncWithOptions(getLaunchOptions());
_viewManager?.startViewTracking();
} else {
// relaunch failed -> deactivate exceptions handler
_exceptionHandler?.deactivateUnhandledInterception();
_viewManager?.stopViewTracking();
}
}
return Future.value(launched);
}