fix: more use of "super.key"

This commit is contained in:
Yannick Mauray 2024-06-27 19:26:45 +02:00
parent 07a29cb109
commit 703094c825
9 changed files with 18 additions and 21 deletions

View File

@ -3,10 +3,10 @@ import 'package:gettext_i18n/gettext_i18n.dart';
class CancelDismissButton extends StatelessWidget {
const CancelDismissButton({
Key? key,
required this.downloadFinished,
required this.onCancel,
}) : super(key: key);
super.key,
});
final bool downloadFinished;
final VoidCallback onCancel;

View File

@ -2,12 +2,12 @@ import 'package:flutter/material.dart';
import 'package:gettext_i18n/gettext_i18n.dart';
class DownloadLabel extends StatelessWidget {
const DownloadLabel(
{Key? key,
required this.downloadFinished,
required this.data,
required this.downloader})
: super(key: key);
const DownloadLabel({
required this.downloadFinished,
required this.data,
required this.downloader,
super.key,
});
final bool downloadFinished;
final double? data;

View File

@ -2,10 +2,10 @@ import 'package:flutter/material.dart';
class DownloadProgressBar extends StatelessWidget {
const DownloadProgressBar({
Key? key,
required this.downloadFinished,
required this.data,
}) : super(key: key);
super.key,
});
final bool downloadFinished;
final double? data;

View File

@ -8,9 +8,8 @@ import '../../globals.dart';
import '../../mixins/preferences_mixin.dart';
import '../home_page/home_page_button_group.dart';
class DownloaderMenu extends StatefulWidget {
const DownloaderMenu({Key? key}) : super(key: key);
const DownloaderMenu({super.key});
@override
State<DownloaderMenu> createState() => _DownloaderMenuState();

View File

@ -2,11 +2,11 @@ import 'package:flutter/material.dart';
class DownloaderPageButton extends StatelessWidget {
const DownloaderPageButton({
Key? key,
this.label,
required this.text,
this.onPressed,
}) : super(key: key);
super.key,
});
final String? label;
final String text;

View File

@ -2,11 +2,11 @@ import 'package:flutter/material.dart';
class HomePageButton extends StatelessWidget {
const HomePageButton({
Key? key,
this.label,
required this.text,
this.onPressed,
}) : super(key: key);
super.key,
});
final String? label;
final String text;

View File

@ -1,9 +1,7 @@
import 'package:flutter/material.dart';
class Logo extends StatelessWidget {
const Logo({
Key? key,
}) : super(key: key);
const Logo({super.key});
@override
Widget build(BuildContext context) {

View File

@ -6,7 +6,7 @@ import '../../pages/manager.dart';
import '../home_page/home_page_button.dart';
class MainMenu extends StatelessWidget {
const MainMenu({Key? key}) : super(key: key);
const MainMenu({super.key});
@override
Widget build(BuildContext context) {

View File

@ -9,7 +9,7 @@ import '../mixins/preferences_mixin.dart';
import '../model/app_settings.dart';
class LeftMenu extends StatefulWidget {
const LeftMenu({Key? key}) : super(key: key);
const LeftMenu({super.key});
@override
State<LeftMenu> createState() => _LeftMenuState();