diff --git a/analysis_options.yaml b/analysis_options.yaml index 42e96ec..a5ad30a 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -30,6 +30,7 @@ linter: omit_local_variable_types: true prefer_final_in_for_each: true prefer_final_locals: true + use_super_parameters: true analyzer: exclude: diff --git a/lib/models/gitea.dart b/lib/models/gitea.dart index bfb17d0..36dea09 100644 --- a/lib/models/gitea.dart +++ b/lib/models/gitea.dart @@ -60,8 +60,7 @@ class GiteaTree { @JsonSerializable(fieldRename: FieldRename.snake) class GiteaBlob extends GiteaTree { - GiteaBlob({required String type, required String name}) - : super(name: name, type: type); + GiteaBlob({required super.type, required super.name}); factory GiteaBlob.fromJson(Map json) => _$GiteaBlobFromJson(json); String? content; diff --git a/lib/models/gogs.dart b/lib/models/gogs.dart index 5d91e3b..a135ba2 100644 --- a/lib/models/gogs.dart +++ b/lib/models/gogs.dart @@ -62,8 +62,7 @@ class GogsTree { @JsonSerializable(fieldRename: FieldRename.snake) class GogsBlob extends GogsTree { - GogsBlob({required String type, required String name}) - : super(name: name, type: type); + GogsBlob({required super.type, required super.name}); factory GogsBlob.fromJson(Map json) => _$GogsBlobFromJson(json); String? content; diff --git a/lib/widgets/contribution.dart b/lib/widgets/contribution.dart index 01a4164..4d9aac2 100644 --- a/lib/widgets/contribution.dart +++ b/lib/widgets/contribution.dart @@ -10,7 +10,7 @@ const contributionEmptyColor = '#ebedf0'; const contributionColors = ['#9be9a8', '#40c463', '#30a14e', '#216e39']; class HideScrollbar extends StatelessWidget { - const HideScrollbar({Key? key, this.child}) : super(key: key); + const HideScrollbar({super.key, this.child}); final Widget? child; @override diff --git a/lib/widgets/notification_item.dart b/lib/widgets/notification_item.dart index 55f5af5..50bfae1 100644 --- a/lib/widgets/notification_item.dart +++ b/lib/widgets/notification_item.dart @@ -10,10 +10,10 @@ import 'package:provider/provider.dart'; class NotificationItem extends StatefulWidget { const NotificationItem({ - Key? key, + super.key, required this.payload, required this.markAsRead, - }) : super(key: key); + }); final GithubNotificationItem payload; final Function markAsRead;