// EXAMPLE 1// Constructor and field m are publicly exposed with no lint warnings for improper access.@visibleForTestingclassSomeWidgetextendsStatelessWidget{constSomeWidget();intm=0; }// Intention of visibleForTesting may have been to allow tests to use `find.byType(SomeWidget)`.// Otherwise...
Each public class would probably have redirecting constructors such thatnew PublicA(...)actually yields an instance of_PrivateA. The code (in all classes mentioned above) would presumably have many occurrences of type tests where a givenPublicXis tested withif (myPublicX is _PrivateX) ... So...
I have an Enum with afinal String? _variable2;and it is set on the constructor. enumE{a('a'),b('b','c');constE(this._variable, [this._variable2]);finalString_variable;finalString?_variable2; } The lintuse_late_for_private_fields_and_variableskeeps showing up. But since I have ...