ajustes no layout
This commit is contained in:
@@ -22,6 +22,8 @@ class _LoginLoadScreenState extends State<LoginLoadScreen> {
|
||||
|
||||
var inputUser = TextEditingController();
|
||||
var inputPassword = TextEditingController();
|
||||
var inputIP = TextEditingController(text: '192.168.0.42');
|
||||
var inputPort = TextEditingController(text: '8010');
|
||||
String error = '';
|
||||
String? now;
|
||||
String? selectCity;
|
||||
@@ -41,7 +43,6 @@ class _LoginLoadScreenState extends State<LoginLoadScreen> {
|
||||
if(inputUser.text.isNotEmpty && inputPassword.text.isNotEmpty && inputUser.text.length>3 && inputPassword.text.length>3){
|
||||
if(selectCity!=null){
|
||||
_prefService.createCacheModel(inputUser.text,inputPassword.text,selectCity!,mode);
|
||||
setState(() {
|
||||
error = '';
|
||||
loading = true;
|
||||
for(int i=0;ConstVariable().itensCity.length > i;i++){
|
||||
@@ -53,7 +54,10 @@ class _LoginLoadScreenState extends State<LoginLoadScreen> {
|
||||
codState = ConstVariable().itensCity[i].codState;
|
||||
}
|
||||
}
|
||||
});
|
||||
setState(() {});
|
||||
if(inputIP.text.isNotEmpty && inputPort.text.isNotEmpty && mode == 'desenvolvimento'){
|
||||
urlAPI = 'http://${inputIP.text}:${inputPort.text}/api/atb/';
|
||||
}
|
||||
await ApiDataLoad().apiConect(urlAPI,mode,nameCityApi,inputUser.text).then((response) async {
|
||||
// print("erre : "+response.toString());
|
||||
if(response == 'Erro' || response.toString() == 'Error: -902 - I/O error during "open" operation for file "/bases/conectasus/extrema/SISTEMA.FDB" Error while trying to open file No such file or directory'){
|
||||
@@ -182,7 +186,7 @@ class _LoginLoadScreenState extends State<LoginLoadScreen> {
|
||||
autovalidateMode: AutovalidateMode.onUserInteraction,
|
||||
child: Container(
|
||||
width: width*0.6,
|
||||
height: height*0.3,
|
||||
height: mode == 'desenvolvimento'?height*0.4:height*0.3,
|
||||
child: ListView(
|
||||
children: [
|
||||
InputText(
|
||||
@@ -213,6 +217,24 @@ class _LoginLoadScreenState extends State<LoginLoadScreen> {
|
||||
});
|
||||
},
|
||||
),
|
||||
mode == 'desenvolvimento'?InputText(
|
||||
hint: 'IP',
|
||||
label: 'IP',
|
||||
obscure: false,
|
||||
controller: inputIP,
|
||||
width: width*0.6,
|
||||
colorBorder: Colors.white,
|
||||
onChanged: (v)=>setState((){}),
|
||||
):Container(),
|
||||
mode == 'desenvolvimento'?InputText(
|
||||
hint: 'Porta',
|
||||
label: 'Porta',
|
||||
obscure: false,
|
||||
controller: inputPort,
|
||||
width: width*0.6,
|
||||
colorBorder: Colors.white,
|
||||
onChanged: (v)=>setState((){}),
|
||||
):Container(),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user