diff options
Diffstat (limited to 'lib/views/file_info.dart')
-rw-r--r-- | lib/views/file_info.dart | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/views/file_info.dart b/lib/views/file_info.dart index e032716..28c45f9 100644 --- a/lib/views/file_info.dart +++ b/lib/views/file_info.dart @@ -9,15 +9,15 @@ import 'package:kulinar_app/widgets/error_widgets.dart'; import 'package:flutter_gen/gen_l10n/app_localizations.dart'; class FileInfo extends StatefulWidget { - FileInfo({Key? key, required this.filePath}) : super(key: key); + const FileInfo({Key? key, required this.filePath}) : super(key: key); final String filePath; @override - _FileInfoState createState() => _FileInfoState(); + FileInfoState createState() => FileInfoState(); } -class _FileInfoState extends State<FileInfo> { +class FileInfoState extends State<FileInfo> { @override Widget build(BuildContext context) { final File _file = File(widget.filePath.split(":")[1]); @@ -27,8 +27,8 @@ class _FileInfoState extends State<FileInfo> { body: FutureBuilder( future: FileHandler.deserializeFileInformation(_file), builder: (BuildContext context, AsyncSnapshot<Map<String, String>> snapshot) { - if (snapshot.connectionState != ConnectionState.done) return CircularProgressIndicator(); - if (snapshot.hasError || !snapshot.hasData) return UnknownError(); + if (snapshot.connectionState != ConnectionState.done) return const CircularProgressIndicator(); + if (snapshot.hasError || !snapshot.hasData) return const UnknownError(); return _buildFileInfoTable(_getSortedSnapshotData(snapshot), _file); }, |