Issue
anyways to convert double? to double
because i got this message with no auto fix
Solution
The error you get is from null-safety, the type double? means that it could be either a double, or null, but your parameter only accepts a double, and no null.
For this, you can "force" the use of 'non-null' variable by adding a ! at the end of your variable, but be careful when doing this.
CameraPosition(
target: LatLng(l.latitude!, l.longitude!),
zoom: 15,
)
You can learn more about null-safety syntax and principles on the official documentation: https://flutter.dev/docs/null-safety
Answered By - Amirhussein
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.