appcenter_sdk_plus
An AppCenter SDK written purely in Flutter to support multiple platforms. It provides a subset of operations for AppCenter Analytics and AppCenter Crashes. More details about the AppCenter APIs can be found on their site.
Features
This package provides operations for:
- sending log events to AppCenter Analytics
- sending crash reports to AppCenter Crashes
- tracking screen views
Getting started
To install this package run:
flutter pub add appcenter_sdk_plus
For Flutter applications you need to add the native SQLite library with:
flutter pub add sqlite3_flutter_libs
For other platforms, read sqlite3 docs
Usage
import 'package:appcenter_sdk_plus/appcenter_sdk_plus.dart';
import 'package:appcenter_sdk_plus/service/appcenter_analytics.dart';
import 'package:appcenter_sdk_plus/service/appcenter_crashes.dart';
void main() async {
WidgetsFlutterBinding.ensureInitialized();
await AppCenter.start("8e14e67c-7c91-40ac-8517-c62ece8424a6");
await AppCenterAnalytics.trackEvent("app_started",
properties: {"theme": "system"});
try {
throw Exception("something");
} catch (e, s) {
await AppCenterCrashes.trackError(e, s,
properties: {"reason": "Test trackError"});
}
}
Additional information
If you encounter any problems or you feel the library is missing a feature, please raise a ticket on GitHub and I'll look into it. Pull request are also welcome.
Libraries
- appcenter_exception
- appcenter_sdk_plus
- domain/appcenter_options
- domain/device
- domain/event_log
- domain/log
- domain/managed_error_log
- infrastructure/appcenter/appcenter_client
- infrastructure/appcenter/http_exception
- infrastructure/appcenter/send_logs_response
- infrastructure/persistence/log_repository
- infrastructure/platform/physical_device_service
- service/appcenter_analytics
- service/appcenter_analytics_observer
- service/appcenter_crashes
- service/device_service
- service/log_service
- service/simple_device_service
- util/constants