coordernadas
This commit is contained in:
@@ -176,6 +176,20 @@ class AuthenticationRepository extends GetxController {
|
||||
return city;
|
||||
}
|
||||
|
||||
Future<String> getCoordsOfCity(String uid) async {
|
||||
String coords = '';
|
||||
try {
|
||||
final snapshot =
|
||||
await FirebaseFirestore.instance.collection('users').doc(uid).get();
|
||||
final Map<String, dynamic>? data = snapshot.data();
|
||||
coords = data?['coordsOfCity'] ?? '';
|
||||
} catch (e) {
|
||||
print('Error getting coords of city: $e');
|
||||
}
|
||||
print('Error getting coords of city: $coords');
|
||||
return coords;
|
||||
}
|
||||
|
||||
Future<String> getAddress(String uid) async {
|
||||
String address = '';
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user