Skip to content

Commit

Permalink
[google_maps_flutter] Undeprecate BitmapDescriptor methods (#6832)
Browse files Browse the repository at this point in the history
Undeprecate BitmapDescriptor.fromAssetImage and BitmapDescriptor.fromBytes

* Undeprecates `BitmapDescriptor.fromAssetImage`.
* Undeprecates `BitmapDescriptor.fromBytes`.
* Fixes issues with deprecation in version 2.7.0.

The new formats won't be supported until #6826 lands.
Deprecation notices can be re-added after the implementation PRs have landed.

Fixes: flutter/flutter#149183
  • Loading branch information
jokerttu authored May 29, 2024
1 parent 47d5eb2 commit 28e8afd
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 2.7.1

* Undeprecates `BitmapDescriptor.fromAssetImage`.
* Undeprecates `BitmapDescriptor.fromBytes`.
* Fixes issues with deprecation in version 2.7.0.

## 2.7.0

* Adds better support for marker size and scaling behaviour with `AssetMapBitmap` and `BytesMapBitmap`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,6 @@ class BitmapDescriptor {
/// and scales the images to the right resolution depending on the dpi.
/// Set `mipmaps` to false to load the exact dpi version of the image,
/// `mipmap` is true by default.
@Deprecated(
'Switch to using `asset` method, AssetMapBitmap or AssetMapBitmap.create instead')
static Future<BitmapDescriptor> fromAssetImage(
ImageConfiguration configuration,
String assetName, {
Expand Down Expand Up @@ -219,7 +217,6 @@ class BitmapDescriptor {
/// bitmap, regardless of the actual resolution of the encoded PNG.
/// This helps the browser to render High-DPI images at the correct size.
/// `size` is not required (and ignored, if passed) in other platforms.
@Deprecated('Switch to using `bytes` method or BytesMapBitmap instead')
static BitmapDescriptor fromBytes(Uint8List byteData, {Size? size}) {
assert(byteData.isNotEmpty,
'Cannot create BitmapDescriptor with empty byteData');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ repository: https://github.com/flutter/packages/tree/main/packages/google_maps_f
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+maps%22
# NOTE: We strongly prefer non-breaking changes, even at the expense of a
# less-clean API. See https://flutter.dev/go/platform-interface-breaking-changes
version: 2.7.0
version: 2.7.1

environment:
sdk: ^3.2.0
Expand Down

0 comments on commit 28e8afd

Please sign in to comment.