From e9fa843a79844008b216e0610a1053099add1d9b Mon Sep 17 00:00:00 2001 From: Reginaldo Date: Tue, 20 Jun 2023 16:53:59 -0300 Subject: [PATCH] ajustado os dados para exibir o nome da escola --- lib/screens/home_screen.dart | 24 +++++++++++++++++------- lib/widgets/dados_alunos_container.dart | 6 +++--- 2 files changed, 20 insertions(+), 10 deletions(-) diff --git a/lib/screens/home_screen.dart b/lib/screens/home_screen.dart index 845f5c4..a98dea0 100644 --- a/lib/screens/home_screen.dart +++ b/lib/screens/home_screen.dart @@ -47,7 +47,7 @@ class _HomeScreenState extends State { }); }else{ List list = map; - // print(list); + print(list); if(list.length != 0){ for(int i =0; list.length>i;i++){ String data = list[i]['DT_NASCIMENTO']??''; @@ -59,7 +59,17 @@ class _HomeScreenState extends State { mes = data.substring(4,6); ano = data.substring(0,4); } - alunos.add(AlunoModel(nome: list[i]['NO_ALUNO']??'', data_nasc: '${dia}/${mes}/${ano}', ra: list[i]['NR_RA']??'', escola: '', serie: list[i]['DESC_SERIE'], turma: list[i]['TURMA'],dados: list[i])); + alunos.add( + AlunoModel( + nome: list[i]['NO_ALUNO']??'', + data_nasc: '${dia}/${mes}/${ano}', + ra: list[i]['NR_RA']??'', + escola: list[i]['NO_RAZAO_SOCIAL']==''||list[i]['NO_RAZAO_SOCIAL']==null?list[i]['NO_FANTASIA']:list[i]['NO_RAZAO_SOCIAL'], + serie: list[i]['DESC_SERIE'], + turma: list[i]['TURMA'], + dados: list[i] + ) + ); resultadoPesquisa.add(alunos[i]); } }else{ @@ -146,7 +156,7 @@ class _HomeScreenState extends State { children: [ SizedBox(height: height*0.05), Padding( - padding: EdgeInsets.symmetric(horizontal: width>900?width*0.15:width*0.05), + padding: EdgeInsets.symmetric(horizontal: width>900?width*0.1:width*0.05), child: Row( crossAxisAlignment: CrossAxisAlignment.center, children: [ @@ -196,7 +206,7 @@ class _HomeScreenState extends State { ), Container( margin: EdgeInsets.symmetric(vertical: 20), - padding: EdgeInsets.symmetric(horizontal: width>900?width*0.15:width*0.05), + padding: EdgeInsets.symmetric(horizontal: width>900?width*0.1:width*0.05), width: width, alignment: Alignment.center, child: Row( @@ -297,7 +307,7 @@ class _HomeScreenState extends State { ) ), Container( - width: width*0.15, + width: width*0.2, child: Row( children: [ TextCustom(text: 'Escola',size: 12,fontWeight: FontWeight.bold,color: Colors.black87,), @@ -319,8 +329,8 @@ class _HomeScreenState extends State { ), ), Container( - padding: EdgeInsets.symmetric(horizontal: width>900?width*0.15:width*0.05), - width: width*0.5, + padding: EdgeInsets.symmetric(horizontal: width>900?width*0.1:width*0.05), + width: width*0.75, height: height*0.8, child: ListView.separated( separatorBuilder: (context,index){ diff --git a/lib/widgets/dados_alunos_container.dart b/lib/widgets/dados_alunos_container.dart index e854627..186c0aa 100644 --- a/lib/widgets/dados_alunos_container.dart +++ b/lib/widgets/dados_alunos_container.dart @@ -51,11 +51,11 @@ class DadosAlunosContainer extends StatelessWidget { ), Container( width: width*0.05, - child: TextCustom(text: alunoModel.turma.toUpperCase()) + child: TextCustom(text: alunoModel.turma.toUpperCase(),textAlign: TextAlign.center,) ), Container( - width: width*0.20, - child: TextCustom(text: alunoModel.escola.toUpperCase()) + width: width*0.25, + child: TextCustom(text: alunoModel.escola.toUpperCase(),size: 14.0,) ), ], ),