You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi I have been trying to find out the problem for a whole two days and I still haven't found what the problem is
When writing the property_form_bloc with initialNote the state does not update no matter what I do here's the code
}
}`
Am I missing something? When I log out the initial property in this case it logs out the initialPropertyOption but is unable to update the state. Any answer is welcome
The text was updated successfully, but these errors were encountered:
Hi I have been trying to find out the problem for a whole two days and I still haven't found what the problem is
When writing the property_form_bloc with initialNote the state does not update no matter what I do here's the code
`class PropertyFormBloc extends Bloc<PropertyFormEvent, PropertyFormState> {
final IPropertyFacade _propertyFacade;
PropertyFormBloc(this._propertyFacade) : super(PropertyFormState.initial());
@OverRide
Stream mapEventToState(
PropertyFormEvent event,
) async* {
yield* event.map(
initialized: (e) async* {
e.initialPropertyOption.fold(
() => state,
(initialProperty) => state.copyWith(
isEditing: true,
property: initialProperty
)
);
print("current state is now $state");
},
nameChanged: (e) async* {
print("name changed ${e.name}");
yield state.copyWith(
property: state.property.copyWith(name: PropertyName(e.name)),
saveFailureOrSuccessOption: none()
);
},
descriptionEvent: (e) async* {
yield state.copyWith(
property: state.property.copyWith(description: e.description),
saveFailureOrSuccessOption: none()
);
},
saved: (e) async* {
Either<ClassFailure, String> failureOrSuccess;
}
}`
Am I missing something? When I log out the initial property in this case it logs out the initialPropertyOption but is unable to update the state. Any answer is welcome
The text was updated successfully, but these errors were encountered: