ajustes na pesquisa dos usuarios e ajustes no app bar
This commit is contained in:
@@ -95,7 +95,8 @@ class _HomeScreenState extends State<HomeScreen> {
|
||||
setState(() {
|
||||
buscandoDados = true;
|
||||
});
|
||||
final url = '${widget.dados[2]}/acesso_maria?LOGIN=${inputPesquisa.text.toUpperCase()}&CIDADE=${widget.dados[0]}';
|
||||
String usuario = inputPesquisa.text.replaceAll(' ', '%20').toUpperCase();
|
||||
final url = '${widget.dados[2]}/pesquisa_acesso?NOME=$usuario&CIDADE=${widget.dados[0]}';
|
||||
print(url);
|
||||
final response = await http.get(Uri.parse(url));
|
||||
var map = json.decode(response.body);
|
||||
@@ -119,6 +120,7 @@ class _HomeScreenState extends State<HomeScreen> {
|
||||
buscandoDados = false;
|
||||
});
|
||||
}else{
|
||||
print('aqui');
|
||||
getAcessosBasePrincipal();
|
||||
}
|
||||
}
|
||||
@@ -128,7 +130,8 @@ class _HomeScreenState extends State<HomeScreen> {
|
||||
setState(() {
|
||||
buscandoDados = true;
|
||||
});
|
||||
final url = '${widget.dados[2]}/acesso_base?LOGIN=${inputPesquisa.text.toUpperCase()}&CIDADE=${widget.dados[0]}';
|
||||
String usuario = inputPesquisa.text.replaceAll(' ', '%20').toUpperCase();
|
||||
final url = '${widget.dados[2]}/acesso_base?NOME=$usuario&CIDADE=${widget.dados[0]}';
|
||||
print(url);
|
||||
final response = await http.get(Uri.parse(url));
|
||||
var map = json.decode(response.body);
|
||||
@@ -184,7 +187,7 @@ class _HomeScreenState extends State<HomeScreen> {
|
||||
),
|
||||
TextCustom(text: showEscola?'- PESQUISAR USUÁRIOS':'- PESQUISAR ESTUDANTES',color: Colors.white,),
|
||||
Spacer(),
|
||||
widget.dados[1].toString().toUpperCase()=='ADMIN'?ButtonCustom(
|
||||
widget.dados[1].toString().toUpperCase()=='ADMINISTRADOR'?ButtonCustom(
|
||||
onPressed: (){
|
||||
inputPesquisa.clear();
|
||||
setState(()=>showEscola?showEscola=false:showEscola=true);
|
||||
@@ -197,8 +200,14 @@ class _HomeScreenState extends State<HomeScreen> {
|
||||
colorBorder: PaletteColors.white
|
||||
):Container(),
|
||||
SizedBox(width: width * 0.02),
|
||||
TextCustom(text: widget.dados[0]==null?'':widget.dados[0],color: Colors.white,),
|
||||
TextCustom(text:widget.dados[1]==null?'':' - '+widget.dados[1].toString().toUpperCase(),color: Colors.white,),
|
||||
Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
crossAxisAlignment: CrossAxisAlignment.end,
|
||||
children: [
|
||||
TextCustom(text: widget.dados[0]==null?'':widget.dados[0],color: Colors.white,),
|
||||
TextCustom(text:widget.dados[1]==null?'':widget.dados[1].toString().toUpperCase(),color: Colors.white,),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
backgroundColor: PaletteColors.grey,
|
||||
|
||||
Reference in New Issue
Block a user