Pana-g / flutter_earth_globe

MIT License
5 stars 2 forks source link

issue with buildSphere in android. #3

Open KarthikeyanPegasus opened 2 weeks ago

KarthikeyanPegasus commented 2 weeks 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 2 weeks ago

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