updated project linter-rules and enforced them
This commit is contained in:
@ -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'),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
Reference in New Issue
Block a user