mapa perfil profesional
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import 'package:cloud_firestore/cloud_firestore.dart';
|
||||
import 'package:firebase_auth/firebase_auth.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:google_sign_in/google_sign_in.dart';
|
||||
import 'package:prosappco/src/authentication/exceptions/register_failed.dart';
|
||||
@@ -163,6 +162,19 @@ class AuthenticationRepository extends GetxController {
|
||||
return city;
|
||||
}
|
||||
|
||||
Future<String> getAddress(String uid) async {
|
||||
String address = '';
|
||||
try {
|
||||
final snapshot =
|
||||
await FirebaseFirestore.instance.collection('users').doc(uid).get();
|
||||
final Map<String, dynamic>? data = snapshot.data();
|
||||
address = data?['address'] ?? '';
|
||||
} catch (e) {
|
||||
print('Error getting address: $e');
|
||||
}
|
||||
return address;
|
||||
}
|
||||
|
||||
Future<String> getPhoto(String uid) async {
|
||||
String photo = '';
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user