Skip to content

Commit 5ba990b

Browse files
authored
[google_maps_flutter] deprecate old BitmapDescriptor methods (flutter#6905)
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: flutter/packages#4055 Related to issue: flutter#34657
1 parent cd73061 commit 5ba990b

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

packages/google_maps_flutter/google_maps_flutter_platform_interface/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## 2.8.0
2+
3+
* Deprecates `BitmapDescriptor.fromAssetImage` in favor of `BitmapDescriptor.asset` and `AssetMapBitmap.create`.
4+
* Deprecates `BitmapDescriptor.fromBytes` in favor of `BitmapDescriptor.bytes` and `BytesMapBitmap`
5+
16
## 2.7.1
27

38
* Undeprecates `BitmapDescriptor.fromAssetImage`.

packages/google_maps_flutter/google_maps_flutter_platform_interface/lib/src/types/bitmap.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,7 @@ class BitmapDescriptor {
179179
/// and scales the images to the right resolution depending on the dpi.
180180
/// Set `mipmaps` to false to load the exact dpi version of the image,
181181
/// `mipmap` is true by default.
182+
@Deprecated('Use BitmapDescriptor.asset method instead.')
182183
static Future<BitmapDescriptor> fromAssetImage(
183184
ImageConfiguration configuration,
184185
String assetName, {
@@ -217,6 +218,7 @@ class BitmapDescriptor {
217218
/// bitmap, regardless of the actual resolution of the encoded PNG.
218219
/// This helps the browser to render High-DPI images at the correct size.
219220
/// `size` is not required (and ignored, if passed) in other platforms.
221+
@Deprecated('Use BitmapDescriptor.bytes method instead.')
220222
static BitmapDescriptor fromBytes(Uint8List byteData, {Size? size}) {
221223
assert(byteData.isNotEmpty,
222224
'Cannot create BitmapDescriptor with empty byteData');

packages/google_maps_flutter/google_maps_flutter_platform_interface/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ repository: https://github.com/flutter/packages/tree/main/packages/google_maps_f
44
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+maps%22
55
# NOTE: We strongly prefer non-breaking changes, even at the expense of a
66
# less-clean API. See https://flutter.dev/go/platform-interface-breaking-changes
7-
version: 2.7.1
7+
version: 2.8.0
88

99
environment:
1010
sdk: ^3.2.0

0 commit comments

Comments
 (0)