style: use super parameters
This commit is contained in:
parent
d7972c4084
commit
8d1e3fa596
|
@ -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:
|
||||
|
|
|
@ -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<String, dynamic> json) =>
|
||||
_$GiteaBlobFromJson(json);
|
||||
String? content;
|
||||
|
|
|
@ -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<String, dynamic> json) =>
|
||||
_$GogsBlobFromJson(json);
|
||||
String? content;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue