evita que se pueda enviar info sin numero
This commit is contained in:
@@ -192,10 +192,32 @@ class _ServiceScreenState extends State<ServiceScreen> {
|
||||
|
||||
BitmapDescriptor? _markerIcon;
|
||||
|
||||
String _ciudad = '...';
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
|
||||
if (_ciudad == '...') {
|
||||
AuthenticationRepository.instance
|
||||
.getCity(uid.toString())
|
||||
.then((String s) {
|
||||
if (s.isEmpty) {
|
||||
FirebaseFirestore.instance.collection('users').doc(uid).set({
|
||||
'city': 'Cúcuta',
|
||||
}).then((_) {
|
||||
setState(() {
|
||||
_ciudad = 'Cúcuta';
|
||||
});
|
||||
});
|
||||
} else {
|
||||
setState(() {
|
||||
_ciudad = s;
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
_saveToken();
|
||||
|
||||
if (user == null) {
|
||||
|
||||
Reference in New Issue
Block a user