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/utils/cores.dart';
|
||||||
import 'package:rkm_educa_app/componentes/buttom_custom.dart';
|
import 'package:rkm_educa_app/componentes/buttom_custom.dart';
|
||||||
import 'package:rkm_educa_app/componentes/text_custom.dart';
|
import 'package:rkm_educa_app/componentes/text_custom.dart';
|
||||||
|
import 'package:rkm_educa_app/utils/dimensoes.dart';
|
||||||
|
|
||||||
class AlertDefault{
|
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;
|
return showGeneralDialog(
|
||||||
double height = MediaQuery.of(context).size.height;
|
|
||||||
|
|
||||||
return showDialog(
|
|
||||||
context: context,
|
context: context,
|
||||||
builder: (context){
|
barrierDismissible: true,
|
||||||
return AlertDialog(
|
barrierLabel: MaterialLocalizations.of(context).modalBarrierDismissLabel,
|
||||||
title: TextCustom(
|
barrierColor: Colors.black45,
|
||||||
text: title,
|
transitionDuration: const Duration(milliseconds: 200),
|
||||||
color: Colors.black54,
|
pageBuilder: (BuildContext buildContext,Animation animation,Animation secondaryAnimation) {
|
||||||
textAlign: TextAlign.center,
|
return Container(
|
||||||
fontWeight: FontWeight.bold,
|
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 fontWeight;
|
||||||
final textAlign;
|
final textAlign;
|
||||||
final maxLines;
|
final maxLines;
|
||||||
final underscore;
|
|
||||||
|
|
||||||
TextCustom({
|
TextCustom({
|
||||||
required this.text,
|
required this.text,
|
||||||
@@ -18,7 +17,6 @@ class TextCustom extends StatelessWidget {
|
|||||||
this.fontWeight = FontWeight.normal,
|
this.fontWeight = FontWeight.normal,
|
||||||
this.textAlign = TextAlign.start,
|
this.textAlign = TextAlign.start,
|
||||||
this.maxLines = 1,
|
this.maxLines = 1,
|
||||||
this.underscore,
|
|
||||||
});
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@@ -32,9 +30,9 @@ class TextCustom extends StatelessWidget {
|
|||||||
color: color,
|
color: color,
|
||||||
fontSize: size,
|
fontSize: size,
|
||||||
fontWeight: fontWeight,
|
fontWeight: fontWeight,
|
||||||
decoration: underscore,
|
|
||||||
decorationThickness: 4,
|
decorationThickness: 4,
|
||||||
fontFamily: 'Nunito'
|
fontFamily: 'Nunito',
|
||||||
|
decoration: TextDecoration.none
|
||||||
),
|
),
|
||||||
maxLines: maxLines,
|
maxLines: maxLines,
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -5,13 +5,17 @@ class EstudanteModelo{
|
|||||||
String escola;
|
String escola;
|
||||||
int idade;
|
int idade;
|
||||||
int anoEscolar;
|
int anoEscolar;
|
||||||
|
var dados;
|
||||||
|
int nroAluno;
|
||||||
|
|
||||||
EstudanteModelo({
|
EstudanteModelo({
|
||||||
required this.nome,
|
required this.nome,
|
||||||
required this.foto,
|
required this.foto,
|
||||||
required this.ra,
|
required this.ra,
|
||||||
required this.escola,
|
required this.escola,
|
||||||
required this.idade,
|
required this.idade,
|
||||||
required this.anoEscolar,
|
required this.anoEscolar,
|
||||||
|
required this.dados,
|
||||||
|
required this.nroAluno
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -25,11 +25,20 @@ class _TelaContatosState extends State<TelaContatos> {
|
|||||||
padding: EdgeInsets.all(30),
|
padding: EdgeInsets.all(30),
|
||||||
child: ListView(
|
child: ListView(
|
||||||
children: [
|
children: [
|
||||||
ItemModelo(texto: 'José Oliveira', titulo: 'Diretor(a)'),
|
widget.estudanteModelo.dados[widget.estudanteModelo.nroAluno]['TX_DIRETOR']==''
|
||||||
ItemModelo(texto: 'Luiz Araújo', titulo: 'Coordenador(a)'),
|
?Container()
|
||||||
ItemModelo(texto: '', titulo: 'Telefones :'),
|
:ItemModelo(texto: widget.estudanteModelo.dados[widget.estudanteModelo.nroAluno]['TX_DIRETOR'], titulo: 'Diretor(a)',widthCustom: 0.65),
|
||||||
ItemModelo(texto: 'Coordenação - (15) 3275 - 1234', titulo: ''),
|
widget.estudanteModelo.dados[widget.estudanteModelo.nroAluno]['TX_VICE_DIRETOR']==''?Container()
|
||||||
ItemModelo(texto: 'Secretaria - (15) 3275 - 1234', titulo: ''),
|
: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) ...';
|
status = 'CARREGANDO ESTUDANTE(S) ...';
|
||||||
});
|
});
|
||||||
showSnackBar(context, 'Acesso validado', Colors.green);
|
showSnackBar(context, 'Acesso validado', Colors.green);
|
||||||
print(map['PARENTESCO']);
|
//print(map['PARENTESCO']);
|
||||||
buscaFilhos(map['NOME'],map['PARENTESCO']);
|
buscaFilhos(map['NOME'],map['PARENTESCO']);
|
||||||
}else{
|
}else{
|
||||||
setState(() {
|
setState(() {
|
||||||
@@ -78,7 +78,7 @@ class _TelaLoginState extends State<TelaLogin> {
|
|||||||
buscaFilhos(String nome,String parentesco)async{
|
buscaFilhos(String nome,String parentesco)async{
|
||||||
String q = nome.replaceAll(' ', '%20').toUpperCase();
|
String q = nome.replaceAll(' ', '%20').toUpperCase();
|
||||||
final url = 'http://192.168.18.2:8000/buscafilhos?NOME=$q&PARENTESCO=${parentesco.replaceAll("Ã", 'A').replaceAll('ã', 'a')}';
|
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));
|
final response = await http.get(Uri.parse(url));
|
||||||
var map = json.decode(response.body);
|
var map = json.decode(response.body);
|
||||||
|
|
||||||
@@ -109,7 +109,9 @@ class _TelaLoginState extends State<TelaLogin> {
|
|||||||
ra: listAlunos[0]['NR_RA'],
|
ra: listAlunos[0]['NR_RA'],
|
||||||
escola: listAlunos[0]['NO_FANTASIA']=='' || listAlunos[0]['NO_FANTASIA']==null?listAlunos[0]['NO_RAZAO_SOCIAL']:listAlunos[0]['NO_FANTASIA'],
|
escola: listAlunos[0]['NO_FANTASIA']=='' || listAlunos[0]['NO_FANTASIA']==null?listAlunos[0]['NO_RAZAO_SOCIAL']:listAlunos[0]['NO_FANTASIA'],
|
||||||
idade: idade,
|
idade: idade,
|
||||||
anoEscolar: DateTime.now().year
|
anoEscolar: DateTime.now().year,
|
||||||
|
dados: listAlunos,
|
||||||
|
nroAluno: 0
|
||||||
);
|
);
|
||||||
Navigator.pushReplacement(context,MaterialPageRoute(builder: (context) => TelaSituacaoEscolar(estudanteModelo: estudanteModelo!)));
|
Navigator.pushReplacement(context,MaterialPageRoute(builder: (context) => TelaSituacaoEscolar(estudanteModelo: estudanteModelo!)));
|
||||||
}else{
|
}else{
|
||||||
|
|||||||
@@ -52,13 +52,23 @@ class _TelaPerfilState extends State<TelaPerfil> {
|
|||||||
Column(
|
Column(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
ItemModelo(texto: 'José Oliveira', titulo: 'Diretor(a)',widthCustom: 0.5),
|
widget.estudanteModelo.dados[widget.estudanteModelo.nroAluno]['TX_DIRETOR']==''
|
||||||
ItemModelo(texto: 'Luiz Araújo', titulo: 'Coordenador(a)',widthCustom: 0.4),
|
?Container()
|
||||||
ItemModelo(texto: '', titulo: 'Tefelones:',widthCustom: 0.5),
|
:ItemModelo(texto: widget.estudanteModelo.dados[widget.estudanteModelo.nroAluno]['TX_DIRETOR'], titulo: 'Diretor(a)',widthCustom: 0.65),
|
||||||
ItemModelo(texto: 'Coordenação - (15) 3275 - 1234', titulo: ''),
|
widget.estudanteModelo.dados[widget.estudanteModelo.nroAluno]['TX_VICE_DIRETOR']==''?Container()
|
||||||
ItemModelo(texto: 'Secretaroa - (15) 3275 - 1234', titulo: ''),
|
: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),
|
icon: Icon(Icons.visibility,color: PaletaCores.cinza),
|
||||||
padding: EdgeInsets.all(0),
|
padding: EdgeInsets.all(0),
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ class _TelaSelecionaFilhoState extends State<TelaSelecionaFilho> {
|
|||||||
List <EstudanteModelo>listAlunos = [];
|
List <EstudanteModelo>listAlunos = [];
|
||||||
|
|
||||||
carregarAlunos(){
|
carregarAlunos(){
|
||||||
print(widget.listAlunos);
|
//print(widget.listAlunos);
|
||||||
|
|
||||||
for(int i=0; widget.listAlunos.length>i;i++){
|
for(int i=0; widget.listAlunos.length>i;i++){
|
||||||
print(widget.listAlunos[i]['NO_ALUNO']);
|
print(widget.listAlunos[i]['NO_ALUNO']);
|
||||||
@@ -51,7 +51,9 @@ class _TelaSelecionaFilhoState extends State<TelaSelecionaFilho> {
|
|||||||
ra: widget.listAlunos[i]['NR_RA'],
|
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'],
|
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,
|
idade: idade,
|
||||||
anoEscolar: DateTime.now().year
|
anoEscolar: DateTime.now().year,
|
||||||
|
dados: widget.listAlunos,
|
||||||
|
nroAluno: i
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user