-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Closed
flutter/plugins
#3754Labels
a: null-safetySupport for Dart's null safety featureSupport for Dart's null safety featurefound in release: 2.0Found to occur in 2.0Found to occur in 2.0has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onp: mapsGoogle Maps pluginGoogle Maps pluginpackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.r: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer version
Description
Steps to Reproduce
This error occurs in google_maps_flutter: 2.0.1 package
- Install flutter 2.0.3
- Download official google flutter maps example from repo
- Add
print('Zoom: ${mapController?.getZoomLevel()}');somewhere in code e.g. move_camera.dart line 131TextButton( onPressed: () { print('Zoom: ${mapController?.getZoomLevel()}'); mapController?.moveCamera( CameraUpdate.zoomBy(-0.5), ); }, child: const Text('zoomBy'), ),
- Run example application in android emulator
- Open
Camera Controlexample and presszoomBybutton - Error occurs
type 'Future<double?>' is not a subtype of type 'Future<double>' in type cast
Logs
======== Exception caught by gesture ===============================================================
The following _CastError was thrown while handling a gesture:
type 'Future<double?>' is not a subtype of type 'Future<double>' in type cast
When the exception was thrown, this was the stack:
#0 MethodChannelGoogleMapsFlutter.getZoomLevel (package:google_maps_flutter_platform_interface/src/method_channel/method_channel_google_maps_flutter.dart:428:9)
#1 GoogleMapController.getZoomLevel (package:google_maps_flutter/src/controller.dart:281:47)
#2 MoveCameraState.build.<anonymous closure> (package:google_maps_flutter_example/move_camera.dart:131:51)
#3 _InkResponseState._handleTap (package:flutter/src/material/ink_well.dart:991:20)
#4 GestureRecognizer.invokeCallback (package:flutter/src/gestures/recognizer.dart:182:24)
...
Handler: "onTap"
Recognizer: TapGestureRecognizer#31387
debugOwner: GestureDetector
state: possible
won arena
finalPosition: Offset(301.4, 498.9)
finalLocalPosition: Offset(48.1, 19.9)
button: 1
sent tap down
====================================================================================================
[✓] Flutter (Channel stable, 2.0.3, on Linux, locale sk_SK.UTF-8)
• Flutter version 2.0.3 at /data/home/hlavki/Programs/flutter
• Framework revision 4d7946a68d (4 days ago), 2021-03-18 17:24:33 -0700
• Engine revision 3459eb2436
• Dart version 2.12.2
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
• Android SDK at /data/home/hlavki/Programs/Android/Sdk/
• Platform android-30, build-tools 30.0.2
• ANDROID_SDK_ROOT = /data/home/hlavki/Programs/Android/Sdk/
• Java binary at: /usr/lib64/jvm/java/bin/java
• Java version OpenJDK Runtime Environment (build 15.0.2+7-suse-1.3-x8664)
• All Android licenses accepted.
[✓] Chrome - develop for the web
• Chrome at google-chrome
[!] Android Studio (not installed)
• Android Studio not found; download from https://developer.android.com/studio/index.html
(or visit https://flutter.dev/docs/get-started/install/linux#android-setup for detailed instructions).
[✓] VS Code (version 1.54.3)
• VS Code at /usr/share/code
• Flutter extension version 3.20.0
[✓] Connected device (2 available)
• Android SDK built for x86 (mobile) • emulator-5554 • android-x86 • Android 10 (API 29) (emulator)
• Chrome (web) • chrome • web-javascript • Google Chrome 89.0.4389.90
! Doctor found issues in 1 category.
PaoloP98
Metadata
Metadata
Assignees
Labels
a: null-safetySupport for Dart's null safety featureSupport for Dart's null safety featurefound in release: 2.0Found to occur in 2.0Found to occur in 2.0has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onp: mapsGoogle Maps pluginGoogle Maps pluginpackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.r: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer version