Skip to content

Commit

Permalink
fix: fix close method in method_channel_web.dart
Browse files Browse the repository at this point in the history
  • Loading branch information
liodali committed Sep 28, 2021
1 parent e0e777d commit 82a3c8e
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 9 deletions.
3 changes: 3 additions & 0 deletions flutter_osm_plugin.iml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
<excludeFolder url="file://$MODULE_DIR$/flutter_osm_interface/.pub" />
<excludeFolder url="file://$MODULE_DIR$/flutter_osm_interface/build" />
<excludeFolder url="file://$MODULE_DIR$/flutter_osm_interface/.dart_tool" />
<excludeFolder url="file://$MODULE_DIR$/flutter_osm_web/build" />
<excludeFolder url="file://$MODULE_DIR$/flutter_osm_web/.pub" />
<excludeFolder url="file://$MODULE_DIR$/flutter_osm_web/.dart_tool" />
</content>
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="Dart SDK" level="project" />
Expand Down
9 changes: 5 additions & 4 deletions flutter_osm_web/lib/src/channel/method_channel_web.dart
Original file line number Diff line number Diff line change
Expand Up @@ -76,16 +76,17 @@ class FlutterOsmPluginWeb extends OsmWebPlatform {
);
handleMethodCall(idOSM);
}
return Future.microtask(() => close());
return Future.microtask(() => close(idOSM));
}


@override
void close() {
void close(int idOSM) {
// mapsController.values.forEach(
// (WebTestController mapsController) => mapsController.dispose());
//_streamController.close();
mapsController.clear();
_channels.clear();
mapsController.remove(idOSM);
_channels.remove(idOSM);
}

/// Handles method calls over the MethodChannel of this plugin.
Expand Down
17 changes: 12 additions & 5 deletions flutter_osm_web/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ packages:
name: async
url: "https://pub.dartlang.org"
source: hosted
version: "2.6.1"
version: "2.8.1"
boolean_selector:
dependency: transitive
description:
Expand All @@ -28,7 +28,7 @@ packages:
name: charcode
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.0"
version: "1.3.1"
clock:
dependency: transitive
description:
Expand All @@ -43,6 +43,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.15.0"
dio:
dependency: transitive
description:
name: dio
url: "https://pub.dartlang.org"
source: hosted
version: "4.0.0"
fake_async:
dependency: transitive
description:
Expand All @@ -61,7 +68,7 @@ packages:
path: "../flutter_osm_interface"
relative: true
source: path
version: "1.0.0"
version: "0.1.3"
flutter_test:
dependency: "direct dev"
description: flutter
Expand Down Expand Up @@ -127,7 +134,7 @@ packages:
name: meta
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.0"
version: "1.7.0"
path:
dependency: transitive
description:
Expand Down Expand Up @@ -195,7 +202,7 @@ packages:
name: test_api
url: "https://pub.dartlang.org"
source: hosted
version: "0.3.0"
version: "0.4.2"
typed_data:
dependency: transitive
description:
Expand Down

0 comments on commit 82a3c8e

Please sign in to comment.