Closed pauldemarco closed 6 years ago
I don't think we have a defined type for this yet, but we could create one.
Is this a request for the Dart team? Should we move it over to the Dart SDK?
cc @kasperl
This would just be a trivial type (class with two final doubles) in the plugin.
Ah, I see. Thanks. Would we accept a PR for it?
Looks like this issue will cause the app to crash with the following exception:
Unsupported value: <FIRGeoPoint: (59.583559, 11.167059)> of type FIRGeoPoint
*** Assertion failure in -[FlutterStandardWriter writeValue:], ../../flutter/shell/platform/darwin/ios/framework/Source/FlutterStandardCodec.mm:321
Lost connection to device.
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Unsupported value for standard codec'
*** First throw call stack:
(
0 CoreFoundation 0x000000010d885b0b __exceptionPreprocess + 171
1 libobjc.A.dylib 0x000000010d2ea141 objc_exception_throw + 48
2 CoreFoundation 0x000000010d889cf2 +[NSException raise:format:arguments:] + 98
(just some added context in case anyone is Googling for a solution to the above error)
Any update on this? I'm running into the same issue
Any update ? , i need to create this kind o document:
.setData({'value': 12, 'location': new GeoPoint(longitude: 3.4, latitude: 4.5) });
The fork mentioned in this PR https://github.com/flutter/plugins/pull/343 works for me for now :) seems close to merging
Can be closed, via flutter/plugins#429
@pauldemarco
This issue has been moved to https://github.com/FirebaseExtended/flutterfire/issues/956. Any further collaboration will be done there.
hi can anyone tell me how can i retrieve geopoint from firebase. i am getting an error "type Geopoint is not a subtype of type String".In phone
code to add: IconButton( icon: Icon(Icons.search, color: Colors.black), onPressed: (){ Firestore.instance.collection('Location').add({ 'location': new GeoPoint(position.latitude,position.longitude), });
},),
code to retrieve:
class _PageeetState extends State
getExpenseItems(AsyncSnapshot
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(20.0),),
child: Padding(
padding: const EdgeInsets.all(8.0),
child: ListTile(
title: Text.rich(
TextSpan(
text: 'location: ', // default text style
children: <TextSpan>[
TextSpan(text: doc['location'],),
],
),
),
),
),
),
)
.toList();
} }
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v
and a minimal reproduction of the issue.
Similar to issue #12437, the Firestore plugin should convert GeoPoint data types from the store to an official Dart type, if one exists.
GeoPoint Reference Firestore Data Types