ajustes para exibir todas escolas para secretaria municipal e ajusta da altura dos resultados da pesquisa

This commit is contained in:
Reginaldo
2023-08-21 12:43:30 -03:00
parent 21bbd9bdbf
commit 4f5c40e8af
2 changed files with 10 additions and 9 deletions

View File

@@ -40,7 +40,9 @@ class _HomeScreenState extends State<HomeScreen> {
resultadoPesquisa.clear();
alunos.clear();
String aluno = inputPesquisa.text.replaceAll(' ', '%20').toUpperCase();
String escola = widget.dados[3].replaceAll(' ', '%20').toUpperCase();
print(widget.dados[3]);
print(widget.dados[4]);
String escola = widget.dados[4]==1 ||widget.dados[1]=='ADMINISTRADOR'?'':widget.dados[3].replaceAll(' ', '%20').toUpperCase();
// print(q);
final url = '${widget.dados[2]}/aluno?NOME=$aluno&CIDADE=${widget.dados[0]}&ANO=${DateTime.now().year}&ESCOLA=$escola';
print(url);
@@ -102,7 +104,7 @@ class _HomeScreenState extends State<HomeScreen> {
var map = json.decode(response.body);
print(map);
List list = map;
if(list.length != 0 ){
if(list.length != 0){
for(int i=0;list.length>i;i++){
logins.add(
LoginModel(
@@ -267,7 +269,6 @@ class _HomeScreenState extends State<HomeScreen> {
setState(() {
buscandoDados = true;
});
// getAcessosBasePrincipal();
getAcessosMariaDB();
}else{
showSnackBar(context, 'Digite alguma informação para pesquisar', Colors.red);
@@ -332,7 +333,7 @@ class _HomeScreenState extends State<HomeScreen> {
border: Border.all(color: logins.length==0?Colors.white:PaletteColors.grey)
),
margin: EdgeInsets.symmetric(horizontal: width>900?width*0.1:width*0.05),
height: height*0.74,
height: height*0.7,
child: ListView.builder(
itemCount: logins.length,
itemBuilder: (context,index){
@@ -557,7 +558,7 @@ class _HomeScreenState extends State<HomeScreen> {
),
margin: EdgeInsets.symmetric(horizontal: width>900?width*0.1:width*0.05),
width: width*0.75,
height: height*0.74,
height: height*0.7,
child: ListView.builder(
itemCount: resultadoPesquisa.length,
itemBuilder:(context,index){