This commit is contained in:
Juan Felipe Duarte
2023-04-06 11:26:22 -05:00
parent de3d85f997
commit d83130b01d
8 changed files with 472 additions and 71 deletions
@@ -143,4 +143,17 @@ class AuthenticationRepository extends GetxController {
}
return city;
}
Future<String> getPhoto(String uid) async {
String photo = '';
try {
final snapshot =
await FirebaseFirestore.instance.collection('users').doc(uid).get();
final Map<String, dynamic>? data = snapshot.data();
photo = data?['photo'] ?? '';
} catch (e) {
print('Error getting photo: $e');
}
return photo;
}
}