ajustes no front e finalizado o salvamento dos dados no DB

This commit is contained in:
Reginaldo
2023-05-03 15:49:31 -03:00
parent 115c7a9d4c
commit 7ab1fa5ebd
11 changed files with 309 additions and 132 deletions

View File

@@ -25,7 +25,6 @@ class _LoginLoadScreenState extends State<LoginLoadScreen> {
String error = '';
String? now;
String? selectCity;
bool validatorDropDown= false;
int contLogo = 0;
String mode = 'desenvolvimento';
String urlAPI = UrlApiConst.ApiUrlDesenvolvimento;
@@ -35,6 +34,7 @@ class _LoginLoadScreenState extends State<LoginLoadScreen> {
String codState = '';
int codCity = 0;
int codCityIbge = 0;
bool mandatory = false;
final PrefService _prefService = PrefService();
checkLogin()async{
@@ -115,9 +115,9 @@ class _LoginLoadScreenState extends State<LoginLoadScreen> {
}
});
}else{
setState(() {
error = 'Selecione sua cidade';
});
error = 'Selecione sua cidade';
mandatory = true;
setState(() {});
}
}else{
setState(() {
@@ -187,7 +187,7 @@ class _LoginLoadScreenState extends State<LoginLoadScreen> {
children: [
InputText(
hint: 'Usuário',
label: inputUser.text.isNotEmpty?'':'Usuário',
label: 'Usuário',
controller: inputUser,
width: width*0.6,
colorBorder: Colors.white,
@@ -195,7 +195,7 @@ class _LoginLoadScreenState extends State<LoginLoadScreen> {
),
InputText(
hint: 'Senha',
label: inputPassword.text.isNotEmpty?'':'Senha',
label: 'Senha',
obscure: true,
controller: inputPassword,
width: width*0.6,
@@ -204,12 +204,12 @@ class _LoginLoadScreenState extends State<LoginLoadScreen> {
),
DropDownButtonCity(
error: 'Campo obrigatório',
validator: validatorDropDown,
validator: mandatory,
select: selectCity,
onChanged: (value){
setState(() {
selectCity = value!;
validatorDropDown = true;
mandatory = false;
});
},
),