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

Upgrade flutter_lints to v3 #1213

Merged
merged 5 commits into from
Jan 6, 2024
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
21 changes: 9 additions & 12 deletions app/lib/account/account_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,9 @@ class _AccountPageState extends State<AccountPage> {
@visibleForTesting
class AccountPageBody extends StatelessWidget {
const AccountPageBody({
Key? key,
super.key,
required this.user,
}) : super(key: key);
});

final UserView user;

Expand Down Expand Up @@ -120,9 +120,8 @@ class _WebIcon extends StatelessWidget {

class _SecondaryInformationCard extends StatelessWidget {
const _SecondaryInformationCard({
Key? key,
required this.user,
}) : super(key: key);
});

final UserView user;

Expand All @@ -147,9 +146,8 @@ class _SecondaryInformationCard extends StatelessWidget {

class _MainAccountInformationCard extends StatelessWidget {
const _MainAccountInformationCard({
Key? key,
required this.user,
}) : super(key: key);
});

final UserView user;

Expand Down Expand Up @@ -179,7 +177,7 @@ class _MainAccountInformationCard extends StatelessWidget {
}

class _EditProfilButton extends StatelessWidget {
const _EditProfilButton({Key? key}) : super(key: key);
const _EditProfilButton();

@override
Widget build(BuildContext context) {
Expand All @@ -203,7 +201,7 @@ class _EditProfilButton extends StatelessWidget {
}

class _UserId extends StatelessWidget {
const _UserId({Key? key, required this.user}) : super(key: key);
const _UserId({required this.user});

final UserView user;

Expand Down Expand Up @@ -234,7 +232,7 @@ class _UserId extends StatelessWidget {
}

class _Name extends StatelessWidget {
const _Name({Key? key, required this.userView}) : super(key: key);
const _Name({required this.userView});

final UserView userView;

Expand All @@ -251,7 +249,7 @@ class _Name extends StatelessWidget {
}

class _EmailText extends StatelessWidget {
const _EmailText(this.user, {Key? key}) : super(key: key);
const _EmailText(this.user);

final UserView user;

Expand All @@ -272,10 +270,9 @@ class _EmailText extends StatelessWidget {

class _TypeOfUserText extends StatelessWidget {
const _TypeOfUserText({
Key? key,
required this.uid,
required this.userType,
}) : super(key: key);
});

final String userType;
final String uid;
Expand Down
2 changes: 1 addition & 1 deletion app/lib/account/profile/user_edit/user_edit_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ Future<void> _submit(BuildContext context,
}

class UserEditPage extends StatefulWidget {
const UserEditPage({Key? key, this.user}) : super(key: key);
const UserEditPage({super.key, this.user});

static const tag = "user-edit-page";
final AppUser? user;
Expand Down
9 changes: 4 additions & 5 deletions app/lib/account/register_account_section.dart
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ class _SignInMethods extends StatelessWidget {
}

class _GoogleButton extends StatelessWidget {
const _GoogleButton._(this.title, {Key? key}) : super(key: key);
const _GoogleButton._(this.title);
factory _GoogleButton.short() => const _GoogleButton._('Google');
factory _GoogleButton.long() => const _GoogleButton._('Mit Google anmelden');

Expand All @@ -135,7 +135,7 @@ class _GoogleButton extends StatelessWidget {
}

class _AppleButton extends StatelessWidget {
const _AppleButton._(this.title, {Key? key}) : super(key: key);
const _AppleButton._(this.title);

factory _AppleButton.short() => const _AppleButton._('Apple');
factory _AppleButton.long() => const _AppleButton._('Mit Apple anmelden');
Expand All @@ -159,7 +159,7 @@ class _AppleButton extends StatelessWidget {
}

class _EmailButton extends StatelessWidget {
const _EmailButton._(this.title, {Key? key}) : super(key: key);
const _EmailButton._(this.title);
factory _EmailButton.short() => const _EmailButton._('E-Mail');
factory _EmailButton.long() => const _EmailButton._('Mit E-Mail anmelden');

Expand Down Expand Up @@ -203,11 +203,10 @@ class _EmailButton extends StatelessWidget {

class _SignUpButton extends StatelessWidget {
const _SignUpButton({
Key? key,
required this.name,
required this.icon,
required this.onTap,
}) : super(key: key);
});

final String name;
final Widget icon;
Expand Down
4 changes: 2 additions & 2 deletions app/lib/activation_code/activation_code_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Future<dynamic> openEnterActivationCodePage(BuildContext context) {
}

class _EnterActivationCodePage extends StatelessWidget {
const _EnterActivationCodePage({Key? key}) : super(key: key);
const _EnterActivationCodePage();

static const tag = "enter-activation-code-page";

Expand All @@ -49,7 +49,7 @@ class _EnterActivationCodePage extends StatelessWidget {

class _EnterActivationCodeAppBar extends StatelessWidget
implements PreferredSizeWidget {
const _EnterActivationCodeAppBar({Key? key}) : super(key: key);
const _EnterActivationCodeAppBar();

@override
Widget build(BuildContext context) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import 'package:sharezone_widgets/sharezone_widgets.dart';

class EnterActivationCodeTextField extends StatelessWidget
implements PreferredSizeWidget {
const EnterActivationCodeTextField({Key? key}) : super(key: key);
const EnterActivationCodeTextField({super.key});

@override
Size get preferredSize => const Size.fromHeight(140);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ class FailedEnterActivationCodeResultDialog extends StatelessWidget {
final FailedEnterActivationCodeResult failedEnterActivationCodeResult;

const FailedEnterActivationCodeResultDialog({
Key? key,
super.key,
required this.failedEnterActivationCodeResult,
}) : super(key: key);
});
@override
Widget build(BuildContext context) {
if (failedEnterActivationCodeResult.enterActivationCodeException
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ import 'package:sharezone_widgets/sharezone_widgets.dart';

class SuccessfulEnterActivationCodeResultDialog extends StatelessWidget {
const SuccessfulEnterActivationCodeResultDialog({
Key? key,
super.key,
required this.result,
}) : super(key: key);
});

final SuccessfulEnterActivationCodeResult result;

Expand Down
14 changes: 6 additions & 8 deletions app/lib/auth/email_and_password_link_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ TextStyle _hintTextStyle(BuildContext context) => TextStyle(

class EmailAndPasswordLinkPage extends StatefulWidget {
const EmailAndPasswordLinkPage({
Key? key,
super.key,
required this.user,
}) : super(key: key);
});

static const tag = "email-and-password-link-page";
final AppUser user;
Expand Down Expand Up @@ -139,9 +139,8 @@ class _EmailAndPasswordLinkPageState extends State<EmailAndPasswordLinkPage> {

class _PasswordField extends StatelessWidget {
const _PasswordField({
Key? key,
required this.passwordFocusNode,
}) : super(key: key);
});

final FocusNode passwordFocusNode;

Expand Down Expand Up @@ -183,7 +182,7 @@ class BackIcon extends StatelessWidget {

class NameField extends StatelessWidget {
const NameField({
Key? key,
super.key,
required this.onEditingComplete,
this.focusNode,
this.initialName,
Expand All @@ -193,7 +192,7 @@ class NameField extends StatelessWidget {
this.textInputAction = TextInputAction.next,
this.autofocus = false,
this.selectText = false,
}) : super(key: key);
});

final FocusNode? focusNode;
final VoidCallback onEditingComplete;
Expand Down Expand Up @@ -250,10 +249,9 @@ class NameField extends StatelessWidget {

class _EmailField extends StatelessWidget {
const _EmailField({
Key? key,
required this.focusNode,
required this.nextFocusNode,
}) : super(key: key);
});

final FocusNode focusNode;
final FocusNode nextFocusNode;
Expand Down
4 changes: 2 additions & 2 deletions app/lib/auth/login_button.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ import 'package:flutter/material.dart';

class ContinueRoundButton extends StatelessWidget {
const ContinueRoundButton({
Key? key,
super.key,
required this.onTap,
this.tooltip,
}) : super(key: key);
});

final VoidCallback? onTap;
final String? tooltip;
Expand Down
45 changes: 17 additions & 28 deletions app/lib/auth/login_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -62,23 +62,21 @@ Future<void> handleAppleSignInSubmit(BuildContext context) async {

class LoginPage extends StatefulWidget {
const LoginPage({
Key? key,
super.key,
this.withBackIcon = true,
this.withQrCodeLogin = false,
this.withRegistrationButton = false,
}) : super(key: key);
});

const LoginPage.desktop({Key? key})
const LoginPage.desktop({super.key})
: withBackIcon = false,
withQrCodeLogin = true,
withRegistrationButton = true,
super(key: key);
withRegistrationButton = true;

const LoginPage.mobile({Key? key})
const LoginPage.mobile({super.key})
: withBackIcon = true,
withQrCodeLogin = false,
withRegistrationButton = false,
super(key: key);
withRegistrationButton = false;

static const tag = "login-page";

Expand Down Expand Up @@ -251,10 +249,9 @@ class _DebugLoginButtons extends StatelessWidget {

class _EmailPassword extends StatelessWidget {
const _EmailPassword({
Key? key,
required this.passwordFocusNode,
required this.onEditingComplete,
}) : super(key: key);
});

final FocusNode passwordFocusNode;
final VoidCallback onEditingComplete;
Expand Down Expand Up @@ -285,9 +282,7 @@ class _EmailPassword extends StatelessWidget {
}

class _LoadingCircle extends StatelessWidget {
const _LoadingCircle({
Key? key,
}) : super(key: key);
const _LoadingCircle();

@override
Widget build(BuildContext context) {
Expand Down Expand Up @@ -337,10 +332,9 @@ class _RegistrationSection extends StatelessWidget {

class _PasswordField extends StatelessWidget {
const _PasswordField({
Key? key,
required this.passwordFocusNode,
required this.onEditingComplete,
}) : super(key: key);
});

final FocusNode passwordFocusNode;
final VoidCallback onEditingComplete;
Expand All @@ -358,9 +352,7 @@ class _PasswordField extends StatelessWidget {
}

class _Logo extends StatelessWidget {
const _Logo({
Key? key,
}) : super(key: key);
const _Logo();

@override
Widget build(BuildContext context) {
Expand All @@ -374,13 +366,13 @@ class _Logo extends StatelessWidget {

class EmailLoginField extends StatelessWidget {
const EmailLoginField({
Key? key,
super.key,
required this.emailStream,
required this.onChanged,
required this.passwordFocusNode,
this.autofocus = false,
this.emailFocusNode,
}) : super(key: key);
});

final FocusNode? emailFocusNode;
final FocusNode passwordFocusNode;
Expand Down Expand Up @@ -417,13 +409,13 @@ class EmailLoginField extends StatelessWidget {

class PasswordField extends StatefulWidget {
const PasswordField({
Key? key,
super.key,
required this.focusNode,
required this.passwordStream,
required this.onChanged,
required this.onEditingComplete,
this.isNewPassword = false,
}) : super(key: key);
});

final FocusNode focusNode;
final Stream<String?> passwordStream;
Expand Down Expand Up @@ -508,9 +500,8 @@ class _ResetPasswordButton extends StatelessWidget {

class _LoginWithGoogleButton extends StatelessWidget {
const _LoginWithGoogleButton({
Key? key,
required this.onLogin,
}) : super(key: key);
});

final VoidCallback onLogin;

Expand Down Expand Up @@ -546,9 +537,8 @@ class _LoginWithQrCodeButton extends StatelessWidget {

class _LoginWithAppleButton extends StatelessWidget {
const _LoginWithAppleButton({
Key? key,
required this.onLogin,
}) : super(key: key);
});

final VoidCallback onLogin;

Expand All @@ -569,11 +559,10 @@ class _LoginWithAppleButton extends StatelessWidget {

class _SignWithOAuthButton extends StatelessWidget {
const _SignWithOAuthButton({
Key? key,
required this.icon,
required this.text,
this.onTap,
}) : super(key: key);
});

final Widget icon;
final String text;
Expand Down
Loading
Loading