init static method
dynamic
init(
- dynamic optionsOrConfiguration, {
- Client? httpClient,
- Set<
String> firstPartyHosts = const <String>{}, - bool autoInstrumentation = false,
- bool captureAppLifecycle = false,
- bool installErrorHooks = false,
- bool captureFlutterErrors = true,
- bool capturePlatformDispatcherErrors = true,
- bool preserveExistingHandlers = true,
- FractalUpAppRunner? appRunner,
Implementation
static dynamic init(
dynamic optionsOrConfiguration, {
http.Client? httpClient,
Set<String> firstPartyHosts = const <String>{},
bool autoInstrumentation = false,
bool captureAppLifecycle = false,
bool installErrorHooks = false,
bool captureFlutterErrors = true,
bool capturePlatformDispatcherErrors = true,
bool preserveExistingHandlers = true,
FractalUpAppRunner? appRunner,
}) {
if (optionsOrConfiguration is Function) {
return _FractalUpBootstrap.init(
(options) => Function.apply(
optionsOrConfiguration,
<Object?>[options],
),
appRunner: appRunner,
);
}
if (optionsOrConfiguration is! FractalupRadarOptions) {
throw ArgumentError.value(
optionsOrConfiguration,
'optionsOrConfiguration',
'must be FractalupRadarOptions or an options callback',
);
}
return configure(
optionsOrConfiguration,
httpClient: httpClient,
firstPartyHosts: firstPartyHosts,
captureAppLifecycle: captureAppLifecycle || autoInstrumentation,
installErrorHooks: installErrorHooks || autoInstrumentation,
captureFlutterErrors: captureFlutterErrors || autoInstrumentation,
capturePlatformDispatcherErrors:
capturePlatformDispatcherErrors || autoInstrumentation,
preserveExistingHandlers: preserveExistingHandlers,
);
}