-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
legacy-area-analyzerUse area-devexp instead.Use area-devexp instead.type-bugIncorrect behavior (everything from a crash to more subtle misbehavior)Incorrect behavior (everything from a crash to more subtle misbehavior)
Description
Originally posted at google/built_value.dart#694
I'm getting const_constructor_with_mixin_with_field when using this mixin:
mixin RouteEnum on EnumClass {
String get title;
String get subtitle;
IconData get icon;
Color get color;
}I have other code in the mixin that depends on those fields, which are defined in the subclass.
Since I'm not actually defining any fields in the mixin itself, it seems like this error shouldn't necessarily happen.
Shouldn't getter-only fields be treated similarly to functions?
Edit: Forgot to add my use case for this...
I'm using Flutter with a BottomNavigationBar and separate navigation within each tab.
As a result, I'd like to keep all of this related information with the EnumClass because it makes more sense structurally to me than to have functions within the various Widgets.
jifalops, srawlins, tenhobi, TheKashe, jaripekkala and 12 moreSkyost
Metadata
Metadata
Assignees
Labels
legacy-area-analyzerUse area-devexp instead.Use area-devexp instead.type-bugIncorrect behavior (everything from a crash to more subtle misbehavior)Incorrect behavior (everything from a crash to more subtle misbehavior)