ArgumentError when calling _tileStore.setMapboxAPIUrl with Uri
Description:
I encountered an issue when calling _tileStore.setMapboxAPIUrl(Uri.parse('https://api.mapbox.com/'));. This results in the following exception:
ArgumentError (Invalid argument: Instance of '_SimpleUri')
Steps to Reproduce:
- Call
_tileStore.setMapboxAPIUrl(Uri.parse('https://api.mapbox.com')); - Observe the exception being thrown.
Expected Behavior:
The function should accept the parsed URI and not throw an ArgumentError.
Actual Behavior:
The function throws ArgumentError (Invalid argument: Instance of '_SimpleUri').
Possible Cause:
It seems like _tileStore.setMapboxAPIUrl might be expecting a String instead of a Uri object, as described in its documentation: "Accepts a string, or null for resetting to the default value." If this is the case, the method should ensure proper type handling.
Environment:
- Package Version: 2.5.1
- Platform: Android and iOS
Additional Context:
Any insights into whether this is an expected behavior or a bug would be appreciated. If _tileStore.setMapboxAPIUrl is meant to accept a Uri, it might need an update to handle this exception properly.
Thanks!