diff --git a/drift/README.md b/drift/README.md index 4255e1bb76..e6fd9e6d11 100644 --- a/drift/README.md +++ b/drift/README.md @@ -8,6 +8,14 @@ Sentry integration for `drift` package =========== +| package | build | pub | likes | popularity | pub points | +|-------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------| ------- | +| sentry_drift | [![build](https://github.com/getsentry/sentry-dart/workflows/sentry-drift/badge.svg?branch=main)](https://github.com/getsentry/sentry-dart/actions?query=workflow%3Asentry-drift) | [![pub package](https://img.shields.io/pub/v/sentry_drift.svg)](https://pub.dev/packages/sentry_drift) | [![likes](https://img.shields.io/pub/likes/sentry_drift)](https://pub.dev/packages/sentry_drift/score) | [![popularity](https://img.shields.io/pub/popularity/sentry_drift)](https://pub.dev/packages/sentry_drift/score) | [![pub points](https://img.shields.io/pub/points/sentry_drift)](https://pub.dev/packages/sentry_drift/score) + +Integration for the [`drift`](https://pub.dev/packages/drift) package. + +#### Usage + - Sign up for a Sentry.io account and get a DSN at https://sentry.io. - Follow the installing instructions on [pub.dev](https://pub.dev/packages/sentry/install). @@ -22,7 +30,7 @@ import 'package:drift/native.dart'; import 'package:sentry/sentry.dart'; import 'package:sentry_drift/sentry_drift.dart'; -import '../test/test_database.dart'; +import 'your_database.dart'; Future main() async { // ATTENTION: Change the DSN below with your own to see the events in Sentry. Get one at sentry.io diff --git a/drift/analysis_options.yaml b/drift/analysis_options.yaml index 28ddbe2636..c5f7c0d066 100644 --- a/drift/analysis_options.yaml +++ b/drift/analysis_options.yaml @@ -17,7 +17,6 @@ analyzer: deprecated_member_use_from_same_package: warning # ignore sentry/path on pubspec as we change it on deployment invalid_dependency: ignore - unnecessary_import: ignore exclude: - example/** - test/mocks/mocks.mocks.dart diff --git a/drift/lib/src/sentry_query_executor.dart b/drift/lib/src/sentry_query_executor.dart index aaf453dad7..6f09906970 100644 --- a/drift/lib/src/sentry_query_executor.dart +++ b/drift/lib/src/sentry_query_executor.dart @@ -1,6 +1,5 @@ import 'dart:async'; -import 'package:drift/backends.dart'; import 'package:drift/drift.dart'; import 'package:meta/meta.dart'; import 'package:sentry/sentry.dart'; diff --git a/flutter/lib/src/event_processor/flutter_enricher_event_processor.dart b/flutter/lib/src/event_processor/flutter_enricher_event_processor.dart index de6b6bab9f..a4d04573a6 100644 --- a/flutter/lib/src/event_processor/flutter_enricher_event_processor.dart +++ b/flutter/lib/src/event_processor/flutter_enricher_event_processor.dart @@ -139,16 +139,15 @@ class FlutterEnricherEventProcessor implements EventProcessor { return { 'has_render_view': hasRenderView.toString(), if (tempDebugBrightnessOverride != null) - 'debug_brightness_override': describeEnum(tempDebugBrightnessOverride), + 'debug_brightness_override': tempDebugBrightnessOverride.name, if (debugPlatformOverride != null) - 'debug_default_target_platform_override': - describeEnum(debugPlatformOverride), + 'debug_default_target_platform_override': debugPlatformOverride.name, if (initialLifecycleState != null && initialLifecycleState.isNotEmpty) 'initial_lifecycle_state': initialLifecycleState, if (defaultRouteName != null && defaultRouteName.isNotEmpty) 'default_route_name': defaultRouteName, if (currentLifecycle != null) - 'current_lifecycle_state': describeEnum(currentLifecycle), + 'current_lifecycle_state': currentLifecycle.name, // Seems to always return false. // Also always fails in tests. // See https://github.com/flutter/flutter/issues/83919 diff --git a/flutter/lib/src/native/cocoa/binding.dart b/flutter/lib/src/native/cocoa/binding.dart index 0bd2e0437e..646a6bea83 100644 --- a/flutter/lib/src/native/cocoa/binding.dart +++ b/flutter/lib/src/native/cocoa/binding.dart @@ -37603,8 +37603,7 @@ class ObjCBlock_bool_ObjCObject_ffiUnsignedLong_bool extends _ObjCBlockBase { ObjCBlock_bool_ObjCObject_ffiUnsignedLong_bool.fromFunctionPointer( SentryCocoa lib, ffi.Pointer< - ffi - .NativeFunction< + ffi.NativeFunction< ffi.Bool Function(ffi.Pointer arg0, ffi.UnsignedLong arg1, ffi.Pointer arg2)>> ptr) @@ -42032,17 +42031,15 @@ class ObjCBlock_bool_ObjCObject_bool extends _ObjCBlockBase { ffi.Pointer arg1)>> ptr) : this._( - lib - ._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Bool Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>( - _ObjCBlock_bool_ObjCObject_bool_fnPtrTrampoline, - false) - .cast(), - ptr.cast()), + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Bool Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>( + _ObjCBlock_bool_ObjCObject_bool_fnPtrTrampoline, false) + .cast(), + ptr.cast()), lib); static ffi.Pointer? _cFuncTrampoline;