From bb129ba310d0ca7d52790b9bb3bce50288860c50 Mon Sep 17 00:00:00 2001 From: Reginaldo Date: Wed, 21 Jun 2023 15:23:20 -0300 Subject: [PATCH] ajustes nos dados do contatos --- lib/componentes/alert_default.dart | 38 +++++++-------------- lib/telas/tela_perfil.dart | 55 ++++++++++++++++++------------ 2 files changed, 47 insertions(+), 46 deletions(-) diff --git a/lib/componentes/alert_default.dart b/lib/componentes/alert_default.dart index 5868133..d6a8c2c 100644 --- a/lib/componentes/alert_default.dart +++ b/lib/componentes/alert_default.dart @@ -1,11 +1,8 @@ import 'package:flutter/material.dart'; -import 'package:rkm_educa_app/utils/cores.dart'; -import 'package:rkm_educa_app/componentes/buttom_custom.dart'; -import 'package:rkm_educa_app/componentes/text_custom.dart'; import 'package:rkm_educa_app/utils/dimensoes.dart'; class AlertDefault{ - alert(BuildContext context,String title,String textButtom,Widget subtitle,double altura) { + alert(BuildContext context,double altura,Widget subtitle) { return showGeneralDialog( context: context, @@ -14,27 +11,18 @@ class AlertDefault{ barrierColor: Colors.black45, transitionDuration: const Duration(milliseconds: 200), pageBuilder: (BuildContext buildContext,Animation animation,Animation secondaryAnimation) { - return Container( - width: Dimensoes.width, - height: Dimensoes.height, - padding: EdgeInsets.all(20), - color: Colors.white, - child: Column( - mainAxisSize: MainAxisSize.min, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - subtitle, - ButtonCustom( - onPressed: ()=>Navigator.pop(context), - text: textButtom, - widthCustom: 0.2, - heightCustom: 0.05, - size: 14, - colorText: Colors.white, - colorBorder: PaletaCores.cinza, - colorButton: PaletaCores.cinza, - ) - ], + return Center( + child: Card( + elevation: 5, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(15.0), + ), + child: Container( + width: Dimensoes.width, + height: Dimensoes.height*altura, + padding: EdgeInsets.all(20), + child: subtitle, + ), ), ); }); diff --git a/lib/telas/tela_perfil.dart b/lib/telas/tela_perfil.dart index c75e8a4..76720ad 100644 --- a/lib/telas/tela_perfil.dart +++ b/lib/telas/tela_perfil.dart @@ -5,6 +5,7 @@ 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'; class TelaPerfil extends StatefulWidget { @@ -47,28 +48,40 @@ class _TelaPerfilState extends State { 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.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, + size: 14, + colorText: Colors.white, + colorBorder: PaletaCores.cinza, + colorButton: PaletaCores.cinza, + ) + ], + ), ), - 0.1 ), icon: Icon(Icons.visibility,color: PaletaCores.cinza), padding: EdgeInsets.all(0),