inserido o progress indicator
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:rkm/controllers/main_controllers.dart';
|
||||
import 'package:rkm/screens/home_screen.dart';
|
||||
import 'package:rkm/service/api/url_api_const.dart';
|
||||
import 'package:rkm/config/color_palette.dart';
|
||||
import 'package:rkm/config/const_variable.dart';
|
||||
@@ -10,6 +11,7 @@ import 'package:rkm/widgets/text_default.dart';
|
||||
import '../../service/api/api_data_load.dart';
|
||||
import '../../service/db/db_sqlite_load.dart';
|
||||
import '../../service/shared_preferences/shared_preferences_service.dart';
|
||||
import '../../widgets/title_input.dart';
|
||||
import '../load_init_screen.dart';
|
||||
class LoginLoadScreen extends StatefulWidget {
|
||||
const LoginLoadScreen({Key? key}) : super(key: key);
|
||||
@@ -28,8 +30,8 @@ class _LoginLoadScreenState extends State<LoginLoadScreen> {
|
||||
String? now;
|
||||
String? selectCity;
|
||||
int contLogo = 0;
|
||||
String mode = 'desenvolvimento';
|
||||
String urlAPI = UrlApiConst.ApiUrlDesenvolvimento;
|
||||
String mode = 'online';
|
||||
String urlAPI = UrlApiConst.ApiUrlOnline;
|
||||
bool loading = false;
|
||||
String nameCityApi = '';
|
||||
String nameCityFront = '';
|
||||
@@ -97,7 +99,8 @@ class _LoginLoadScreenState extends State<LoginLoadScreen> {
|
||||
nameCityApi,
|
||||
nameCityFront,
|
||||
codState,
|
||||
codCityIbge).then((value) {
|
||||
codCityIbge
|
||||
).then((value) {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
@@ -189,23 +192,24 @@ class _LoginLoadScreenState extends State<LoginLoadScreen> {
|
||||
height: mode == 'desenvolvimento'?height*0.4:height*0.3,
|
||||
child: ListView(
|
||||
children: [
|
||||
TitleInput(title:'Usuário'),
|
||||
InputText(
|
||||
hint: 'Usuário',
|
||||
label: 'Usuário',
|
||||
title: 'Usuário',
|
||||
controller: inputUser,
|
||||
width: width*0.6,
|
||||
colorBorder: Colors.white,
|
||||
onChanged: (v)=>setState((){}),
|
||||
),
|
||||
TitleInput(title:'Senha'),
|
||||
InputText(
|
||||
hint: 'Senha',
|
||||
label: 'Senha',
|
||||
title: 'Senha',
|
||||
obscure: true,
|
||||
controller: inputPassword,
|
||||
width: width*0.6,
|
||||
colorBorder: Colors.white,
|
||||
onChanged: (v)=>setState((){}),
|
||||
),
|
||||
TitleInput(title:'Cidade'),
|
||||
DropDownButtonCity(
|
||||
error: 'Campo obrigatório',
|
||||
validator: mandatory,
|
||||
@@ -217,18 +221,18 @@ class _LoginLoadScreenState extends State<LoginLoadScreen> {
|
||||
});
|
||||
},
|
||||
),
|
||||
mode == 'desenvolvimento'?TitleInput(title:'IP'):Container(),
|
||||
mode == 'desenvolvimento'?InputText(
|
||||
hint: 'IP',
|
||||
label: 'IP',
|
||||
title: 'IP',
|
||||
obscure: false,
|
||||
controller: inputIP,
|
||||
width: width*0.6,
|
||||
colorBorder: Colors.white,
|
||||
onChanged: (v)=>setState((){}),
|
||||
):Container(),
|
||||
mode == 'desenvolvimento'?TitleInput(title:'Porta'):Container(),
|
||||
mode == 'desenvolvimento'?InputText(
|
||||
hint: 'Porta',
|
||||
label: 'Porta',
|
||||
title: 'Porta',
|
||||
obscure: false,
|
||||
controller: inputPort,
|
||||
width: width*0.6,
|
||||
@@ -240,6 +244,12 @@ class _LoginLoadScreenState extends State<LoginLoadScreen> {
|
||||
),
|
||||
),
|
||||
loading?Container():ButtonDefault(
|
||||
// onPressed: (){
|
||||
// Navigator.push(
|
||||
// context,
|
||||
// MaterialPageRoute(
|
||||
// builder: (context) => HomeScreen()));
|
||||
// },
|
||||
onPressed: ()=>checkLogin(),
|
||||
title: 'Carga Inicial',
|
||||
width: width*0.6,
|
||||
|
||||
Reference in New Issue
Block a user