updated project style guidelines
This commit is contained in:
@ -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),
|
||||
);
|
||||
});
|
||||
));
|
||||
}
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user