Open jaumard opened 5 years ago
Basically here is what's generated when using @Bind
@Bind
@override void subscribeParent(LoginPhoneBloc value) { this._parent = value; this._parent._phoneNumber.listen(value._managePhoneNumber); }
Problem is that if later you're doing something like
_phoneNumber.addError('Wrong phone!!!');
You get a crash, but it's a wanted error that will be show on UI side, I don't want it to spread.
The right generated code should be:
this._parent._phoneNumber.listen(value._managePhoneNumber, onError: (_) {});
By default I think @Bind should swallow errors, as in bloc you mainly addError because you want it. but an additional ignoreError boolean field to override that behavior can be useful (maybe ^^)
addError
ignoreError
Basically here is what's generated when using
@Bind
Problem is that if later you're doing something like
You get a crash, but it's a wanted error that will be show on UI side, I don't want it to spread.
The right generated code should be:
By default I think
@Bind
should swallow errors, as in bloc you mainlyaddError
because you want it. but an additionalignoreError
boolean field to override that behavior can be useful (maybe ^^)