atreeon / morphy

Provides a clean class definition with extra functionality including; copy with, json serializable, tostring, equals that supports inheritance and polymorphism
3 stars 3 forks source link

[Json to Object Polymorphism] generated error file #13

Open normidar opened 1 month ago

normidar commented 1 month ago

I tried https://pub.dev/packages/morphy#json-to-object-polymorphism but it generated a file that inculde errors.

[SEVERE] morphy on lib/src/drawer/base/color/pure_color.dart (cached):
An error `FormatterException` occurred while formatting the generated source for
  `package:image_gen/src/drawer/base/color/pure_color.dart`
which was output to
  `lib/src/drawer/base/color/pure_color.morphy.dart`.
This may indicate an issue in the generator, the input source code, or in the
source formatter.
Could not format because the source could not be parsed:

line 140, column 1 of .: Expected to find '}'.
    ╷
140 │ ) {
    │ ^
    ╵
line 153, column 1 of .: Expected to find '}'.
    ╷
153 │ ) {
    │ ^
    ╵
[SEVERE] Failed after 2.6s
atreeon commented 1 month ago

Is this running the example code, I'll take a look tomorrow. There are tests.