Fixes to JS-interop code.#6
Conversation
srujzs
left a comment
There was a problem hiding this comment.
It's unfortunate how many indirections you need to do because you can't put package:js types on the external boundary. :(
| /// The [MarkerClustererOptions] object used to initialize [MarkerClusterer]. | ||
| /// | ||
| /// See: https://googlemaps.github.io/js-markerclusterer/interfaces/MarkerClustererOptions.html | ||
| @JS() |
There was a problem hiding this comment.
nit: The @JS is optional unless you're doing renaming, but up to you if you want to keep it for signalling that it's an interop type. The @anonymous doesn't do anything, however, and will be a warning once dart-lang/sdk#55581 is resolved.
| // Use of this source code is governed by a BSD-style license that can be | ||
| // found in the LICENSE file. | ||
|
|
||
| // TODO(srujzs): Needed for https://github.com/dart-lang/sdk/issues/54801. Once |
There was a problem hiding this comment.
FYI - if you update the SDK constraints to 3.3.1, this isn't needed.
There was a problem hiding this comment.
Seems like any of the packages do not yet use constraints bigger than ^3.3.0.
I'm not sure if the update needs to be applied to all plugins / ci or if updating just this one package would be ok.
I'll ask about this on the main PR.
There was a problem hiding this comment.
We can upgrade for this package only, since dependencies are not pinned, and 3.3.1 is picked up by ^3.3.1 anyways!
packages/google_maps_flutter/google_maps_flutter_web/lib/src/marker_clustering_js_interop.dart
Show resolved
Hide resolved
|
This looks great... merging and finalizing the update to js_interlop in the target branch. |
ef29656
into
CodemateLtd:feature/google_maps_flutter_web_marker_clustering_js_interop
Basically the changes were:
externaldefinitions..toJSas required.Some other minor tweaks.
(Verified by running the demo app in my desktop, but please, do test on your end as well!)
((/cc @srujzs))