This commit is contained in:
Juan Felipe Duarte
2023-04-19 17:51:08 -05:00
parent 3b28febfec
commit 268af389bb
8 changed files with 690 additions and 55 deletions
+1 -30
View File
@@ -57,49 +57,20 @@ class _ServiceScreenState extends State<ServiceScreen> {
final FirebaseStorage storage = FirebaseStorage.instance;
final uid = AuthenticationRepository.instance.getCurrentUserUid();
var _ciudad = '';
var _photo = '...';
var _estado = '...';
@override
void initState() {
super.initState();
if (_estado == '...') {
AuthenticationRepository.instance
.getState(uid.toString())
.then((String s) => setState(() {
_estado = s;
}));
}
if (_ciudad == '') {
AuthenticationRepository.instance
.getCity(uid.toString())
.then((String s) => setState(() {
_ciudad = s;
}));
}
if (_photo == '...') {
AuthenticationRepository.instance
.getPhoto(uid.toString())
.then((String s) => setState(() {
_photo = s;
}));
}
}
@override
Widget build(BuildContext context) {
final User? user = FirebaseAuth.instance.currentUser;
List<String> opc = ["Servicio", "Opción 1", "Opción 2", "Opción 3"];
String defaultValue = opc[0];
return SafeArea(
child: Scaffold(
backgroundColor: Color(0xFFD6F4FF),
backgroundColor: const Color(0xFFD6F4FF),
drawer: DrawerMenu(),
body: SingleChildScrollView(
reverse: true,