diff --git a/lib/src/annotations/file.dart b/lib/src/annotations/file.dart index 00e724c..051dbdb 100644 --- a/lib/src/annotations/file.dart +++ b/lib/src/annotations/file.dart @@ -1,5 +1,4 @@ /// Writing Minecrafts functions annotations becomes really easy. Just annotate a Widget variable that should be inside of your function with `@Func()`: - class Func { final String? name; final String? path; diff --git a/lib/src/annotations/pack.dart b/lib/src/annotations/pack.dart index 68e16be..766759a 100644 --- a/lib/src/annotations/pack.dart +++ b/lib/src/annotations/pack.dart @@ -1,5 +1,4 @@ /// The `@Pck()` annotation works similar to @Func. You annotate a File List variable and it generates a Widget for this Pack. - class Pck { final String? name; final String? main; diff --git a/lib/src/annotations/project.dart b/lib/src/annotations/project.dart index 8a8dc9c..fbd34b7 100644 --- a/lib/src/annotations/project.dart +++ b/lib/src/annotations/project.dart @@ -1,5 +1,4 @@ /// This can automatically generate a main function with all necessary pieces to actually generate all packs and files. - class Prj { final String? name; final int? version; diff --git a/lib/src/annotations/widget.dart b/lib/src/annotations/widget.dart index a157f0b..951e4fa 100644 --- a/lib/src/annotations/widget.dart +++ b/lib/src/annotations/widget.dart @@ -6,7 +6,6 @@ /// Log('Hello $name $lastname!'), ///]); ///``` - // ignore: constant_identifier_names const Wdg = WidgetAnnotation(); diff --git a/lib/src/basic/pack.dart b/lib/src/basic/pack.dart index 073e6ba..b193db8 100644 --- a/lib/src/basic/pack.dart +++ b/lib/src/basic/pack.dart @@ -57,9 +57,8 @@ class Pack extends Widget { 'name': name, 'main': main?.toMap(), 'load': load?.toMap(), - 'modules': - modules == null ? null : modules!.map((x) => x.toMap()).toList(), - 'files': files == null ? null : files!.map((x) => x.toMap()).toList(), + 'modules': modules?.map((x) => x.toMap()).toList(), + 'files': files?.map((x) => x.toMap()).toList(), } }; } diff --git a/lib/src/basic/parsable.dart b/lib/src/basic/parsable.dart index f80b1e3..bf1fa77 100644 --- a/lib/src/basic/parsable.dart +++ b/lib/src/basic/parsable.dart @@ -2,5 +2,5 @@ import 'package:gson/parsable.dart'; class Parsable extends GsonParsable { /// ObjD's own type of a Parsable - Parsable(String parsable) : super(parsable); + Parsable(super.parsable); } diff --git a/lib/src/build/context.dart b/lib/src/build/context.dart index 48134c5..2930e30 100644 --- a/lib/src/build/context.dart +++ b/lib/src/build/context.dart @@ -16,7 +16,6 @@ /// } /// } /// ``` - class Context { List prefixes; List suffixes; diff --git a/lib/src/utils/recipe.dart b/lib/src/utils/recipe.dart index a00b5e5..20bdad8 100644 --- a/lib/src/utils/recipe.dart +++ b/lib/src/utils/recipe.dart @@ -262,7 +262,7 @@ class Recipe extends Widget { ingredients.forEach((k, item) { // If the item is not known - if (!items.containsValue(item)) { + if (!items.containsKey(item)) { // choose a new key from _CHARS items[item] = _CHARS[items.length]; }