Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
## NEXT
## 2.15.3

* Fixes new analysis warnings.
* Updates minimum supported SDK version to Flutter 3.27/Dart 3.6.

## 2.15.2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@
NS_ASSUME_NONNULL_BEGIN

/// Creates a UIImage from Pigeon bitmap.
UIImage *FGMIconFromBitmap(FGMPlatformBitmap *platformBitmap,
NSObject<FlutterPluginRegistrar> *registrar, CGFloat screenScale);
UIImage *_Nullable FGMIconFromBitmap(FGMPlatformBitmap *platformBitmap,
NSObject<FlutterPluginRegistrar> *registrar,
CGFloat screenScale);
/// Returns a BOOL indicating whether image is considered scalable with the given scale factor from
/// size.
BOOL FGMIsScalableWithScaleFactorFromSize(CGSize originalSize, CGSize targetSize);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,18 +191,18 @@

UIImage *scaledImageWithWidthHeight(UIImage *image, NSNumber *width, NSNumber *height,
CGFloat screenScale) {
if (!width && !height) {
if ((width == nil) && (height == nil)) {
return image;
}

CGFloat targetWidth = width ? width.doubleValue : image.size.width;
CGFloat targetHeight = height ? height.doubleValue : image.size.height;
CGFloat targetWidth = width == nil ? image.size.width : width.doubleValue;
CGFloat targetHeight = height == nil ? image.size.height : height.doubleValue;

if (width && !height) {
if ((width != nil) && (height == nil)) {
// Calculate height based on aspect ratio if only width is provided.
double aspectRatio = image.size.height / image.size.width;
targetHeight = round(targetWidth * aspectRatio);
} else if (!width && height) {
} else if ((width == nil) && (height != nil)) {
// Calculate width based on aspect ratio if only height is provided.
double aspectRatio = image.size.width / image.size.height;
targetWidth = round(targetHeight * aspectRatio);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -436,19 +436,19 @@ - (void)interpretMapConfiguration:(FGMPlatformMapConfiguration *)config {
: nil];
}
NSNumber *compassEnabled = config.compassEnabled;
if (compassEnabled) {
if (compassEnabled != nil) {
[self setCompassEnabled:compassEnabled.boolValue];
}
NSNumber *indoorEnabled = config.indoorViewEnabled;
if (indoorEnabled) {
if (indoorEnabled != nil) {
[self setIndoorEnabled:indoorEnabled.boolValue];
}
NSNumber *trafficEnabled = config.trafficEnabled;
if (trafficEnabled) {
if (trafficEnabled != nil) {
[self setTrafficEnabled:trafficEnabled.boolValue];
}
NSNumber *buildingsEnabled = config.buildingsEnabled;
if (buildingsEnabled) {
if (buildingsEnabled != nil) {
[self setBuildingsEnabled:buildingsEnabled.boolValue];
}
FGMPlatformMapTypeBox *mapType = config.mapType;
Expand All @@ -457,8 +457,8 @@ - (void)interpretMapConfiguration:(FGMPlatformMapConfiguration *)config {
}
FGMPlatformZoomRange *zoomData = config.minMaxZoomPreference;
if (zoomData) {
float minZoom = zoomData.min ? zoomData.min.floatValue : kGMSMinZoomLevel;
float maxZoom = zoomData.max ? zoomData.max.floatValue : kGMSMaxZoomLevel;
float minZoom = zoomData.min != nil ? zoomData.min.floatValue : kGMSMinZoomLevel;
float maxZoom = zoomData.max != nil ? zoomData.max.floatValue : kGMSMaxZoomLevel;
[self setMinZoom:minZoom maxZoom:maxZoom];
}
FGMPlatformEdgeInsets *padding = config.padding;
Expand All @@ -467,31 +467,31 @@ - (void)interpretMapConfiguration:(FGMPlatformMapConfiguration *)config {
}

NSNumber *rotateGesturesEnabled = config.rotateGesturesEnabled;
if (rotateGesturesEnabled) {
if (rotateGesturesEnabled != nil) {
[self setRotateGesturesEnabled:rotateGesturesEnabled.boolValue];
}
NSNumber *scrollGesturesEnabled = config.scrollGesturesEnabled;
if (scrollGesturesEnabled) {
if (scrollGesturesEnabled != nil) {
[self setScrollGesturesEnabled:scrollGesturesEnabled.boolValue];
}
NSNumber *tiltGesturesEnabled = config.tiltGesturesEnabled;
if (tiltGesturesEnabled) {
if (tiltGesturesEnabled != nil) {
[self setTiltGesturesEnabled:tiltGesturesEnabled.boolValue];
}
NSNumber *trackCameraPosition = config.trackCameraPosition;
if (trackCameraPosition) {
if (trackCameraPosition != nil) {
[self setTrackCameraPosition:trackCameraPosition.boolValue];
}
NSNumber *zoomGesturesEnabled = config.zoomGesturesEnabled;
if (zoomGesturesEnabled) {
if (zoomGesturesEnabled != nil) {
[self setZoomGesturesEnabled:zoomGesturesEnabled.boolValue];
}
NSNumber *myLocationEnabled = config.myLocationEnabled;
if (myLocationEnabled) {
if (myLocationEnabled != nil) {
[self setMyLocationEnabled:myLocationEnabled.boolValue];
}
NSNumber *myLocationButtonEnabled = config.myLocationButtonEnabled;
if (myLocationButtonEnabled) {
if (myLocationButtonEnabled != nil) {
[self setMyLocationButtonEnabled:myLocationButtonEnabled.boolValue];
}
NSString *style = config.style;
Expand Down Expand Up @@ -665,7 +665,8 @@ - (void)animateCameraWithUpdate:(nonnull FGMPlatformCameraUpdate *)cameraUpdate
details:nil];
return;
}
FGMCATransactionWrapper *transaction = durationMilliseconds ? self.transactionWrapper : nil;
FGMCATransactionWrapper *transaction =
durationMilliseconds != nil ? self.transactionWrapper : nil;
[transaction begin];
[transaction setAnimationDuration:[durationMilliseconds doubleValue] / 1000];
[self.controller.mapView animateWithCameraUpdate:update];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: google_maps_flutter_ios
description: iOS implementation of the google_maps_flutter plugin.
repository: https://github.com/flutter/packages/tree/main/packages/google_maps_flutter/google_maps_flutter_ios
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+maps%22
version: 2.15.2
version: 2.15.3

environment:
sdk: ^3.6.0
Expand Down