init method

  1. @override
Future<void> init()
override

Implementation

@override
Future<void> init() async {
  try {
    if (enableAnalytics == null) {
      _isEnabled = await fetchAnalyticsConfig();
    } else {
      _isEnabled = enableAnalytics!;
    }
    _bundleId = await ReownCoreUtils.getPackageName();
    _core.logger.i('[$runtimeType] enabled: $_isEnabled');
  } catch (e, _) {
    _core.logger.e('[$runtimeType] init error', error: e);
  }
}