ГК
Size: a a a
ГК
A
ГК
ГК
A
EE
Д
v
A
A
A
AG
MapRequest, используемый в качестве стейта в блоке, в нем обычный copyWith: MapRequest copyWith({
LatLng from,
LatLng to,
int peopleCount,
Marker fromMarker,
Marker toMarker,
}) {
return MapRequest(
from: from ?? this.from,
to: to ?? this.to,
peopleCount: peopleCount ?? this.peopleCount,
fromMarker: fromMarker ?? this.fromMarker,
toMarker: toMarker ?? this.toMarker,
);
}verrideИ почему то новый стейт возвращается со старыми from
Stream<MapRequest> mapEventToState(MapRequestBlocEvent event) async* {
if (event is MapRequestBlocUpdateFromEvent) {
yield state.copyWith(
from: event.point,
fromMarker: state.fromMarker.copyWith(visibleParam: event.point != null, positionParam: event.point),
);
} else if(event is MapRequestBlocUpdateToEvent) {
yield state.copyWith(
to: event.point,
toMarker: state.toMarker.copyWith(visibleParam: event.point != null, positionParam: event.point),
);
}
}
Marker и toMarker.
Мб кто то знает почему такое может быть?АК
АК
АК
MapRequest отнаследовать от iquatableDS