@@ -118,13 +118,13 @@ class LoginScreen extends StatelessWidget {
118118 ),
119119 suffixIcon: IconButton (
120120 onPressed: () {
121- BlocProvider . of <LoginBloc >(context ).add (
122- ToggleObscureCreatePassword (
123- showPassword: ! state.showPassword,
124- showConfirmPassword:
125- state.showConfirmPassword,
126- ),
127- );
121+ context. read <LoginBloc >().add (
122+ ToggleObscureCreatePassword (
123+ showPassword: ! state.showPassword,
124+ showConfirmPassword:
125+ state.showConfirmPassword,
126+ ),
127+ );
128128 },
129129 icon: state.showPassword
130130 ? const Icon (Icons .visibility,
@@ -155,13 +155,13 @@ class LoginScreen extends StatelessWidget {
155155 ),
156156 suffixIcon: IconButton (
157157 onPressed: () {
158- BlocProvider . of <LoginBloc >(context ).add (
159- ToggleObscureCreatePassword (
160- showPassword: state.showPassword,
161- showConfirmPassword:
162- ! state.showConfirmPassword,
163- ),
164- );
158+ context. read <LoginBloc >().add (
159+ ToggleObscureCreatePassword (
160+ showPassword: state.showPassword,
161+ showConfirmPassword:
162+ ! state.showConfirmPassword,
163+ ),
164+ );
165165 },
166166 icon: state.showConfirmPassword
167167 ? const Icon (Icons .visibility,
@@ -235,9 +235,9 @@ class LoginScreen extends StatelessWidget {
235235 suffixIcon: state is EnterPassword
236236 ? IconButton (
237237 onPressed: () {
238- BlocProvider . of <LoginBloc >(context ).add (
239- ShowPasswordPressed (),
240- );
238+ context. read <LoginBloc >().add (
239+ ShowPasswordPressed (),
240+ );
241241 },
242242 icon: state.showPassword
243243 ? const Icon (Icons .visibility,
0 commit comments