gskinnerTeam / flutter-wonderous-app

A showcase app for the Flutter SDK. Wonderous will educate and entertain as you uncover information about some of the most famous structures in the world.
MIT License
4.03k stars 948 forks source link

Google Maps plugin throwing errors #110

Closed esDotDev closed 1 year ago

esDotDev commented 1 year ago

Seeing this error when publishing on Web:

The following JSNoSuchMethodError was thrown building GoogleMap(dirty, dependencies:
[Directionality], state: _GoogleMapState#f97b9):
TypeError: Cannot read properties of undefined (reading 'maps')

The relevant error-causing widget was:
  GoogleMap
  GoogleMap:file:///C:/_dev/gskinner/flutter_wonders_app/lib/ui/screens/editorial/widgets/_scrolling_content.dart:249:32

Causes the maps to not render: image

ditman commented 1 year ago

The Google Maps JS SDK must be loaded manually in the web/index.html of the app for maps to work (also, an API key for web is probably needed).

Read more:

esDotDev commented 1 year ago

Thanks! Should've read the docs I guess :p

ditman commented 1 year ago

Jeez, didn't mean to sound like an asshole, I got a link to the "web" list of errors and was trying to unblock what I could ASAP, my apologies for the tone 😅