Apply dart auto fixes

This commit is contained in:
Elias Müller 2024-01-14 11:58:16 +01:00
parent b0bddb5cd7
commit 9edbfd81af
29 changed files with 29 additions and 31 deletions

View File

@ -21,7 +21,7 @@ import 'view/pages/talk/chatList.dart';
import 'view/pages/timetable/timetable.dart';
class App extends StatefulWidget {
const App({Key? key}) : super(key: key);
const App({super.key});
static PersistentTabController bottomNavigator = PersistentTabController(initialIndex: 0);

View File

@ -4,7 +4,6 @@ import 'dart:io';
import 'package:firebase_core/firebase_core.dart';
import 'package:firebase_messaging/firebase_messaging.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:jiffy/jiffy.dart';
@ -69,7 +68,7 @@ Future<void> main() async {
}
class Main extends StatefulWidget {
const Main({Key? key}) : super(key: key);
const Main({super.key});
@override
State<Main> createState() => _MainState();

View File

@ -11,7 +11,7 @@ import '../../model/accountData.dart';
import '../../model/accountModel.dart';
class Login extends StatefulWidget {
const Login({Key? key}) : super(key: key);
const Login({super.key});
@override
State<Login> createState() => _LoginState();

View File

@ -21,7 +21,7 @@ class FileElement extends StatefulWidget {
final CacheableFile file;
final List<String> path;
final void Function() refetch;
const FileElement(this.file, this.path, this.refetch, {Key? key}) : super(key: key);
const FileElement(this.file, this.path, this.refetch, {super.key});
static Future<DownloaderCore> download(BuildContext context, String remotePath, String name, Function(double) onProgress, Function(OpenResult) onDone) async {
Directory paths = await getTemporaryDirectory();

View File

@ -15,7 +15,7 @@ class FileUploadDialog extends StatefulWidget {
final bool doShowFinish;
const FileUploadDialog({Key? key, required this.localPath, required this.remotePath, required this.fileName, required this.onUploadFinished, this.doShowFinish = true}) : super(key: key);
const FileUploadDialog({super.key, required this.localPath, required this.remotePath, required this.fileName, required this.onUploadFinished, this.doShowFinish = true});
@override
State<FileUploadDialog> createState() => _FileUploadDialogState();

View File

@ -20,7 +20,7 @@ import 'fileElement.dart';
class Files extends StatefulWidget {
final List<String> path;
const Files(this.path, {Key? key}) : super(key: key);
const Files(this.path, {super.key});
@override
State<Files> createState() => _FilesState();

View File

@ -5,7 +5,7 @@ import '../../../../storage/base/settingsProvider.dart';
import '../../../../widget/confirmDialog.dart';
class GradeAverage extends StatefulWidget {
const GradeAverage({Key? key}) : super(key: key);
const GradeAverage({super.key});
@override
State<GradeAverage> createState() => _GradeAverageState();

View File

@ -8,7 +8,7 @@ import 'messageView.dart';
class Message extends StatefulWidget {
const Message({Key? key}) : super(key: key);
const Message({super.key});
@override
State<Message> createState() => _MessageState();

View File

@ -8,7 +8,7 @@ import '../../../../widget/confirmDialog.dart';
class MessageView extends StatefulWidget {
final String basePath;
final GetMessagesResponseObject message;
const MessageView({Key? key, required this.basePath, required this.message}) : super(key: key);
const MessageView({super.key, required this.basePath, required this.message});
@override
State<MessageView> createState() => _MessageViewState();

View File

@ -11,7 +11,7 @@ import 'roomplan/roomplan.dart';
import 'share/selectShareTypeDialog.dart';
class Overhang extends StatelessWidget {
const Overhang({Key? key}) : super(key: key);
const Overhang({super.key});
@override
Widget build(BuildContext context) {

View File

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

View File

@ -18,7 +18,7 @@ import 'joinChat.dart';
import 'searchChat.dart';
class ChatList extends StatefulWidget {
const ChatList({Key? key}) : super(key: key);
const ChatList({super.key});
@override
State<ChatList> createState() => _ChatListState();

View File

@ -21,7 +21,7 @@ class ChatView extends StatefulWidget {
final String selfId;
final UserAvatar avatar;
const ChatView({Key? key, required this.room, required this.selfId, required this.avatar}) : super(key: key);
const ChatView({super.key, required this.room, required this.selfId, required this.avatar});
@override
State<ChatView> createState() => _ChatViewState();

View File

@ -34,7 +34,7 @@ class ChatBubble extends StatefulWidget {
required this.bubbleData,
required this.chatData,
required this.refetch,
Key? key}) : super(key: key);
super.key});
@override
State<ChatBubble> createState() => _ChatBubbleState();

View File

@ -18,7 +18,7 @@ import '../../files/fileUploadDialog.dart';
class ChatTextfield extends StatefulWidget {
final String sendToToken;
const ChatTextfield(this.sendToToken, {Key? key}) : super(key: key);
const ChatTextfield(this.sendToToken, {super.key});
@override
State<ChatTextfield> createState() => _ChatTextfieldState();

View File

@ -23,7 +23,7 @@ class ChatTile extends StatefulWidget {
final bool disableContextActions;
final bool hasDraft;
const ChatTile({Key? key, required this.data, required this.query, this.disableContextActions = false, this.hasDraft = false}) : super(key: key);
const ChatTile({super.key, required this.data, required this.query, this.disableContextActions = false, this.hasDraft = false});
@override
State<ChatTile> createState() => _ChatTileState();

View File

@ -72,7 +72,7 @@ class _MessageReactionsState extends State<MessageReactions> {
);
}).toList(),
);
}).toList()
})
],
);
},

View File

@ -7,7 +7,7 @@ import 'CrossPainter.dart';
class AppointmentComponent extends StatefulWidget {
final CalendarAppointmentDetails details;
final bool crossedOut;
const AppointmentComponent({Key? key, required this.details, this.crossedOut = false}) : super(key: key);
const AppointmentComponent({super.key, required this.details, this.crossedOut = false});
@override
State<AppointmentComponent> createState() => _AppointmentComponentState();

View File

@ -3,7 +3,7 @@ import 'package:syncfusion_flutter_calendar/calendar.dart';
class TimeRegionComponent extends StatefulWidget {
final TimeRegionDetails details;
const TimeRegionComponent({Key? key, required this.details}) : super(key: key);
const TimeRegionComponent({super.key, required this.details});
@override
State<TimeRegionComponent> createState() => _TimeRegionComponentState();

View File

@ -20,7 +20,7 @@ import 'timeRegionComponent.dart';
import 'timetableEvents.dart';
class Timetable extends StatefulWidget {
const Timetable({Key? key}) : super(key: key);
const Timetable({super.key});
@override
State<Timetable> createState() => _TimetableState();

View File

@ -1,5 +1,4 @@
import 'dart:io';
import 'package:filesize/filesize.dart';
import 'package:flutter/foundation.dart';
@ -19,7 +18,7 @@ import '../../widget/debug/jsonViewer.dart';
import 'privacyInfo.dart';
class Settings extends StatefulWidget {
const Settings({Key? key}) : super(key: key);
const Settings({super.key});
@override
State<Settings> createState() => _SettingsState();

View File

@ -2,7 +2,7 @@
import 'package:flutter/material.dart';
class ListItemNavigator extends StatelessWidget {
const ListItemNavigator({Key? key, required this.icon, required this.text, required this.target, this.onLongPress, this.arrow = true}) : super(key: key);
const ListItemNavigator({super.key, required this.icon, required this.text, required this.target, this.onLongPress, this.arrow = true});
final IconData icon;
final String text;

View File

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

View File

@ -5,7 +5,7 @@ import 'package:flutter/material.dart';
class AnimatedTime extends StatefulWidget {
final Duration Function() callback;
const AnimatedTime({Key? key, required this.callback}) : super(key: key);
const AnimatedTime({super.key, required this.callback});
@override
State<AnimatedTime> createState() => _AnimatedTimeState();

View File

@ -8,7 +8,7 @@ class ConfirmDialog extends StatelessWidget {
final String confirmButton;
final String cancelButton;
final void Function() onConfirm;
const ConfirmDialog({Key? key, required this.title, this.content = "", this.icon, this.confirmButton = "Ok", this.cancelButton = "Abbrechen", required this.onConfirm}) : super(key: key);
const ConfirmDialog({super.key, required this.title, this.content = "", this.icon, this.confirmButton = "Ok", this.cancelButton = "Abbrechen", required this.onConfirm});
void asDialog(BuildContext context) {
showDialog(context: context, builder: (context) => build(context));

View File

@ -12,7 +12,7 @@ import 'jsonViewer.dart';
class CacheView extends StatefulWidget {
final collection = "MarianumMobile";
const CacheView({Key? key}) : super(key: key);
const CacheView({super.key});
@override
State<CacheView> createState() => _CacheViewState();

View File

@ -6,7 +6,7 @@ class JsonViewer extends StatelessWidget {
final String title;
final Map<String, dynamic> data;
const JsonViewer({Key? key, required this.title, required this.data}) : super(key: key);
const JsonViewer({super.key, required this.title, required this.data});
@override
Widget build(BuildContext context) {

View File

@ -4,7 +4,7 @@ import 'dart:async';
import 'package:flutter/material.dart';
class LoadingSpinner extends StatefulWidget {
const LoadingSpinner({Key? key}) : super(key: key);
const LoadingSpinner({super.key});
@override
State<LoadingSpinner> createState() => _LoadingSpinnerState();

View File

@ -4,7 +4,7 @@ class PlaceholderView extends StatelessWidget {
final IconData icon;
final String text;
final Widget? button;
const PlaceholderView({Key? key, required this.icon, required this.text, this.button}) : super(key: key);
const PlaceholderView({super.key, required this.icon, required this.text, this.button});
@override
Widget build(BuildContext context) {