diff --git a/flutter/lib/sentry_flutter.dart b/flutter/lib/sentry_flutter.dart index c30ca1f5ad..6760e99efb 100644 --- a/flutter/lib/sentry_flutter.dart +++ b/flutter/lib/sentry_flutter.dart @@ -1,5 +1,7 @@ -// ignore: invalid_export_of_internal_element /// A Flutter client for Sentry.io crash reporting. +library sentry_flutter; + +// ignore: invalid_export_of_internal_element export 'package:sentry/sentry.dart'; export 'src/integrations/load_release_integration.dart'; diff --git a/flutter/lib/src/flutter_sentry_attachment.dart b/flutter/lib/src/flutter_sentry_attachment.dart index 83b75c20bd..2e8d57927a 100644 --- a/flutter/lib/src/flutter_sentry_attachment.dart +++ b/flutter/lib/src/flutter_sentry_attachment.dart @@ -16,8 +16,8 @@ class FlutterSentryAttachment extends SentryAttachment { String? filename, AssetBundle? bundle, String? type, - String? contentType, - bool? addToTransactions, + super.contentType, + super.addToTransactions, }) : super.fromLoader( loader: () async { final data = await (bundle ?? rootBundle).load(key); @@ -28,7 +28,5 @@ class FlutterSentryAttachment extends SentryAttachment { ? Uri.parse(key).pathSegments.last : 'unknown'), attachmentType: type, - contentType: contentType, - addToTransactions: addToTransactions, ); } diff --git a/flutter/lib/src/navigation/sentry_navigator_observer.dart b/flutter/lib/src/navigation/sentry_navigator_observer.dart index bfe1c0c6a2..6893d47aca 100644 --- a/flutter/lib/src/navigation/sentry_navigator_observer.dart +++ b/flutter/lib/src/navigation/sentry_navigator_observer.dart @@ -283,14 +283,12 @@ class RouteObserverBreadcrumb extends Breadcrumb { dynamic fromArgs, String? to, dynamic toArgs, - SentryLevel? level, - DateTime? timestamp, + super.level, + super.timestamp, Map? data, }) : super( category: _navigationKey, type: _navigationKey, - level: level, - timestamp: timestamp, data: { 'state': navigationType, if (from != null) 'from': from, diff --git a/flutter/lib/src/screenshot/sentry_screenshot_widget.dart b/flutter/lib/src/screenshot/sentry_screenshot_widget.dart index b11b511bb3..b7273b8979 100644 --- a/flutter/lib/src/screenshot/sentry_screenshot_widget.dart +++ b/flutter/lib/src/screenshot/sentry_screenshot_widget.dart @@ -22,8 +22,7 @@ final sentryScreenshotWidgetGlobalKey = /// - You can only have one [SentryScreenshotWidget] widget in your widget tree at all /// times. class SentryScreenshotWidget extends StatefulWidget { - const SentryScreenshotWidget({Key? key, required this.child}) - : super(key: key); + const SentryScreenshotWidget({super.key, required this.child}); final Widget child; diff --git a/flutter/lib/src/sentry_flutter_options.dart b/flutter/lib/src/sentry_flutter_options.dart index 1a71a0d37e..3806397465 100644 --- a/flutter/lib/src/sentry_flutter_options.dart +++ b/flutter/lib/src/sentry_flutter_options.dart @@ -10,8 +10,7 @@ import 'screenshot/sentry_screenshot_quality.dart'; /// Note that some of these options require native Sentry integration, which is /// not available on all platforms. class SentryFlutterOptions extends SentryOptions { - SentryFlutterOptions({String? dsn, PlatformChecker? checker}) - : super(dsn: dsn, checker: checker) { + SentryFlutterOptions({super.dsn, super.checker}) { enableBreadcrumbTrackingForCurrentPlatform(); } diff --git a/flutter/lib/src/user_interaction/sentry_user_interaction_widget.dart b/flutter/lib/src/user_interaction/sentry_user_interaction_widget.dart index f98a919065..94d364899e 100644 --- a/flutter/lib/src/user_interaction/sentry_user_interaction_widget.dart +++ b/flutter/lib/src/user_interaction/sentry_user_interaction_widget.dart @@ -234,10 +234,10 @@ Element? _clickTrackerElement; /// [SentryUserInteractionWidget] as a child of [SentryScreenshotWidget]. class SentryUserInteractionWidget extends StatefulWidget { SentryUserInteractionWidget({ - Key? key, + super.key, required this.child, @internal Hub? hub, - }) : super(key: key) { + }) { _hub = hub ?? HubAdapter(); if (_options?.enableUserInteractionTracing ?? false) { diff --git a/flutter/pubspec.yaml b/flutter/pubspec.yaml index 0e321ab82f..d06f95e31e 100644 --- a/flutter/pubspec.yaml +++ b/flutter/pubspec.yaml @@ -26,7 +26,7 @@ dev_dependencies: sdk: flutter mockito: ^5.1.0 yaml: ^3.1.0 # needed for version match (code and pubspec) - flutter_lints: ^2.0.0 + flutter_lints: ^3.0.0 collection: ^1.16.0 remove_from_coverage: ^2.0.0 flutter_localizations: diff --git a/flutter/test/user_interaction/sentry_user_interaction_widget_test.dart b/flutter/test/user_interaction/sentry_user_interaction_widget_test.dart index 02d1022157..a814bd0b54 100644 --- a/flutter/test/user_interaction/sentry_user_interaction_widget_test.dart +++ b/flutter/test/user_interaction/sentry_user_interaction_widget_test.dart @@ -327,7 +327,7 @@ class Fixture { } class MyApp extends StatelessWidget { - const MyApp({Key? key}) : super(key: key); + const MyApp({super.key}); @override Widget build(BuildContext context) { @@ -340,7 +340,7 @@ class MyApp extends StatelessWidget { } class Page1 extends StatelessWidget { - const Page1({Key? key}) : super(key: key); + const Page1({super.key}); @override Widget build(BuildContext context) { @@ -416,7 +416,7 @@ class Page1 extends StatelessWidget { } class Page2 extends StatelessWidget { - const Page2({Key? key}) : super(key: key); + const Page2({super.key}); @override Widget build(BuildContext context) { diff --git a/flutter/test/view_hierarchy/sentry_tree_walker_test.dart b/flutter/test/view_hierarchy/sentry_tree_walker_test.dart index c2048c3492..52d775529b 100644 --- a/flutter/test/view_hierarchy/sentry_tree_walker_test.dart +++ b/flutter/test/view_hierarchy/sentry_tree_walker_test.dart @@ -172,7 +172,7 @@ bool _findWidget( } class MyApp extends StatelessWidget { - const MyApp({Key? key}) : super(key: key); + const MyApp({super.key}); @override Widget build(BuildContext context) { diff --git a/flutter/test/view_hierarchy/view_hierarchy_event_processor_test.dart b/flutter/test/view_hierarchy/view_hierarchy_event_processor_test.dart index 537b2cd9c4..6900ba5589 100644 --- a/flutter/test/view_hierarchy/view_hierarchy_event_processor_test.dart +++ b/flutter/test/view_hierarchy/view_hierarchy_event_processor_test.dart @@ -107,7 +107,7 @@ class Fixture { } class MyApp extends StatelessWidget { - const MyApp({Key? key}) : super(key: key); + const MyApp({super.key}); @override Widget build(BuildContext context) {