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{
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<HomeScreen> {
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<HomeScreen> {
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<HomeScreen> {
),
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<HomeScreen> {
)
),
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<HomeScreen> {
),
),
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){

View File

@@ -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,)
),
],
),