@@ -9,6 +9,7 @@ import 'package:node_auth/utils/result.dart';
99import 'package:node_auth/utils/streams.dart' ;
1010import 'package:node_auth/utils/type_defs.dart' ;
1111import 'package:rxdart/rxdart.dart' ;
12+ import 'package:rxdart_ext/rxdart_ext.dart' ;
1213import 'package:tuple/tuple.dart' ;
1314
1415bool _isValidPassword (String password) {
@@ -66,6 +67,7 @@ class ChangePasswordBloc extends DisposeCallbackBaseBloc {
6667
6768 final changePasswordState$ = submitChangePasswordS.stream
6869 .withLatestFrom (isValidSubmit$, (_, bool isValid) => isValid)
70+ .debug ()
6971 .where ((isValid) => isValid)
7072 .withLatestFrom (both$, (_, Tuple2 <String , String > both) => both)
7173 .exhaustMap ((both) => _performChangePassword (changePassword, both))
@@ -116,7 +118,11 @@ class ChangePasswordBloc extends DisposeCallbackBaseBloc {
116118 }.debug ();
117119
118120 return ChangePasswordBloc ._(
119- dispose: DisposeBag ([...subscriptions, ...controllers]).dispose,
121+ dispose: DisposeBag ([
122+ ...subscriptions,
123+ ...controllers,
124+ changePasswordState$.connect (),
125+ ]).dispose,
120126 changePassword: () => submitChangePasswordS.add (null ),
121127 changePasswordState$: changePasswordState$,
122128 passwordChanged: passwordS.add,
@@ -132,7 +138,7 @@ class ChangePasswordBloc extends DisposeCallbackBaseBloc {
132138 ) {
133139 print ('[DEBUG] change password both=$both ' );
134140
135- ChangePasswordState resultToState (Result < void > result) {
141+ ChangePasswordState resultToState (Result_Unit result) {
136142 print ('[DEBUG] change password result=$result ' );
137143
138144 return result.fold (
0 commit comments