From 58038e50564d5f96b34924d951e003fec5869ab5 Mon Sep 17 00:00:00 2001 From: MaddinMade <43761463+MaddinMade@users.noreply.github.com> Date: Mon, 26 Sep 2022 13:16:24 +0200 Subject: [PATCH] fixes generator issue with empty classes --- hive_generator/lib/src/class_builder.dart | 5 ----- 1 file changed, 5 deletions(-) diff --git a/hive_generator/lib/src/class_builder.dart b/hive_generator/lib/src/class_builder.dart index 8b9ce0202..ccc49644a 100644 --- a/hive_generator/lib/src/class_builder.dart +++ b/hive_generator/lib/src/class_builder.dart @@ -33,11 +33,6 @@ class ClassBuilder extends Builder { // The remaining fields to initialize. var fields = setters.toList(); - // Empty classes - if (constr!.parameters.isEmpty && fields.isEmpty) { - return 'return ${cls.name}();'; - } - var code = StringBuffer(); code.writeln(''' final numOfFields = reader.readByte();