Skip to content

Commit

Permalink
Fix/pri vyhledani lekare uvedena spatna specializace #365 (#410)
Browse files Browse the repository at this point in the history
* fix/pri_vyhledani_lekare_uvedena_spatna_specializace (#365)
opraveno po kliknutí na "Nemám lékaře" při objednávání se na prohlídku se otevře mapa s lékaři se specializací na prohlídku.
(Loono-cz/loono-tasks#79)

* fix/pri_vyhledani_lekare_uvedena_spatna_specializace (#365)
opraveno po kliknutí na "Nemám lékaře" při objednávání se na prohlídku se otevře mapa s lékaři se specializací na prohlídku.
(Loono-cz/loono-tasks#79)

* Fix tests

* Fix tests

* fix format.

Co-authored-by: Petr Noga <[email protected]>
  • Loading branch information
Brambora0 and KeiShadow authored Oct 10, 2022
1 parent 05c7697 commit f7e05fa
Showing 1 changed file with 21 additions and 9 deletions.
30 changes: 21 additions & 9 deletions lib/ui/screens/find_doctor/find_doctor.dart
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,12 @@ class FindDoctorScreenState extends State<FindDoctorScreen> {
} else {
_canFirstSelectedSpecializationSet = true;
}
final currDoctorDetail =
context.select<MapStateService, SimpleHealthcareProvider?>((value) => value.doctorDetail);
final currSpec =
context.select<MapStateService, SearchResult?>((value) => value.currSpecialization);
final currDoctorDetail = context.select<MapStateService, SimpleHealthcareProvider?>(
(value) => value.doctorDetail,
);
final currSpec = context.select<MapStateService, SearchResult?>(
(value) => value.currSpecialization,
);

return Scaffold(
appBar: widget.onCancelTap != null
Expand Down Expand Up @@ -168,7 +170,9 @@ class FindDoctorScreenState extends State<FindDoctorScreen> {
_setMapOpacity(1);
},
),
SpecializationChipsList(showDefaultSpecs: currSpec == null),
SpecializationChipsList(
showDefaultSpecs: currSpec == null,
),
],
),
),
Expand All @@ -181,7 +185,10 @@ class FindDoctorScreenState extends State<FindDoctorScreen> {
await animateToPos(
mapController,
cameraPosition: CameraPosition(
target: LatLng(healthcareProvider.lat, healthcareProvider.lng),
target: LatLng(
healthcareProvider.lat,
healthcareProvider.lng,
),
zoom: MapVariables.DOCTOR_DETAIL_ZOOM,
),
);
Expand All @@ -198,7 +205,10 @@ class FindDoctorScreenState extends State<FindDoctorScreen> {
const Align(
alignment: Alignment.bottomLeft,
child: Padding(
padding: EdgeInsets.only(left: 9, bottom: bottomGoogleLogoPadding),
padding: EdgeInsets.only(
left: 9,
bottom: bottomGoogleLogoPadding,
),
child: FeedbackButton(),
),
),
Expand Down Expand Up @@ -232,8 +242,10 @@ class FindDoctorScreenState extends State<FindDoctorScreen> {
child: DoctorDetailSheet(
key: const Key('findDoctorPage_doctorDetailSheet'),
doctor: currDoctorDetail,
closeDetail: () =>
_mapState.setDoctorDetail(null, unblockOnMoveMapFiltering: false),
closeDetail: () => _mapState.setDoctorDetail(
null,
unblockOnMoveMapFiltering: false,
),
),
),
),
Expand Down

0 comments on commit f7e05fa

Please sign in to comment.