Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump flutter_lints from 2.0.3 to 3.0.0 in /flutter #1698

Merged
merged 6 commits into from
Dec 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion flutter/lib/sentry_flutter.dart
Original file line number Diff line number Diff line change
@@ -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
Comment on lines +2 to +4
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@denrase I was making linting changes so the workflow doesn't fail. Do you know if adding library sentry_flutter; has any effect / is safe?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What was the linter issue without library sentry_flutter; ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

export 'package:sentry/sentry.dart';

export 'src/integrations/load_release_integration.dart';
Expand Down
6 changes: 2 additions & 4 deletions flutter/lib/src/flutter_sentry_attachment.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -28,7 +28,5 @@ class FlutterSentryAttachment extends SentryAttachment {
? Uri.parse(key).pathSegments.last
: 'unknown'),
attachmentType: type,
contentType: contentType,
addToTransactions: addToTransactions,
);
}
6 changes: 2 additions & 4 deletions flutter/lib/src/navigation/sentry_navigator_observer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -283,14 +283,12 @@ class RouteObserverBreadcrumb extends Breadcrumb {
dynamic fromArgs,
String? to,
dynamic toArgs,
SentryLevel? level,
DateTime? timestamp,
super.level,
super.timestamp,
Map<String, dynamic>? data,
}) : super(
category: _navigationKey,
type: _navigationKey,
level: level,
timestamp: timestamp,
data: <String, dynamic>{
'state': navigationType,
if (from != null) 'from': from,
Expand Down
3 changes: 1 addition & 2 deletions flutter/lib/src/screenshot/sentry_screenshot_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
3 changes: 1 addition & 2 deletions flutter/lib/src/sentry_flutter_options.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion flutter/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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) {
Expand Down Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion flutter/test/view_hierarchy/sentry_tree_walker_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down