ciudad
This commit is contained in:
@@ -18,33 +18,27 @@ class _WelcomeScreenState extends State<WelcomeScreen> {
|
||||
final _formKey = GlobalKey<FormState>();
|
||||
final controller = Get.put(NameEmailCityController());
|
||||
var _nombre = '...';
|
||||
var _ciudad = '...';
|
||||
var _ciudad = '';
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
// if (_nombre == '...') {
|
||||
// AuthenticationRepository.instance
|
||||
// .getName(uid.toString())
|
||||
// .then((String s) => setState(() {
|
||||
// _nombre = s;
|
||||
// }));
|
||||
// }
|
||||
// if (_ciudad == '...') {
|
||||
// AuthenticationRepository.instance
|
||||
// .getCity(uid.toString())
|
||||
// .then((String s) => setState(() {
|
||||
// _ciudad = s;
|
||||
// }));
|
||||
// }
|
||||
|
||||
if (_ciudad == '') {
|
||||
AuthenticationRepository.instance
|
||||
.getCity(uid.toString())
|
||||
.then((String s) => setState(() {
|
||||
_ciudad = s;
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
String name = 'Felipe el du';
|
||||
String city = 'Felipe el du';
|
||||
final User? user = FirebaseAuth.instance.currentUser;
|
||||
|
||||
// String name = _nombre.toString();
|
||||
// String city = _ciudad.toString();
|
||||
String city = _ciudad.toString();
|
||||
|
||||
return SafeArea(
|
||||
child: Scaffold(
|
||||
@@ -61,20 +55,17 @@ class _WelcomeScreenState extends State<WelcomeScreen> {
|
||||
onTap: () {
|
||||
Navigator.pushNamed(context, '/profile');
|
||||
},
|
||||
title: Text('$name',
|
||||
title: Text('${user?.displayName ?? user?.email}',
|
||||
style: TextStyle(fontWeight: FontWeight.bold)),
|
||||
subtitle: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
'friki',
|
||||
// AuthenticationRepository.instance
|
||||
// .getCurrentUserPhone()
|
||||
// .toString(),
|
||||
'${user?.phoneNumber ?? ''}',
|
||||
style: TextStyle(fontSize: 12),
|
||||
),
|
||||
Text(
|
||||
'$city',
|
||||
'${city ?? "a"}',
|
||||
style: TextStyle(fontSize: 12),
|
||||
),
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user