Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

[google_maps_flutter_platform_interface] Add dispose method. #2908

Merged
merged 1 commit into from
Aug 10, 2020
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,3 +1,7 @@
## 1.0.4

* Add a `dispose` method to the interface, so implementations may cleanup resources acquired on `init`.

## 1.0.3

* Pass icon width/height if present on `fromAssetImage` BitmapDescriptors (web only)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@ class MethodChannelGoogleMapsFlutter extends GoogleMapsFlutterPlatform {
return channel.invokeMethod<void>('map#waitForMap');
}

/// Dispose of the native resources.
@override
void dispose({int mapId}) {
// Noop!
}

// The controller we need to broadcast the different events coming
// from handleMethodCall.
//
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,11 @@ abstract class GoogleMapsFlutterPlatform extends PlatformInterface {
throw UnimplementedError('onLongPress() has not been implemented.');
}

/// Dispose of whatever resources the `mapId` is holding on to.
void dispose({@required int mapId}) {
throw UnimplementedError('dispose() has not been implemented.');
}

/// Returns a widget displaying the map view
Widget buildView(
Map<String, dynamic> creationParams,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: A common platform interface for the google_maps_flutter plugin.
homepage: https://github.com/flutter/plugins/tree/master/packages/google_maps_flutter/google_maps_flutter_platform_interface
# 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: 1.0.3
version: 1.0.4

dependencies:
flutter:
Expand Down