From 83d74d9279b29cceaab12e463fd7eea23bc9a349 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 23 Oct 2023 15:08:32 +0000 Subject: [PATCH 1/3] Bump flutter_lints from 2.0.3 to 3.0.0 in /flutter Bumps [flutter_lints](https://github.com/flutter/packages/tree/main/packages) from 2.0.3 to 3.0.0. - [Release notes](https://github.com/flutter/packages/releases) - [Commits](https://github.com/flutter/packages/commits/pigeon-v3.0.0/packages) --- updated-dependencies: - dependency-name: flutter_lints dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- flutter/pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flutter/pubspec.yaml b/flutter/pubspec.yaml index 89e79196a2..add5fbb7db 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 flutter: From 366a7187af4791451f08f93e5e875b203e49b758 Mon Sep 17 00:00:00 2001 From: GIancarlo Buenaflor Date: Wed, 25 Oct 2023 10:55:00 +0200 Subject: [PATCH 2/3] Satisfy analyzer --- flutter/lib/sentry_flutter.dart | 2 ++ flutter/lib/src/flutter_sentry_attachment.dart | 6 ++---- flutter/lib/src/navigation/sentry_navigator_observer.dart | 6 ++---- flutter/lib/src/screenshot/sentry_screenshot_widget.dart | 3 +-- flutter/lib/src/sentry_flutter_options.dart | 3 +-- .../user_interaction/sentry_user_interaction_widget.dart | 4 ++-- .../sentry_user_interaction_widget_test.dart | 6 +++--- flutter/test/view_hierarchy/sentry_tree_walker_test.dart | 2 +- .../view_hierarchy/view_hierarchy_event_processor_test.dart | 2 +- 9 files changed, 15 insertions(+), 19 deletions(-) diff --git a/flutter/lib/sentry_flutter.dart b/flutter/lib/sentry_flutter.dart index c30ca1f5ad..3001e2e133 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; + 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 8b88b88088..03a3dcf0a5 100644 --- a/flutter/lib/src/navigation/sentry_navigator_observer.dart +++ b/flutter/lib/src/navigation/sentry_navigator_observer.dart @@ -264,14 +264,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 a1d7755c3c..aac970e9c8 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/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) { From 7c140e50dcf885180a1107535f463a7419a55ef8 Mon Sep 17 00:00:00 2001 From: GIancarlo Buenaflor Date: Wed, 25 Oct 2023 11:00:38 +0200 Subject: [PATCH 3/3] Satisfy dart analyzer --- flutter/lib/sentry_flutter.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flutter/lib/sentry_flutter.dart b/flutter/lib/sentry_flutter.dart index 3001e2e133..6760e99efb 100644 --- a/flutter/lib/sentry_flutter.dart +++ b/flutter/lib/sentry_flutter.dart @@ -1,7 +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';