From 7accdcf24639043c7fc6b9a9bc48a5e5bc440a81 Mon Sep 17 00:00:00 2001 From: zontreck Date: Sat, 27 Jul 2024 18:10:04 -0700 Subject: [PATCH] Apply dart fixes --- lib/Editor.dart | 2 +- lib/main.dart | 10 ++++++---- lib/tags/ByteArrayTag.dart | 2 +- lib/tags/IntArrayTag.dart | 2 +- lib/tags/LongArrayTag.dart | 2 +- 5 files changed, 10 insertions(+), 8 deletions(-) diff --git a/lib/Editor.dart b/lib/Editor.dart index 4e97eb6..42c22cb 100644 --- a/lib/Editor.dart +++ b/lib/Editor.dart @@ -248,7 +248,7 @@ class EditorState extends State { didChangeState(); }, - child: Icon(Icons.delete_forever)) + child: const Icon(Icons.delete_forever)) ], ), ); diff --git a/lib/main.dart b/lib/main.dart index 02026f1..864b6ac 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -8,11 +8,11 @@ import 'package:nbteditor/pages/permsrequired.dart'; import 'package:permission_handler/permission_handler.dart'; void main() async { - runApp(MainApp()); + runApp(const MainApp()); } class MainApp extends StatelessWidget { - MainApp({ + const MainApp({ super.key, }); @@ -38,8 +38,10 @@ Future needsPermissionsPage() async { if (needsPermissions()) { if (await Permission.manageExternalStorage.isDenied) { return true; - } else + } else { return false; - } else + } + } else { return false; + } } diff --git a/lib/tags/ByteArrayTag.dart b/lib/tags/ByteArrayTag.dart index 151194f..7e72865 100644 --- a/lib/tags/ByteArrayTag.dart +++ b/lib/tags/ByteArrayTag.dart @@ -13,7 +13,7 @@ extension ByteArrayTagExt on ByteArrayTag { entries.add(Node( key: "$path/$count", label: "$element", - data: ArrayEntry(value: "${element}", parent: this, index: count))); + data: ArrayEntry(value: "$element", parent: this, index: count))); count++; } diff --git a/lib/tags/IntArrayTag.dart b/lib/tags/IntArrayTag.dart index 34b4def..697144d 100644 --- a/lib/tags/IntArrayTag.dart +++ b/lib/tags/IntArrayTag.dart @@ -13,7 +13,7 @@ extension IntArrayTagExt on IntArrayTag { entries.add(Node( key: "$path/$count", label: "$element", - data: ArrayEntry(value: "${element}", parent: this, index: count))); + data: ArrayEntry(value: "$element", parent: this, index: count))); count++; } diff --git a/lib/tags/LongArrayTag.dart b/lib/tags/LongArrayTag.dart index 75ca4d8..9e21023 100644 --- a/lib/tags/LongArrayTag.dart +++ b/lib/tags/LongArrayTag.dart @@ -13,7 +13,7 @@ extension LongArrayTagExt on LongArrayTag { entries.add(Node( key: "$path/$count", label: "$element", - data: ArrayEntry(value: "${element}", parent: this, index: count))); + data: ArrayEntry(value: "$element", parent: this, index: count))); count++; }