evita que se pueda enviar info sin numero

This commit is contained in:
Felipe
2023-07-31 15:04:35 -05:00
parent 5b6fe18686
commit 39b49fea15
5 changed files with 60 additions and 13 deletions
+2 -3
View File
@@ -443,11 +443,10 @@ class _ProfileWebScreenState extends State<ProfileWebScreen> {
List<City> filteredCities = snapshot.data!;
return DropdownButtonFormField<String>(
value: _ciudad, // Valor seleccionado actualmente
value: _ciudad,
onChanged: (String? newValue) {
setState(() {
_ciudad =
newValue!; // Actualizar el valor seleccionado
_ciudad = newValue!;
});
},
items: filteredCities.map((City city) {
+12 -9
View File
@@ -48,15 +48,18 @@ class RequestSentScreen extends StatelessWidget {
),
],
),
child: const Row(
children: [
Expanded(
child: Text(
"¡Gracias por proporcionar tu información! Revisaremos los datos proporcionados y, una vez confirmados, podrás convertirte en un profesional registrado en nuestra aplicación. ¡Esperamos contar contigo pronto!",
style: TextStyle(color: Colors.black, fontSize: 14),
),
)
],
child: const SizedBox(
width: 350,
child: Row(
children: [
Expanded(
child: Text(
"¡Gracias por proporcionar tu información! Revisaremos los datos proporcionados y, una vez confirmados, podrás convertirte en un profesional registrado en nuestra aplicación. ¡Esperamos contar contigo pronto!",
style: TextStyle(color: Colors.black, fontSize: 14),
),
)
],
),
),
),
PrimaryButtom(
+22
View File
@@ -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) {