build: Update packages and flutter super.key refactoring

This commit is contained in:
krille-chan 2023-10-28 13:03:16 +02:00
commit eca4825c70
No known key found for this signature in database
129 changed files with 294 additions and 324 deletions

View file

@ -9,11 +9,11 @@ class AdaptiveFlatButton extends StatelessWidget {
final void Function()? onPressed;
const AdaptiveFlatButton({
Key? key,
super.key,
required this.label,
this.textColor,
this.onPressed,
}) : super(key: key);
});
@override
Widget build(BuildContext context) {

View file

@ -21,8 +21,8 @@ class Avatar extends StatelessWidget {
this.onTap,
this.client,
this.fontSize = 18,
Key? key,
}) : super(key: key);
super.key,
});
@override
Widget build(BuildContext context) {

View file

@ -16,8 +16,7 @@ class ChatSettingsPopupMenu extends StatefulWidget {
final Room room;
final bool displayChatDetails;
const ChatSettingsPopupMenu(this.room, this.displayChatDetails, {Key? key})
: super(key: key);
const ChatSettingsPopupMenu(this.room, this.displayChatDetails, {super.key});
@override
ChatSettingsPopupMenuState createState() => ChatSettingsPopupMenuState();

View file

@ -10,7 +10,7 @@ import '../utils/localized_exception_extension.dart';
import 'matrix.dart';
class ConnectionStatusHeader extends StatefulWidget {
const ConnectionStatusHeader({Key? key}) : super(key: key);
const ConnectionStatusHeader({super.key});
@override
ConnectionStatusHeaderState createState() => ConnectionStatusHeaderState();

View file

@ -21,8 +21,8 @@ class ContentBanner extends StatelessWidget {
this.client,
this.opacity = 0.75,
this.placeholder,
Key? key,
}) : super(key: key);
super.key,
});
@override
Widget build(BuildContext context) {

View file

@ -18,11 +18,11 @@ class FluffyChatApp extends StatelessWidget {
final String? pincode;
const FluffyChatApp({
Key? key,
super.key,
this.testWidget,
required this.clients,
this.pincode,
}) : super(key: key);
});
/// getInitialLink may rereturn the value multiple times if this view is
/// opened multiple times for example if the user logs out after they logged

View file

@ -5,7 +5,7 @@ import 'package:flutter/material.dart';
class EmptyPage extends StatelessWidget {
final bool loading;
static const double _width = 300;
const EmptyPage({this.loading = false, Key? key}) : super(key: key);
const EmptyPage({this.loading = false, super.key});
@override
Widget build(BuildContext context) {
final width = min(MediaQuery.of(context).size.width, EmptyPage._width) / 2;

View file

@ -13,11 +13,11 @@ class LoginScaffold extends StatelessWidget {
final bool enforceMobileMode;
const LoginScaffold({
Key? key,
super.key,
required this.body,
this.appBar,
this.enforceMobileMode = false,
}) : super(key: key);
});
@override
Widget build(BuildContext context) {

View file

@ -15,8 +15,8 @@ class MaxWidthBody extends StatelessWidget {
this.maxWidth = 600,
this.withFrame = true,
this.withScrolling = true,
Key? key,
}) : super(key: key);
super.key,
});
@override
Widget build(BuildContext context) {
return SafeArea(

View file

@ -6,11 +6,11 @@ class TwoColumnLayout extends StatelessWidget {
final bool displayNavigationRail;
const TwoColumnLayout({
Key? key,
super.key,
required this.mainView,
required this.sideView,
required this.displayNavigationRail,
}) : super(key: key);
});
@override
Widget build(BuildContext context) {
return ScaffoldMessenger(

View file

@ -4,7 +4,7 @@ import 'package:go_router/go_router.dart';
import 'package:matrix/matrix.dart';
class LogViewer extends StatefulWidget {
const LogViewer({Key? key}) : super(key: key);
const LogViewer({super.key});
@override
LogViewerState createState() => LogViewerState();

View file

@ -45,8 +45,8 @@ class Matrix extends StatefulWidget {
this.child,
required this.clients,
this.queryParameters,
Key? key,
}) : super(key: key);
super.key,
});
@override
MatrixState createState() => MatrixState();

View file

@ -38,8 +38,8 @@ class MxcImage extends StatefulWidget {
this.animationCurve = FluffyThemes.animationCurve,
this.thumbnailMethod = ThumbnailMethod.scale,
this.cacheKey,
Key? key,
}) : super(key: key);
super.key,
});
@override
State<MxcImage> createState() => _MxcImageState();

View file

@ -22,8 +22,8 @@ class PublicRoomBottomSheet extends StatelessWidget {
required this.outerContext,
this.chunk,
this.onRoomJoined,
Key? key,
}) : super(key: key) {
super.key,
}) {
assert(roomAlias != null || chunk != null);
}

View file

@ -9,12 +9,12 @@ class SettingsSwitchListTile extends StatefulWidget {
final Function(bool)? onChanged;
const SettingsSwitchListTile.adaptive({
Key? key,
super.key,
this.defaultValue = false,
required this.storeKey,
required this.title,
this.onChanged,
}) : super(key: key);
});
@override
SettingsSwitchListTileState createState() => SettingsSwitchListTileState();

View file

@ -19,8 +19,8 @@ class ThemeBuilder extends StatefulWidget {
required this.builder,
this.themeModeSettingsKey = 'theme_mode',
this.primaryColorSettingsKey = 'primary_color',
Key? key,
}) : super(key: key);
super.key,
});
@override
State<ThemeBuilder> createState() => ThemeController();

View file

@ -11,11 +11,11 @@ class UnreadRoomsBadge extends StatelessWidget {
final Widget? child;
const UnreadRoomsBadge({
Key? key,
super.key,
required this.filter,
this.badgePosition,
this.child,
}) : super(key: key);
});
@override
Widget build(BuildContext context) {