appsentrik_sdk 0.0.1 copy "appsentrik_sdk: ^0.0.1" to clipboard
appsentrik_sdk: ^0.0.1 copied to clipboard

retracted

Let's create a markdown documentation for our Appsentrik SDK. The most reliable and feature-rich Flutter app tracking SDK for Crash Reporting, Performance Analytics, A/B Testing, Push Notifications, C [...]

Appsentrik SDK v0.0.1 #

The most reliable and feature-rich Flutter app tracking SDK for Crash Reporting, Performance Analytics, A/B Testing, Push Notifications, Code Quality, and more.

Slogan: Developed for organizations and developers by industry experts.

Note (Proprietary): Most features are free/freemium, but the Appsentrik SDK is proprietary and requires an Appsentrik backend account + valid project keys.

Support / Feature Requests / Contributions: Email support [at] appsentrik.com or use the contact form on the Appsentrik website.

Example App / Reference Implementation:
You can download the example app’s files and mimic a similar implementation from the public GitHub repo here.


Introduction #

The Appsentrik SDK connects your Flutter app to the Appsentrik platform so you can monitor stability, performance, and usage—without building your own analytics pipeline.

With Appsentrik, users can:

  • Create and manage organizations
    • An organization can be a single user or unlimited users*.
    • Fine-tuned permission levels (role-based access).
  • Create unlimited applications* per organization.
  • Track apps across environments like Development, Staging, and Production.

Platform Features #

  • ✅ Role- and access-based metrics
  • ✅ Crash reports for:
    • Platform crashes (native)
    • Flutter / Dart exceptions
  • ✅ Performance analytics:
    • Screen time
    • Frequently visited pages
    • Screen load times (time-to-first-frame)
    • Cold start & warm start timings
  • 🟡 Push notifications & in-app messages (coming soon)
  • 🟡 A/B testing (coming soon)
  • 🟡 Entire mobile app translations with U.S. & Canada “Bill 99” compliance (coming soon)
  • 🟡 Cross-platform compatibility (Native iOS, Native Android and web) (coming soon)
  • 🌐 Languages:
    • ✅ English (current)
    • 🟡 More languages (coming soon)

Account Creation and Provisioning #

  1. Create a free account at Appsentrik.com This account is used for dashboards, metrics visualization, and configuration.
  2. Create an organization.
  3. Create an application inside the organization.
  4. Copy your Public Key and Private Key:
    • Public Key → used by the SDK (safe to embed in your Flutter app)
    • Private Key → used for privileged API calls and advanced backend features (keep secret)

SDK Installation #

Option A — Pubspec dependency #

Add this to your pubspec.yaml:

dependencies:
  appsentrik_sdk: ^1.0.0

Then run:

flutter pub get

Option B — CLI add #

flutter pub add appsentrik_sdk

SDK Initialization #

Initialization should happen as early as possible during app startup—typically in main.dart.

Appsentrik supports:

  • Environment labeling (development, staging, production)
  • Optional base URL override (useful for dev/staging backends)
  • Optional AppSentrikUser profile (for filtering + user analytics)

Wrap your app entry point so uncaught exceptions still get forwarded to Appsentrik:

import 'dart:async';
import 'package:flutter/material.dart';
import 'package:appsentrik_sdk/appsentrik_sdk.dart';

void main() {
  runZonedGuarded(() {
    WidgetsFlutterBinding.ensureInitialized();

    AppSentrik.init(
      publicKey: 'YOUR_PUBLIC_KEY',
      environment: 'production',
      appVersion: '1.0.0',
      user: const AppSentrikUser(
        id: 'demo-user-1',
        email: 'demo@example.com',
        name: 'Demo User',
      ),
    );

    runApp(const MyApp());
  }, (error, stack) {
    // Any uncaught errors that escape the Flutter framework go here.
    AppSentrik.captureException(error, stack);
  });
}

Route & Screen Tracking (Performance + Sessions) #

Appsentrik uses a RouteObserver to automatically detect route names and measure:

  • Screen load time (time to first frame)
  • Navigation path history
  • Session replay
  • Session enrichment (last known screen)

1) Attach the Appsentrik Navigator Observer #

MaterialApp(
  navigatorObservers: [
    AppSentrik.navigatorObserver,
  ],
);

Named routes allow Appsentrik to track accurate screen names:

MaterialApp(
  initialRoute: AppRoutes.home,
  routes: {
    AppRoutes.home: (context) => const HomePage(),
    AppRoutes.settings: (context) => const SettingsPage(),
  },
);

If route names are not provided, Appsentrik will fall back to runtime route type names, which is less consistent across builds.


Features #

1) Crash Reporting (Automatic) #

With only initialization, Appsentrik tracks and reports:

  • ✅ Flutter framework errors (FlutterError.onError)
  • ✅ Uncaught zone errors (runZonedGuarded)
  • ✅ Platform dispatcher errors (PlatformDispatcher.instance.onError)
  • ✅ Native crash uploading (Android/iOS) where available via platform integration

No extra code required — crashes are automatically shipped to your dashboard upon SDK initialization.

Manual Crash Capture (Optional) #

try {
  throw Exception('Example exception');
} catch (e, st) {
  AppSentrik.captureException(e, st, context: {
    'feature': 'checkout',
    'step': 'payment',
  });
}

2) Session Tracking (Automatic) #

Appsentrik automatically creates and manages a session per app run:

  • Generates a unique session_id
  • Tracks lifecycle state changes:
    • started
    • foreground
    • background
    • terminated
  • Sends session snapshots to the backend
  • Includes:
    • Device context
    • Current screen (from observer)
    • Optional user JSON
    • Custom session context (if provided)

Access Current Session ID #

final sessionId = AppSentrik.I.currentSessionId;

3) Performance Analytics (Automatic) #

Appsentrik automatically captures:

  • ✅ Screen load time (time-to-first-frame) per route
  • ✅ Cold start time (process start → first frame)
  • ✅ Warm start time (resume → first frame)

These events are sent as structured performance events.

Improve Performance Data (Optional) #

If your app uses custom navigators or advanced routing, you can explicitly set the current screen:

AppSentrik.setCurrentScreen(
  'CheckoutScreen',
  extras: {
    'cart_items': 3,
    'variant': 'A',
  },
);

4) User Profiles (Optional) #

Attach a user profile so dashboards can filter metrics by user:

AppSentrik.setUser(
  const AppSentrikUser(
    id: 'user-123',
    email: 'user@example.com',
    name: 'Jane Doe',
  ),
);

Appsentrik will also generate and persist a stable per-install identifier:

  • appsentrik_id

This helps identify installs even when the host app has no logged-in user.


5) Custom Session Context (Optional) #

Attach stable metadata that should be merged into future session events:

AppSentrik.setSessionContext({
  'tenant_id': 'tenant_42',
  'ab_bucket': 'B',
  'feature_flags': {
    'new_checkout': true,
  },
});

Use cases:

  • AB buckets
  • Tenant/customer IDs
  • Feature flags
  • Internal build channels

Dashboard #

Appsentrik provides a cross-browser, mobile-friendly dashboard so teams can monitor apps on the go.

In the dashboard, users can:

  • Create/update organizations
  • Join organizations and request access
  • Approve users requesting to join your org
  • Assign roles and permissions
  • Create applications per environment (Dev/Staging/Production)
  • Receive unique keys per application
  • View crash reports & performance analytics
  • Configure notification events (email alerts)
  • Filter reports by:
    • time range
    • app version
    • environment
    • platform
  • Manage profile
  • View SDK/API documentation
  • Download the example app (code + builds where available)
  • Contact support

Feature Lanes #

Crashes #

  • ✅ Flutter/Dart exception capture
  • ✅ Global handler installation
  • ✅ Native crash upload (platform-dependent)
  • ✅ Context + user + session tagging

Performance #

  • ✅ Screen load time
  • ✅ Cold start time
  • ✅ Warm start time
  • ✅ Route-based analytics via observer

Push Notifications & In-App Messages #

  • 🟡 Coming soon

A/B Testing #

  • 🟡 Coming soon

Translations & Compliance (U.S. / Canada Bill 99) #

  • 🟡 Coming soon

Cross-Platform (Native iOS / Android / Web) #

  • 🟡 Coming soon

Security Notes #

  • Only the Public Key is embedded in your app.
  • The backend accepts SDK traffic only from valid public keys and configured apps.
  • The Private Key is for privileged operations and must not be shipped in client apps.

Troubleshooting #

Crashes not showing up? #

Checklist:

  • Confirm AppSentrik.init() runs before runApp()
  • Verify the publicKey is correct for the selected environment/app
  • Ensure the backend base URL is reachable (if overriding baseUrl)
  • Ensure errors are not swallowed by custom handlers before Appsentrik receives them

Performance events missing route names? #

Checklist:

  • Attach AppSentrik.navigatorObserver to your MaterialApp
  • Use named routes via routes: + initialRoute: or onGenerateRoute naming
  • For custom routing stacks, call AppSentrik.setCurrentScreen(...)

Credits #

Designed & Developed by: Omega Kwanga, — LinkedIn

Founder & CEO, Appsentrik


App & Admin Panel Showcase #

Crash Analytics

Performance Metrics

Organization(s) & App(s) Settings Screen

User Profile

User Preference Settings

Example App Landing Example App Navigation #

The Good Part #

* Limits may apply. Check the Appsentrik website for definitions, current limits, and plan details.

0
likes
0
points
86
downloads

Publisher

verified publisherappsentrik.com

Weekly Downloads

Let's create a markdown documentation for our Appsentrik SDK. The most reliable and feature-rich Flutter app tracking SDK for Crash Reporting, Performance Analytics, A/B Testing, Push Notifications, Code Quality, and much more.

Homepage

License

unknown (license)

Dependencies

flutter, flutter_web_plugins, http, plugin_platform_interface, shared_preferences, web

More

Packages that depend on appsentrik_sdk

Packages that implement appsentrik_sdk