mobx.dart
mobx.dart copied to clipboard
[Flutter] toString method generation overrides my toString functionality.
trafficstars
code generation generates the no needed toString method and make my build break.
Is there anyway to disable automatic toString code in generation *.g .dart file?
@Malik056 Use @StoreConfig.
@StoreConfig(hasToString: false)
class YourStore = _YourStore with _$YourStore;
abstract class _YourStore with Store {
}
Thank you @amondnet. It is worth stating that as of March 2022, suppressing the toString() method is the only use for, and parameter of, StoreConfig.
Currently the only configuration used is boolean to indicate generation of toString method (true), or not (false)
https://github.com/mobxjs/mobx.dart/blob/master/mobx/lib/src/api/annotations.dart