This fail a regression that happened after I pump mobx version from 0.4 to be 1.0.
The build runner fail to generate Store with State in StatefulWidget like so:
part 'test_widget.g.dart';
class TestWidget extends StatefulWidget {
@override
_TestWidgetState createState() => _TestWidgetState();
}
class _TestWidgetState = _TestWidgetStore with _$_TestWidgetState;
abstract class _TestWidgetStore extends State<TestWidget> with Store {
@observable
int counter;
@override
Widget build(BuildContext context) {
return Container();
}
}

This because we have toString() method in _$_TestWidgetState which conflict with toString({DiagnosticLevel minLevel}) in Diagnosable (State implement Diagnosable).
I guess we couldn't change toString() to toString({DiagnosticLevel minLevel}) cause this will make MobX itself depending on Flutter.
You can turn it off with @storeConfig(toString: false) on the Store class
You can turn it off with
@storeConfig(toString: false)on the Store class
In case anyone else finds this issue with a similar problem, I believe that the syntax is @StoreConfig(hasToString: false) (note the capitalization as well as the parameter).
Most helpful comment
You can turn it off with
@storeConfig(toString: false)on the Store class