updated project linter-rules and enforced them

This commit is contained in:
2024-03-29 18:22:55 +01:00
parent 21e11b6c2a
commit 75846750f7
113 changed files with 553 additions and 554 deletions

View File

@ -37,7 +37,7 @@ class _FileViewerState extends State<FileViewer> {
Widget build(BuildContext context) {
AppBar appbar({List actions = const []}) {
return AppBar(
title: Text(widget.path.split("/").last),
title: Text(widget.path.split('/').last),
actions: [
IconButton(
onPressed: () => Navigator.of(context).push(
@ -59,12 +59,12 @@ class _FileViewerState extends State<FileViewer> {
);
}
switch(openExternal ? "" : widget.path.split(".").last.toLowerCase()) {
case "png":
case "jpg":
case "jpeg":
case "webp":
case "gif":
switch(openExternal ? '' : widget.path.split('.').last.toLowerCase()) {
case 'png':
case 'jpg':
case 'jpeg':
case 'webp':
case 'gif':
return Scaffold(
appBar: appbar(
actions: [
@ -84,7 +84,7 @@ class _FileViewerState extends State<FileViewer> {
);
case "pdf":
case 'pdf':
return Scaffold(
appBar: appbar(),
body: SfPdfViewer.file(
@ -105,11 +105,11 @@ class _FileViewerState extends State<FileViewer> {
});
return PlaceholderView(
text: "Datei extern geöffnet",
text: 'Datei extern geöffnet',
icon: Icons.open_in_new,
button: TextButton(
onPressed: () => Navigator.of(context).pop(),
child: const Text("Zurück"),
child: const Text('Zurück'),
),
);
}