New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MVCArray bindings are broken #65
Comments
Thanks for filing an issue. google_maps-3.3.3 fixes it. |
Thanks, Alexandre. I think there's something missing with the codecs business. remove_at and set_at take two arguments (index and previous element) and return a IndexAndElement. _codec32 only does ([dynamic]) → dynamic but not the two-argument version. Something like the snippet below works but this looks like auto-generated code so this should probably fixed elsewhere. class _Undefined { const _undefined = _Undefined(); final __codecOneOrTwoArgFunction = |
When MVCArray<LatLng>(elements: latlngList, codec: JsInterfaceCodec((o) => LatLng.created(o))); |
As dietmarebner commented above subscribing to onRemoveAT and onSetAt are still broken. You can replicate this by attempting to run the tests for MVCArray:
A potential culprit is that the handler in _Event.addListener only takes a single optional argument. It's very difficult to trace this with the code generation.
|
@drewwarren Thanks for your feedback. The issue should be addressed by 0cbd411 publish in version 3.4.1 |
Bindings for MVCArray expose three streams, i.e., onInsertAt, onRemoveAT, and onSetAt.
The first one is correct but the other two wrap the click event rather than 'remove_at' and 'set_at' respectively. This is in dart-google-maps/lib/src/google_maps_src.g.dart:2889.
There's a test for this in dart-google-maps/test/gmaps_test.dart but that doesn't actually fail if the event handlers don't get executed.
The text was updated successfully, but these errors were encountered: