How to save GeoPoint in Firebase Cloud Firestore?

后端 未结 4 471
小蘑菇
小蘑菇 2020-12-24 13:01

in the database UI I can create a field with the type geopoint. After providing values, it looks something like this:

location: [1° N, 1° E]
         


        
4条回答
  •  無奈伤痛
    2020-12-24 13:34

    Simply use:

    import 'package:cloud_firestore/cloud_firestore.dart';
    {
      location:GeoPoint(latitude, longitude)
    }
    

提交回复
热议问题