The following error may be experienced when using our toolkit on Flutter 3.38.x:
Error:
Type argument is not within its bounds: should be subtype of 'Any'
What is happenning is that our toolkit depends on webview_flutter and its Android implementation (webview_flutter_android). Newest version of webview_flutter_android (4.10.5) generates Kotlin code that is incompatible with older Kotlin compiler versions.
How to fix this issue
You have two options:
Option 1: Upgrade Kotlin
Update your Android project to use Kotlin 2.2.0 or newer.
This Kotlin version is compatible with webview_flutter_android 4.10.5 and above.
Option 2: Pin the compatible WebView version
Add the following override to your pubspec.yaml:
dependency_overrides:
webview_flutter_android: 4.10.5 # or newer
Note: This issue occurs due to a recent point release update to webview_flutter_android and can also affect projects using Flutter 3.35.
Learn more about the Flutter Maps SDK compatibility workarounds for 200.8.0: https://community.esri.com/t5/arcgis-maps-sdks-native-blog/flutter-maps-sdk-compatibility-notes-for-200-8-0/ba-p/1669465