This commit is contained in:
Juan Felipe Duarte
2023-05-05 15:51:32 -05:00
parent eb94895397
commit eeced3ac66
3 changed files with 91 additions and 15 deletions
@@ -201,6 +201,19 @@ class AuthenticationRepository extends GetxController {
return opcional_location;
}
Future<int> getTarifa(String uid) async {
int tarifa = 0;
try {
final snapshot =
await FirebaseFirestore.instance.collection('users').doc(uid).get();
final Map<String, dynamic>? data = snapshot.data();
tarifa = data?['tarifa'] ?? 0;
} catch (e) {
print('Error getting tarifa: $e');
}
return tarifa;
}
Future<String> getPhoto(String uid) async {
String photo = '';
try {