Closed praxamarnix closed 1 year ago
Hi @praxamarnix , Yes, that's a good suggestion. As a workaround, you can do the following ( although not nice )
class Foo extends _Foo with _$Foo {
@override
@protected
void bar() {
super.bar();
}
}
I was working with mobx and figured out that
@protected
meta is not taken into account during the generate step. Because of that there is no proper analysis to be performed by dart analysis. It does not look deeper for@protected
when the overriding class is exposing the method as public.If the generator would also annotate the
@protected
function with@protected
, calling the function from outside the class will nicely expose an analysis error.Here is an example implementation:
Because
void bar()
is missing@protected
in the generated file, calling the function from outside the class does not show an analysis warning.Would it be possible to look for protected (and perhaps others meta) and expose them in the generated code?