ajustado os dados para exibir o nome da escola

This commit is contained in:
Reginaldo
2023-06-20 16:53:59 -03:00
parent 4d30aab6d3
commit e9fa843a79
2 changed files with 20 additions and 10 deletions

View File

@@ -47,7 +47,7 @@ class _HomeScreenState extends State<HomeScreen> {
}); });
}else{ }else{
List list = map; List list = map;
// print(list); print(list);
if(list.length != 0){ if(list.length != 0){
for(int i =0; list.length>i;i++){ for(int i =0; list.length>i;i++){
String data = list[i]['DT_NASCIMENTO']??''; String data = list[i]['DT_NASCIMENTO']??'';
@@ -59,7 +59,17 @@ class _HomeScreenState extends State<HomeScreen> {
mes = data.substring(4,6); mes = data.substring(4,6);
ano = data.substring(0,4); 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]); resultadoPesquisa.add(alunos[i]);
} }
}else{ }else{
@@ -146,7 +156,7 @@ class _HomeScreenState extends State<HomeScreen> {
children: [ children: [
SizedBox(height: height*0.05), SizedBox(height: height*0.05),
Padding( 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( child: Row(
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
@@ -196,7 +206,7 @@ class _HomeScreenState extends State<HomeScreen> {
), ),
Container( Container(
margin: EdgeInsets.symmetric(vertical: 20), 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, width: width,
alignment: Alignment.center, alignment: Alignment.center,
child: Row( child: Row(
@@ -297,7 +307,7 @@ class _HomeScreenState extends State<HomeScreen> {
) )
), ),
Container( Container(
width: width*0.15, width: width*0.2,
child: Row( child: Row(
children: [ children: [
TextCustom(text: 'Escola',size: 12,fontWeight: FontWeight.bold,color: Colors.black87,), TextCustom(text: 'Escola',size: 12,fontWeight: FontWeight.bold,color: Colors.black87,),
@@ -319,8 +329,8 @@ class _HomeScreenState extends State<HomeScreen> {
), ),
), ),
Container( Container(
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*0.5, width: width*0.75,
height: height*0.8, height: height*0.8,
child: ListView.separated( child: ListView.separated(
separatorBuilder: (context,index){ separatorBuilder: (context,index){

View File

@@ -51,11 +51,11 @@ class DadosAlunosContainer extends StatelessWidget {
), ),
Container( Container(
width: width*0.05, width: width*0.05,
child: TextCustom(text: alunoModel.turma.toUpperCase()) child: TextCustom(text: alunoModel.turma.toUpperCase(),textAlign: TextAlign.center,)
), ),
Container( Container(
width: width*0.20, width: width*0.25,
child: TextCustom(text: alunoModel.escola.toUpperCase()) child: TextCustom(text: alunoModel.escola.toUpperCase(),size: 14.0,)
), ),
], ],
), ),