updated project style guidelines

This commit is contained in:
2024-04-03 19:18:17 +02:00
parent 27618f4404
commit 4c7f53e309
185 changed files with 505 additions and 873 deletions

View File

@ -35,8 +35,7 @@ class _FileViewerState extends State<FileViewer> {
@override
Widget build(BuildContext context) {
AppBar appbar({List actions = const []}) {
return AppBar(
AppBar appbar({List actions = const []}) => AppBar(
title: Text(widget.path.split('/').last),
actions: [
IconButton(
@ -57,7 +56,6 @@ class _FileViewerState extends State<FileViewer> {
...actions
],
);
}
switch(openExternal ? '' : widget.path.split('.').last.toLowerCase()) {
case 'png':
@ -98,11 +96,9 @@ class _FileViewerState extends State<FileViewer> {
OpenFile.open(widget.path).then((result) {
Navigator.of(context).pop();
if(result.type != ResultType.done) {
showDialog(context: context, builder: (context) {
return AlertDialog(
showDialog(context: context, builder: (context) => AlertDialog(
content: Text(result.message),
);
});
));
}
});