import 'package:bloc/bloc.dart';
import 'password_visibility_event.dart';
import 'password_visibility_state.dart';

class PasswordVisibilityBloc
    extends Bloc<PasswordVisibilityEvent, PasswordVisibilityState> {
  PasswordVisibilityBloc()
      : super(const PasswordVisibilityState(isPasswordVisible: false)) {
    on<TogglePasswordVisibility>((event, emit) {
      emit(
          PasswordVisibilityState(isPasswordVisible: !state.isPasswordVisible));
    });
  }
}
