botones
This commit is contained in:
@@ -33,6 +33,7 @@ class _ProfileScreenState extends State<ProfileScreen> {
|
||||
var photoTemp = '';
|
||||
var _ciudad = '...';
|
||||
var _photo = '...';
|
||||
var _estado = '...';
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
@@ -68,6 +69,13 @@ class _ProfileScreenState extends State<ProfileScreen> {
|
||||
_photo = s;
|
||||
}));
|
||||
}
|
||||
if (_estado == '...') {
|
||||
AuthenticationRepository.instance
|
||||
.getState(uid.toString())
|
||||
.then((String s) => setState(() {
|
||||
_estado = s;
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> updateImage(image) async {
|
||||
@@ -320,6 +328,7 @@ class _ProfileScreenState extends State<ProfileScreen> {
|
||||
final User? user = FirebaseAuth.instance.currentUser;
|
||||
|
||||
String city = _ciudad.toString();
|
||||
String state = _estado.toString();
|
||||
|
||||
return SafeArea(
|
||||
child: Scaffold(
|
||||
@@ -508,7 +517,11 @@ class _ProfileScreenState extends State<ProfileScreen> {
|
||||
SizedBox(width: 5),
|
||||
ElevatedButton(
|
||||
onPressed: () {
|
||||
Navigator.pushNamed(context, '/profesionalRevision');
|
||||
if (state == 'pendiente') {
|
||||
Navigator.pushNamed(context, '/profesionalProfile');
|
||||
} else if (state == 'revision') {
|
||||
Navigator.pushNamed(context, '/profesionalRevision');
|
||||
}
|
||||
},
|
||||
child: Text(
|
||||
'Modo profesional',
|
||||
|
||||
Reference in New Issue
Block a user