botones
This commit is contained in:
@@ -27,7 +27,9 @@ class AuthenticationRepository extends GetxController {
|
||||
}
|
||||
|
||||
_setInitialScreen(User? user) {
|
||||
user == null ? Get.offAll(LoginScreen()) : Get.offAll(WelcomeScreen());
|
||||
user == null
|
||||
? Get.offAll(const LoginScreen())
|
||||
: Get.offAll(const WelcomeScreen());
|
||||
}
|
||||
|
||||
Future<void> phoneAuthentication(String phoneNo) async {
|
||||
@@ -156,4 +158,17 @@ class AuthenticationRepository extends GetxController {
|
||||
}
|
||||
return photo;
|
||||
}
|
||||
|
||||
Future<String> getState(String uid) async {
|
||||
String state = '';
|
||||
try {
|
||||
final snapshot =
|
||||
await FirebaseFirestore.instance.collection('users').doc(uid).get();
|
||||
final Map<String, dynamic>? data = snapshot.data();
|
||||
state = data?['estado'] ?? '';
|
||||
} catch (e) {
|
||||
print('Error getting estado: $e');
|
||||
}
|
||||
return state;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user