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 { EstudanteModelo estudanteModelo; TelaPerfil({ required this.estudanteModelo }); @override State createState() => _TelaPerfilState(); } class _TelaPerfilState extends State { @override void initState() { super.initState(); MainControllers().salvarLog(widget.estudanteModelo, 'PERFIL'); } @override Widget build(BuildContext context) { return Scaffold( appBar: AppBarCustom().appbar(context, 'PERFIL'), drawer: DrawerCustom(estudanteModelo: widget.estudanteModelo), 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.estudanteModelo.NO_ALUNO,titulo: 'Nome',), ItemModelo(texto: widget.estudanteModelo.IDADE_ALUNO.toString()+' anos',titulo: 'Idade',), ItemModelo(texto: widget.estudanteModelo.ANO_LETIVO.toString(),titulo: 'Ano Escolar',), ItemModelo(texto: widget.estudanteModelo.RA_ALUNO,titulo: 'RA',), Row( children: [ ItemModelo(texto: widget.estudanteModelo.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.estudanteModelo.dados[widget.estudanteModelo.nroAluno]['TX_DIRETOR']=='' ?Container() :ItemModelo(texto: widget.estudanteModelo.dados[widget.estudanteModelo.nroAluno]['TX_DIRETOR'], titulo: 'Diretor(a)',widthCustom: 0.65), widget.estudanteModelo.dados[widget.estudanteModelo.nroAluno]['TX_VICE_DIRETOR']==''?Container() :ItemModelo(texto: widget.estudanteModelo.dados[widget.estudanteModelo.nroAluno]['TX_VICE_DIRETOR'], titulo: 'Vice - Diretor(a)',widthCustom: 0.6), widget.estudanteModelo.dados[widget.estudanteModelo.nroAluno]['TX_COORDENADOR']=='' ?Container() :ItemModelo(texto: widget.estudanteModelo.dados[widget.estudanteModelo.nroAluno]['TX_COORDENADOR'], titulo: 'Coordenador(a)',widthCustom: 0.6), widget.estudanteModelo.dados[widget.estudanteModelo.nroAluno]['NO_EMAIL']=='' ?Container() :ItemModelo(texto: widget.estudanteModelo.dados[widget.estudanteModelo.nroAluno]['NO_EMAIL'], titulo: 'E - mail',widthCustom: 0.6), widget.estudanteModelo.dados[widget.estudanteModelo.nroAluno]['NO_SITE']=='' ?Container() :ItemModelo(texto: widget.estudanteModelo.dados[widget.estudanteModelo.nroAluno]['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), ) ], ), ], ), ); } }