'flutter mapbox gl doesn't stop scrolling on iOS simulator when mouse button is released

I am working on a cross platform app using mapbox gl with flutter. It has been built for Android and works as expected there, and I am trying to get it working on iOS. When I click and drag on the map in the iOS simulator it keeps moving after I release the mouse button. It often speeds up and moves much further than I intended to move, sometimes ending up in the ocean or on the other side of the country.

EDIT: 2022-04-20 I have created a new mapbox widget, separated from the rest of the apps functionality and the issue was still happening. I have also created a new app using the following code in main.dart, and the camera still continues moving after I release the mouse button.

Sometimes it doesn't move far, or doesn't move at all after releasing the mouse button, but it often moves several kilometers away from where the camera was when I let go of the mouse, so I cannot consistently move the camera to the locations that I intended to look at.

Has anyone else experienced this issue?

EDIT 2: I have heard that the Android simulator had the same problem, but it works as expected on a real device. My company has ordered an iPad which should arrive this week, but it would be convenient if I could get it working correctly in the simulator.

Has anyone managed to fix this issue in the simulator?

    import 'package:flutter/material.dart';
    import 'package:mapbox_gl/mapbox_gl.dart';
    
    class TestMapPage extends StatelessWidget {
      const TestMapPage({ Key? key }) : super(key: key);
    
      @override
      Widget build(BuildContext context) {
        return MaterialApp(
          home: Scaffold(
            body: MapboxMap(
              initialCameraPosition: CameraPosition(
                target: **INSERT LatLng Coordinates**,
                zoom: 12
              ),
              accessToken: **INSERT MAPBOX ACCESS TOKEN**,
              styleString: MapboxStyles.MAPBOX_STREETS,
            ),
          ),
        );
      }
    }


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source