Closed ditman closed 4 months ago
Also a small question: why are there isFooDefined()
methods, instead of making .foo
nullable? (For example: "isTiltDefined()" in the map object?)
Is there a difference between undefined
and null
in the JS SDK?
Thanks!
Also a small question: why are there isFooDefined() methods, instead of making .foo nullable? (For example: "isTiltDefined()" in the map object?)
Usually those properties have always values once the map is initialized (with a center and zoom level) so 99% of the time it is non-null. Having isFooDefined()
allows checking nullity in the rare cases where you access the property before the map is initialized. Once initialized you now avoid a lot of null checks. For instance, in examples, those isXxxDefined()
are almost never used.
8.0.0-dev.3 published
Having isFooDefined() allows checking nullity in the rare cases where you access the property before the map is initialized.
This sounds good to me, my only concern is that these methods seem a little bit hard to find in the API. In the flutter plugin most of the usages are in tests, or on my wacky "convert.dart" file.
Hey @a14n!
I'm looking at updating
flutter/packages
to the latest major version of package:web, and I think I need a small change ingoogle_maps
: allowing web 1.0.0.It seems the only other changes needed are to the examples, where the use of
innerHTML
has gone fromString
toJSAny
(so Trusted Types are supported), but it seems the rest is all right.I re-ran the build script(s) but nothing else seems to have changed:
I've also updated the README-dev so it doesn't fail with the VM flags error, but that may be because I'm in a Dart SDK from the future (whatever is bundled with
flutter master
).(As usual, thanks for the package!!)