picker city update
This commit is contained in:
@@ -187,7 +187,7 @@ class _CityScreenState extends State<CityScreen> {
|
|||||||
),
|
),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
updateCity(citys[index].cityName ?? "");
|
updateCity(citys[index].cityName ?? "");
|
||||||
Navigator.pushReplacementNamed(context, '/profile');
|
Navigator.pop(context, citys[index].cityName ?? "");
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -428,15 +428,27 @@ class _ProfileScreenState extends State<ProfileScreen> {
|
|||||||
20.0), // Agrega espacio vertical entre los TextFormFields
|
20.0), // Agrega espacio vertical entre los TextFormFields
|
||||||
TextFormField(
|
TextFormField(
|
||||||
readOnly: true,
|
readOnly: true,
|
||||||
onTap: () {
|
onTap: () async {
|
||||||
Navigator.pushReplacementNamed(context, '/city');
|
final String? ciudad =
|
||||||
|
(await Navigator.pushNamed(context, '/city'))
|
||||||
|
as String?;
|
||||||
|
|
||||||
|
if (ciudad != null) {
|
||||||
|
setState(() {
|
||||||
|
_ciudad = ciudad as String;
|
||||||
|
});
|
||||||
|
}
|
||||||
},
|
},
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
prefixIcon: Icon(Icons.near_me),
|
prefixIcon: Icon(Icons.near_me),
|
||||||
suffixIcon: Icon(Icons.arrow_drop_down),
|
suffixIcon: Icon(Icons.arrow_drop_down),
|
||||||
hintText: city == '' ? 'Ciudad' : '$city',
|
hintStyle: city == ''
|
||||||
hintStyle: TextStyle(color: Colors.black87),
|
? TextStyle()
|
||||||
),
|
: TextStyle(color: Colors.black87),
|
||||||
|
hintText: city == ''
|
||||||
|
? 'Profesión (Obligatorio)'
|
||||||
|
: '$city'),
|
||||||
|
// hintText: city == '' ? 'Ciudad' : '$city',
|
||||||
),
|
),
|
||||||
|
|
||||||
SizedBox(
|
SizedBox(
|
||||||
|
|||||||
Reference in New Issue
Block a user