File tree Expand file tree Collapse file tree 2 files changed +15
-17
lines changed
platform_maps_flutter_apple/lib/src
platform_maps_flutter_google_android/lib/src Expand file tree Collapse file tree 2 files changed +15
-17
lines changed Original file line number Diff line number Diff line change @@ -205,13 +205,13 @@ class _PlatformMapState extends State<_PlatformMap> {
205205 }
206206
207207 apple_maps.MapType _getMapType () {
208- if (widget.mapType == MapType .normal ) {
209- return apple_maps. MapType .standard;
210- } else if (widget.mapType == MapType .satellite) {
211- return apple_maps. MapType .satellite;
212- } else if (widget.mapType == MapType .hybrid) {
213- return apple_maps. MapType .hybrid;
214- }
215- return apple_maps. MapType .standard;
208+ switch (widget.mapType) {
209+ case MapType .normal :
210+ return apple_maps. MapType .standard;
211+ case MapType .satellite:
212+ return apple_maps. MapType .satellite;
213+ case MapType .hybrid:
214+ return apple_maps. MapType .hybrid;
215+ }
216216 }
217217}
Original file line number Diff line number Diff line change @@ -209,14 +209,12 @@ class _PlatformMapState extends State<_PlatformMap> {
209209 widget.onLongPress? .call (position.platformLatLng);
210210 }
211211
212- google_maps.MapType _getGoogleMapType () {
213- if (widget.mapType == MapType .normal) {
214- return google_maps.MapType .normal;
215- } else if (widget.mapType == MapType .satellite) {
216- return google_maps.MapType .satellite;
217- } else if (widget.mapType == MapType .hybrid) {
218- return google_maps.MapType .hybrid;
219- }
220- return google_maps.MapType .normal;
212+ switch (widget.mapType) {
213+ case MapType .normal:
214+ return google_maps.MapType .normal;
215+ case MapType .satellite:
216+ return google_maps.MapType .satellite;
217+ case MapType .hybrid:
218+ return google_maps.MapType .hybrid;
221219 }
222220}
You can’t perform that action at this time.
0 commit comments