Files
rkm_educa_app/lib/telas/tela_perfil.dart
2023-06-21 15:07:02 -03:00

83 lines
3.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/item_modelo.dart';
class TelaPerfil extends StatefulWidget {
EstudanteModelo estudanteModelo;
TelaPerfil({
required this.estudanteModelo
});
@override
State<TelaPerfil> createState() => _TelaPerfilState();
}
class _TelaPerfilState extends State<TelaPerfil> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBarCustom().appbar(context, 'PERFIL'),
drawer: DrawerCustom(estudanteModelo: widget.estudanteModelo),
body: ListView(
padding: EdgeInsets.symmetric(vertical: 50,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.nome,titulo: 'Nome',),
ItemModelo(texto: widget.estudanteModelo.idade.toString()+' anos',titulo: 'Idade',),
ItemModelo(texto: widget.estudanteModelo.anoEscolar.toString(),titulo: 'Ano Escolar',),
ItemModelo(texto: widget.estudanteModelo.ra,titulo: 'RA',),
Row(
children: [
ItemModelo(texto: widget.estudanteModelo.escola,titulo: 'Escola',widthCustom: 0.6,),
IconButton(
onPressed: ()=>
AlertDefault().alert(
context,
'',
'Fechar',
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,),
],
),
0.1
),
icon: Icon(Icons.visibility,color: PaletaCores.cinza),
padding: EdgeInsets.all(0),
)
],
),
],
),
);
}
}