Skip to content

Method 'toGeoPoint' cannot be called on 'LatLng?' because it is potentially null #88

@gtorodelvalle

Description

@gtorodelvalle

Expected behavior (required)

I am using a LatLng field in a collection of mine. It may be used such any other data type.

Current behavior (required)

I am using a LatLng field in a collection of mine but I am getting the following error (no need to say that I make sure that the LatLng data is always filled in the database):

Error: Method 'toGeoPoint' cannot be called on 'LatLng?' because it is potentially null.

  • 'LatLng' is from 'package:mialando/flutter_flow/lat_lng.dart' ('lib/flutter_flow/lat_lng.dart').
    currentUserDocument!.localLatitudeLongitude.toGeoPoint())

To Reproduce (required)

  1. Include a LatLng field in a collection. For example, in the users collection.
  2. Try to filter a backend query using the logged user LatLng field created in 1.

Your environment

  • Version of FlutterFlow used: 3.0 (October 28th, 2022)
  • Platform (e.g. Web, MacOS Desktop): Web
  • Browser name and version: Google Chrome (latest)
  • Operating system and version (desktop or mobile): Mac Ventura

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions