Pana-g / flutter_earth_globe

MIT License
21 stars 6 forks source link

issue with buildSphere in android. #3

Closed KarthikeyanPegasus closed 6 months ago

KarthikeyanPegasus commented 7 months ago
timer = Timer.periodic(const Duration(milliseconds: 10), (Timer p) {
      earthController.setZoom(earthController.zoom + 0.1);

      if (earthController.zoom >= 3) {
        p.cancel();
      }
    });

when i tried this, i am getting

Screenshot_1714384072

Exception has occurred.
IndexError (RangeError (index): Index out of range: index should be less than 306936: 307227)

From This Function:

Future<SphereImage?> buildSphere(double maxWidth, double maxHeight) async {
...
...
  spherePixels[(sphereY + x - minX).toInt()] = color;
}
Pana-g commented 7 months ago

@KarthikeyanPegasus Hmm that's a strange behavior indeed. I'll have a look at it asap.

Pana-g commented 6 months ago

@KarthikeyanPegasus Can you provide the full example you are using?

Pana-g commented 6 months ago

@KarthikeyanPegasus This issue has been resolved in the latest version 1.0.4.