Skip to content

Commit cdf5282

Browse files
yadaniyilclaude
andcommitted
chore: upgrade flutter_lints to ^6.0.0, fix resulting lint warnings
- Bump flutter_lints ^2.0.1 → ^6.0.0 in main package - Update flutter SDK lower bound from ">=0.2.5" → ">=3.10.0" to match the Dart >=3.0.0 constraint (Dart 3.0 shipped with Flutter 3.10) - Example app: replace discontinued pedantic ^1.11.1 with flutter_lints ^6.0.0, remove unused integration_test dep, bump cupertino_icons to ^1.0.8, add flutter SDK lower bound - Fix 3 use_super_parameters lint warnings in Badge, BadgePositioned, and TestWidgetScreen constructors Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 7560d9a commit cdf5282

5 files changed

Lines changed: 10 additions & 12 deletions

File tree

example/pubspec.yaml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,21 @@ description: A new Flutter project.
33

44
environment:
55
sdk: ">=3.0.0 <4.0.0"
6+
flutter: ">=3.10.0"
67

78
dependencies:
89
flutter:
910
sdk: flutter
1011

11-
cupertino_icons: ^1.0.4
12+
cupertino_icons: ^1.0.8
1213

1314
badges:
1415
path: ../
1516

1617
dev_dependencies:
17-
integration_test:
18-
sdk: flutter
19-
pedantic: ^1.11.1
2018
flutter_test:
2119
sdk: flutter
20+
flutter_lints: ^6.0.0
2221

2322
flutter:
2423
uses-material-design: true

lib/src/badge.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import 'package:flutter/material.dart';
66

77
class Badge extends StatefulWidget {
88
const Badge({
9-
Key? key,
9+
super.key,
1010
this.badgeContent,
1111
this.child,
1212
this.badgeStyle = const BadgeStyle(),
@@ -16,7 +16,7 @@ class Badge extends StatefulWidget {
1616
this.ignorePointer = false,
1717
this.stackFit = StackFit.loose,
1818
this.onTap,
19-
}) : super(key: key);
19+
});
2020

2121
/// The badge child, e.g. cart icon button.
2222
final Widget? child;

lib/src/badge_positioned.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@ class BadgePositioned extends StatelessWidget {
1717
///
1818
/// See also:
1919
/// * [PositionedDirectional]
20-
const BadgePositioned({Key? key, this.position, required this.child})
21-
: super(key: key);
20+
const BadgePositioned({super.key, this.position, required this.child});
2221

2322
@override
2423
Widget build(BuildContext context) {

pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ dependencies:
1111
dev_dependencies:
1212
flutter_test:
1313
sdk: flutter
14-
flutter_lints: ^2.0.1
14+
flutter_lints: ^6.0.0
1515

1616
environment:
1717
sdk: ">=3.0.0 <4.0.0"
18-
flutter: ">=0.2.5"
18+
flutter: ">=3.10.0"
1919

2020
screenshots:
2121
- description: "Shopping cart with badge for pub.dev preview"

test/test_widget_screen.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class TestWidgetScreen extends StatefulWidget {
1616
final bool ignorePointer;
1717

1818
const TestWidgetScreen({
19-
Key? key,
19+
super.key,
2020
required this.badgeAnimationType,
2121
required this.animationDuration,
2222
required this.appearanceDuration,
@@ -27,7 +27,7 @@ class TestWidgetScreen extends StatefulWidget {
2727
this.toChangeContent = true,
2828
this.appearanceDisappearanceFadeAnimationEnabled = true,
2929
this.ignorePointer = false,
30-
}) : super(key: key);
30+
});
3131

3232
@override
3333
State<TestWidgetScreen> createState() => _TestWidgetScreenState();

0 commit comments

Comments
 (0)