ajustes nos dados do contatos
This commit is contained in:
@@ -2,39 +2,41 @@ 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,) {
|
||||
alert(BuildContext context,String title,String textButtom,Widget subtitle,double altura) {
|
||||
|
||||
double width = MediaQuery.of(context).size.width;
|
||||
double height = MediaQuery.of(context).size.height;
|
||||
|
||||
return showDialog(
|
||||
return showGeneralDialog(
|
||||
context: context,
|
||||
builder: (context){
|
||||
return AlertDialog(
|
||||
title: TextCustom(
|
||||
text: title,
|
||||
color: Colors.black54,
|
||||
textAlign: TextAlign.center,
|
||||
fontWeight: FontWeight.bold,
|
||||
barrierDismissible: true,
|
||||
barrierLabel: MaterialLocalizations.of(context).modalBarrierDismissLabel,
|
||||
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,
|
||||
)
|
||||
],
|
||||
),
|
||||
content: subtitle,
|
||||
actions: [
|
||||
ButtonCustom(
|
||||
onPressed: ()=>Navigator.pop(context),
|
||||
text: textButtom,
|
||||
widthCustom: 0.2,
|
||||
heightCustom: 0.05,
|
||||
size: 14,
|
||||
colorText: Colors.white,
|
||||
colorBorder: PaletaCores.cinza,
|
||||
colorButton: PaletaCores.cinza,
|
||||
)
|
||||
],
|
||||
actionsAlignment: MainAxisAlignment.center,
|
||||
);
|
||||
}
|
||||
);
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -9,7 +9,6 @@ class TextCustom extends StatelessWidget {
|
||||
final fontWeight;
|
||||
final textAlign;
|
||||
final maxLines;
|
||||
final underscore;
|
||||
|
||||
TextCustom({
|
||||
required this.text,
|
||||
@@ -18,7 +17,6 @@ class TextCustom extends StatelessWidget {
|
||||
this.fontWeight = FontWeight.normal,
|
||||
this.textAlign = TextAlign.start,
|
||||
this.maxLines = 1,
|
||||
this.underscore,
|
||||
});
|
||||
|
||||
@override
|
||||
@@ -32,9 +30,9 @@ class TextCustom extends StatelessWidget {
|
||||
color: color,
|
||||
fontSize: size,
|
||||
fontWeight: fontWeight,
|
||||
decoration: underscore,
|
||||
decorationThickness: 4,
|
||||
fontFamily: 'Nunito'
|
||||
fontFamily: 'Nunito',
|
||||
decoration: TextDecoration.none
|
||||
),
|
||||
maxLines: maxLines,
|
||||
);
|
||||
|
||||
@@ -5,13 +5,17 @@ class EstudanteModelo{
|
||||
String escola;
|
||||
int idade;
|
||||
int anoEscolar;
|
||||
var dados;
|
||||
int nroAluno;
|
||||
|
||||
EstudanteModelo({
|
||||
required this.nome,
|
||||
required this.foto,
|
||||
required this.ra,
|
||||
required this.escola,
|
||||
required this.idade,
|
||||
required this.anoEscolar,
|
||||
required this.nome,
|
||||
required this.foto,
|
||||
required this.ra,
|
||||
required this.escola,
|
||||
required this.idade,
|
||||
required this.anoEscolar,
|
||||
required this.dados,
|
||||
required this.nroAluno
|
||||
});
|
||||
}
|
||||
@@ -25,11 +25,20 @@ class _TelaContatosState extends State<TelaContatos> {
|
||||
padding: EdgeInsets.all(30),
|
||||
child: ListView(
|
||||
children: [
|
||||
ItemModelo(texto: 'José Oliveira', titulo: 'Diretor(a)'),
|
||||
ItemModelo(texto: 'Luiz Araújo', titulo: 'Coordenador(a)'),
|
||||
ItemModelo(texto: '', titulo: 'Telefones :'),
|
||||
ItemModelo(texto: 'Coordenação - (15) 3275 - 1234', titulo: ''),
|
||||
ItemModelo(texto: 'Secretaria - (15) 3275 - 1234', titulo: ''),
|
||||
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.55),
|
||||
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,),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
@@ -64,7 +64,7 @@ class _TelaLoginState extends State<TelaLogin> {
|
||||
status = 'CARREGANDO ESTUDANTE(S) ...';
|
||||
});
|
||||
showSnackBar(context, 'Acesso validado', Colors.green);
|
||||
print(map['PARENTESCO']);
|
||||
//print(map['PARENTESCO']);
|
||||
buscaFilhos(map['NOME'],map['PARENTESCO']);
|
||||
}else{
|
||||
setState(() {
|
||||
@@ -78,7 +78,7 @@ class _TelaLoginState extends State<TelaLogin> {
|
||||
buscaFilhos(String nome,String parentesco)async{
|
||||
String q = nome.replaceAll(' ', '%20').toUpperCase();
|
||||
final url = 'http://192.168.18.2:8000/buscafilhos?NOME=$q&PARENTESCO=${parentesco.replaceAll("Ã", 'A').replaceAll('ã', 'a')}';
|
||||
print(url);
|
||||
//print(url);
|
||||
final response = await http.get(Uri.parse(url));
|
||||
var map = json.decode(response.body);
|
||||
|
||||
@@ -109,7 +109,9 @@ class _TelaLoginState extends State<TelaLogin> {
|
||||
ra: listAlunos[0]['NR_RA'],
|
||||
escola: listAlunos[0]['NO_FANTASIA']=='' || listAlunos[0]['NO_FANTASIA']==null?listAlunos[0]['NO_RAZAO_SOCIAL']:listAlunos[0]['NO_FANTASIA'],
|
||||
idade: idade,
|
||||
anoEscolar: DateTime.now().year
|
||||
anoEscolar: DateTime.now().year,
|
||||
dados: listAlunos,
|
||||
nroAluno: 0
|
||||
);
|
||||
Navigator.pushReplacement(context,MaterialPageRoute(builder: (context) => TelaSituacaoEscolar(estudanteModelo: estudanteModelo!)));
|
||||
}else{
|
||||
|
||||
@@ -52,13 +52,23 @@ class _TelaPerfilState extends State<TelaPerfil> {
|
||||
Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
ItemModelo(texto: 'José Oliveira', titulo: 'Diretor(a)',widthCustom: 0.5),
|
||||
ItemModelo(texto: 'Luiz Araújo', titulo: 'Coordenador(a)',widthCustom: 0.4),
|
||||
ItemModelo(texto: '', titulo: 'Tefelones:',widthCustom: 0.5),
|
||||
ItemModelo(texto: 'Coordenação - (15) 3275 - 1234', titulo: ''),
|
||||
ItemModelo(texto: 'Secretaroa - (15) 3275 - 1234', titulo: ''),
|
||||
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),
|
||||
|
||||
@@ -25,7 +25,7 @@ class _TelaSelecionaFilhoState extends State<TelaSelecionaFilho> {
|
||||
List <EstudanteModelo>listAlunos = [];
|
||||
|
||||
carregarAlunos(){
|
||||
print(widget.listAlunos);
|
||||
//print(widget.listAlunos);
|
||||
|
||||
for(int i=0; widget.listAlunos.length>i;i++){
|
||||
print(widget.listAlunos[i]['NO_ALUNO']);
|
||||
@@ -51,7 +51,9 @@ class _TelaSelecionaFilhoState extends State<TelaSelecionaFilho> {
|
||||
ra: widget.listAlunos[i]['NR_RA'],
|
||||
escola: widget.listAlunos[i]['NO_FANTASIA']=='' || widget.listAlunos[i]['NO_FANTASIA']==null?widget.listAlunos[i]['NO_RAZAO_SOCIAL']:widget.listAlunos[i]['NO_FANTASIA'],
|
||||
idade: idade,
|
||||
anoEscolar: DateTime.now().year
|
||||
anoEscolar: DateTime.now().year,
|
||||
dados: widget.listAlunos,
|
||||
nroAluno: i
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user