Skip to content

Commit

Permalink
[google_maps_flutter] deprecate old BitmapDescriptor methods (#6905)
Browse files Browse the repository at this point in the history
Deprecates `BitmapDescriptor.fromAssetImage` in favor of `BitmapDescriptor.asset` and `AssetMapBitmap.create`.
Deprecates `BitmapDescriptor.fromBytes` in favor of `BitmapDescriptor.bytes` and `BytesMapBitmap`

This is part of the implementation of the following federated plugin PR: #4055

Related to issue: flutter/flutter#34657
  • Loading branch information
jokerttu authored Jun 20, 2024
1 parent cd73061 commit 5ba990b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 2.8.0

* Deprecates `BitmapDescriptor.fromAssetImage` in favor of `BitmapDescriptor.asset` and `AssetMapBitmap.create`.
* Deprecates `BitmapDescriptor.fromBytes` in favor of `BitmapDescriptor.bytes` and `BytesMapBitmap`

## 2.7.1

* Undeprecates `BitmapDescriptor.fromAssetImage`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ 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('Use BitmapDescriptor.asset method instead.')
static Future<BitmapDescriptor> fromAssetImage(
ImageConfiguration configuration,
String assetName, {
Expand Down Expand Up @@ -217,6 +218,7 @@ 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('Use BitmapDescriptor.bytes method 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.1
version: 2.8.0

environment:
sdk: ^3.2.0
Expand Down

0 comments on commit 5ba990b

Please sign in to comment.