107 lines
4.8 KiB
Dart
107 lines
4.8 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:rkm_educa_app/modelos/estudante_modelo.dart';
|
|
import 'package:rkm_educa_app/utils/cores.dart';
|
|
import 'package:rkm_educa_app/componentes/alert_default.dart';
|
|
import 'package:rkm_educa_app/componentes/appbar_custom.dart';
|
|
import 'package:rkm_educa_app/componentes/drawer_custom.dart';
|
|
import 'package:rkm_educa_app/utils/dimensoes.dart';
|
|
import '../componentes/buttom_custom.dart';
|
|
import '../componentes/item_modelo.dart';
|
|
import '../controllers/main_controllers.dart';
|
|
|
|
class TelaPerfil extends StatefulWidget {
|
|
List <EstudanteModelo> alunos;
|
|
int indiceAluno;
|
|
|
|
TelaPerfil({
|
|
required this.alunos,
|
|
required this.indiceAluno
|
|
});
|
|
|
|
@override
|
|
State<TelaPerfil> createState() => _TelaPerfilState();
|
|
}
|
|
|
|
|
|
class _TelaPerfilState extends State<TelaPerfil> {
|
|
|
|
@override
|
|
void initState() {
|
|
super.initState();
|
|
MainControllers().salvarLog(widget.alunos[widget.indiceAluno], 'PERFIL');
|
|
}
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Scaffold(
|
|
appBar: AppBarCustom().appbar(context, 'PERFIL'),
|
|
drawer: DrawerCustom(alunos: widget.alunos,indiceFilhos: widget.indiceAluno),
|
|
body: ListView(
|
|
padding: EdgeInsets.symmetric(vertical: 0,horizontal: 20),
|
|
children: [
|
|
// CircleAvatar(
|
|
// radius: 70,
|
|
// backgroundColor: Colors.grey[300],
|
|
// child:widget.estudanteModelo.foto==''?Container(): ClipRRect(
|
|
// borderRadius:BorderRadius.circular(70),
|
|
// child: Image.asset(widget.estudanteModelo.foto),
|
|
// )
|
|
// ),
|
|
SizedBox(height: 25,),
|
|
ItemModelo(texto: widget.alunos[widget.indiceAluno].NO_ALUNO,titulo: 'Nome',),
|
|
ItemModelo(texto: widget.alunos[widget.indiceAluno].IDADE_ALUNO.toString()+' anos',titulo: 'Idade',),
|
|
ItemModelo(texto: widget.alunos[widget.indiceAluno].ANO_LETIVO.toString(),titulo: 'Ano Escolar',),
|
|
ItemModelo(texto: widget.alunos[widget.indiceAluno].RA_ALUNO,titulo: 'RA',),
|
|
Row(
|
|
children: [
|
|
ItemModelo(texto: widget.alunos[widget.indiceAluno].ESCOLA,titulo: 'Escola',widthCustom: 0.6,),
|
|
IconButton(
|
|
onPressed: ()=>
|
|
AlertDefault().alert(
|
|
context,
|
|
0.3,
|
|
Container(
|
|
height: Dimensoes.height*0.2,
|
|
child: Column(
|
|
mainAxisSize: MainAxisSize.min,
|
|
children: [
|
|
widget.alunos[widget.indiceAluno].dados[widget.indiceAluno]['TX_DIRETOR']==''
|
|
?Container()
|
|
:ItemModelo(texto: widget.alunos[widget.indiceAluno].dados[widget.indiceAluno]['TX_DIRETOR'], titulo: 'Diretor(a)',widthCustom: 0.65),
|
|
widget.alunos[widget.indiceAluno].dados[widget.indiceAluno]['TX_VICE_DIRETOR']==''?Container()
|
|
:ItemModelo(texto: widget.alunos[widget.indiceAluno].dados[widget.indiceAluno]['TX_VICE_DIRETOR'], titulo: 'Vice - Diretor(a)',widthCustom: 0.6),
|
|
widget.alunos[widget.indiceAluno].dados[widget.indiceAluno]['TX_COORDENADOR']==''
|
|
?Container()
|
|
:ItemModelo(texto: widget.alunos[widget.indiceAluno].dados[widget.indiceAluno]['TX_COORDENADOR'], titulo: 'Coordenador(a)',widthCustom: 0.6),
|
|
widget.alunos[widget.indiceAluno].dados[widget.indiceAluno]['NO_EMAIL']==''
|
|
?Container()
|
|
:ItemModelo(texto: widget.alunos[widget.indiceAluno].dados[widget.indiceAluno]['NO_EMAIL'], titulo: 'E - mail',widthCustom: 0.6),
|
|
widget.alunos[widget.indiceAluno].dados[widget.indiceAluno]['NO_SITE']==''
|
|
?Container()
|
|
:ItemModelo(texto: widget.alunos[widget.indiceAluno].dados[widget.indiceAluno]['NO_SITE'], titulo: 'Site',widthCustom: 0.6,),
|
|
Spacer(),
|
|
ButtonCustom(
|
|
onPressed: ()=>Navigator.pop(context),
|
|
text: 'Fechar',
|
|
widthCustom: 0.2,
|
|
heightCustom: 0.05,
|
|
fontsize: 14,
|
|
colorText: Colors.white,
|
|
colorBorder: PaletaCores.cinza,
|
|
colorButton: PaletaCores.cinza,
|
|
)
|
|
],
|
|
),
|
|
),
|
|
),
|
|
icon: Icon(Icons.visibility,color: PaletaCores.cinza),
|
|
padding: EdgeInsets.all(0),
|
|
)
|
|
],
|
|
),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|