xsahil03x / super_enum

Create super-powered dart enums similar to sealed classes in Kotlin
https://pub.dev/packages/super_enum
MIT License
116 stars 13 forks source link

Why renaming enum fields? #50

Closed olehmisar closed 4 years ago

olehmisar commented 4 years ago

Why does the generator rename enum fields? For example, if I define the following enum

@superEnum
enum _Result {
  @object
  Success,

  @object
  Error
}

...Success becomes success and Error becomes error. Is there a reason for this? I think it would be better to keep the original names to avoid confusion.

shinayser commented 4 years ago

Agreed!

xsahil03x commented 4 years ago

That's how we generally write named / factory constructors in dart https://dart.dev/guides/language/language-tour#constructors