marchdev-tk / flutter_google_maps

A Flutter plugin for integrating Google Maps in iOS, Android and Web applications. It is a wrapper of google_maps_flutter for Mobile and google_maps for Web.
BSD 3-Clause "New" or "Revised" License
87 stars 57 forks source link

[fix] "TypeError: this.widget.markers is not iterable" #63

Closed slovnicki closed 3 years ago

slovnicki commented 3 years ago

Added const <Marker>{} default value to GoogleMap.markers

Description

I was getting the following error:

The following JSNoSuchMethodError was thrown during a scheduler callback:
TypeError: this.widget.markers is not iterable

When the exception was thrown, this was the stack:
packages/flutter_google_maps/src/web/google_map.state.dart 638:33  <fn>
packages/flutter/src/scheduler/binding.dart 1144:15                [_invokeFrameCallback]
packages/flutter/src/scheduler/binding.dart 1090:9                 handleDrawFrame
packages/flutter/src/scheduler/binding.dart 998:5                  [_handleDrawFrame]
lib/_engine/engine/platform_dispatcher.dart 896:13                 invoke
lib/_engine/engine/platform_dispatcher.dart 145:5                  invokeOnDrawFrame
lib/_engine/engine.dart 257:45                                     <fn>

so this PR fixes it.

Related Issues

-

Tests

-

Checklist

Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]). This will ensure a smooth and quick review process.

Breaking Change

Did any tests fail when you ran them?