getAnalyticsInstance function

Analytics getAnalyticsInstance([
  1. App? app,
  2. Map<String, dynamic>? options = const {}
])

Given an AppJSImp, return the Analytics instance.

Implementation

Analytics getAnalyticsInstance([
  App? app,
  Map<String, dynamic>? options = const {},
]) {
  return Analytics.getInstance(
    app != null
        ? analytics_interop.initializeAnalytics(
            app.jsObject,
            options?.jsify() ?? {}.jsify(),
          )
        : analytics_interop.getAnalytics(),
  );
}