diff options
author | davidpkj <davidpenkow1@gmail.com> | 2023-03-05 13:05:25 +0100 |
---|---|---|
committer | davidpkj <davidpenkow1@gmail.com> | 2023-03-05 13:05:25 +0100 |
commit | 14e4496de4138c317791030215803e7d57ec85bc (patch) | |
tree | 0d165667f1026325a7688c0f40bae4be6d7115f2 /lib/views/file_info.dart | |
parent | 45e4c5426a9090407dc1d210361c22ca83d8aa65 (diff) |
Refactored according to flutter lint
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); }, |