exibido dados da Carteira do Aluno
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.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/appbar_custom.dart';
|
||||||
import 'package:rkm_educa_app/componentes/drawer_custom.dart';
|
import 'package:rkm_educa_app/componentes/drawer_custom.dart';
|
||||||
import 'package:rkm_educa_app/componentes/snackBars.dart';
|
import 'package:rkm_educa_app/componentes/snackBars.dart';
|
||||||
@@ -26,6 +27,7 @@ class _TelaPasseState extends State<TelaPasse> {
|
|||||||
|
|
||||||
List dadosPasse=[];
|
List dadosPasse=[];
|
||||||
List dadosFrequncia = [];
|
List dadosFrequncia = [];
|
||||||
|
List dadosCarteira = [];
|
||||||
bool carregando = true;
|
bool carregando = true;
|
||||||
String dataNasc = '';
|
String dataNasc = '';
|
||||||
String dataEmissao = '';
|
String dataEmissao = '';
|
||||||
@@ -71,21 +73,21 @@ class _TelaPasseState extends State<TelaPasse> {
|
|||||||
dadosFrequncia = [
|
dadosFrequncia = [
|
||||||
{'DIA':1,'PRESENTE':0},
|
{'DIA':1,'PRESENTE':0},
|
||||||
{'DIA':2,'PRESENTE':0},
|
{'DIA':2,'PRESENTE':0},
|
||||||
{'DIA':3,'PRESENTE':1},
|
{'DIA':3,'PRESENTE':0},
|
||||||
{'DIA':4,'PRESENTE':1},
|
{'DIA':4,'PRESENTE':0},
|
||||||
{'DIA':5,'PRESENTE':1},
|
{'DIA':5,'PRESENTE':0},
|
||||||
{'DIA':6,'PRESENTE':0},
|
{'DIA':6,'PRESENTE':0},
|
||||||
{'DIA':7,'PRESENTE':0},
|
{'DIA':7,'PRESENTE':0},
|
||||||
{'DIA':8,'PRESENTE':1},
|
{'DIA':8,'PRESENTE':0},
|
||||||
{'DIA':9,'PRESENTE':1},
|
{'DIA':9,'PRESENTE':0},
|
||||||
{'DIA':10,'PRESENTE':1},
|
{'DIA':10,'PRESENTE':0},
|
||||||
{'DIA':11,'PRESENTE':1},
|
{'DIA':11,'PRESENTE':0},
|
||||||
{'DIA':12,'PRESENTE':1},
|
{'DIA':12,'PRESENTE':0},
|
||||||
{'DIA':13,'PRESENTE':1},
|
{'DIA':13,'PRESENTE':0},
|
||||||
{'DIA':14,'PRESENTE':1},
|
{'DIA':14,'PRESENTE':0},
|
||||||
{'DIA':15,'PRESENTE':1},
|
{'DIA':15,'PRESENTE':0},
|
||||||
{'DIA':16,'PRESENTE':1},
|
{'DIA':16,'PRESENTE':0},
|
||||||
{'DIA':17,'PRESENTE':1},
|
{'DIA':17,'PRESENTE':0},
|
||||||
{'DIA':18,'PRESENTE':0},
|
{'DIA':18,'PRESENTE':0},
|
||||||
{'DIA':19,'PRESENTE':0},
|
{'DIA':19,'PRESENTE':0},
|
||||||
{'DIA':20,'PRESENTE':0},
|
{'DIA':20,'PRESENTE':0},
|
||||||
@@ -108,6 +110,7 @@ class _TelaPasseState extends State<TelaPasse> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
getCarteira()async{
|
getCarteira()async{
|
||||||
|
dadosCarteira.clear();
|
||||||
carregando = true;
|
carregando = true;
|
||||||
setState(() {});
|
setState(() {});
|
||||||
String teste_passe = '4E275A169EA2432E949FF90DF8D2CF10';
|
String teste_passe = '4E275A169EA2432E949FF90DF8D2CF10';
|
||||||
@@ -116,10 +119,223 @@ class _TelaPasseState extends State<TelaPasse> {
|
|||||||
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);
|
||||||
List list = map;
|
dadosCarteira = map;
|
||||||
print(list);
|
print(dadosCarteira);
|
||||||
carregando = false;
|
carregando = false;
|
||||||
setState(() {});
|
setState(() {});
|
||||||
|
AlertDefault().alert(
|
||||||
|
context, Dimensoes.height*0.8,
|
||||||
|
SafeArea(
|
||||||
|
child: Center(
|
||||||
|
child: Column(
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
alignment: Alignment.topCenter,
|
||||||
|
width: 378,
|
||||||
|
height: 270,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
border: Border.all(width: 2.0)
|
||||||
|
),
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
width: 124,
|
||||||
|
height: 159,
|
||||||
|
alignment: Alignment.center,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
border: Border.all(width: 2.0)
|
||||||
|
),
|
||||||
|
child: TextCustom(text: '3x4',size: 12.0,fontWeight: FontWeight.bold,color: Colors.black,),
|
||||||
|
),
|
||||||
|
Column(
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
width: 235,
|
||||||
|
height: 65,
|
||||||
|
alignment: Alignment.center,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
border: Border.all(width: 2.0)
|
||||||
|
),
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
width: 53,
|
||||||
|
height: 49,
|
||||||
|
child: Image.asset('assets/images/logo_carteirinha_${widget.estudanteModelo.cidade.toLowerCase()}.png'),
|
||||||
|
),
|
||||||
|
TextCustom(text: widget.estudanteModelo.cidade,size: 16.0,fontWeight: FontWeight.bold,color: Colors.black,),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
width: 235,
|
||||||
|
height: 20,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
border: Border.all(width: 2.0)
|
||||||
|
),
|
||||||
|
child: TextCustom(text: '1ª Via - Transporte Escolar',size: 12.0,fontWeight: FontWeight.bold,color: Colors.black,),
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
width: 235,
|
||||||
|
height: 20,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
border: Border.all(width: 2.0)
|
||||||
|
),
|
||||||
|
child: TextCustom(text: 'RA: ${dadosCarteira[0]['NR_RA']}',size: 12.0,fontWeight: FontWeight.bold,color: Colors.black,),
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
width: 235,
|
||||||
|
height: 54,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
border: Border.all(width: 2.0)
|
||||||
|
),
|
||||||
|
child: TextCustom(text: 'Nome: ${dadosCarteira[0]['NO_ALUNO']}',size: 12.0,fontWeight: FontWeight.bold,color: Colors.black),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
width: 373,
|
||||||
|
height: 27.5,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
border: Border.all(width: 2.0)
|
||||||
|
),
|
||||||
|
child: TextCustom(text: ' Endereço: ${dadosCarteira[0]['NO_LOGRADOURO']}, ${dadosCarteira[0]['NR_LOGRADOURO']}, ${dadosCarteira[0]['DESC_BAIRRO']}',size: 12.0,fontWeight: FontWeight.bold,color: Colors.black,),
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
width: 373,
|
||||||
|
height: 26.5,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
border: Border.all(width: 2.0)
|
||||||
|
),
|
||||||
|
child: TextCustom(
|
||||||
|
text: ' Fone: (${dadosCarteira[0]['NR_DDD_TELEFONE']}) ${dadosCarteira[0]['NR_TELEFONE']} Escola: ${dadosCarteira[0]['NO_FANTASIA']}',
|
||||||
|
size: 12.0,fontWeight: FontWeight.bold,color: Colors.black,),
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
width: 373,
|
||||||
|
height: 26.5,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
border: Border.all(width: 2.0)
|
||||||
|
),
|
||||||
|
child: TextCustom(
|
||||||
|
text: ' Celular: (${dadosCarteira[0]['NR_DDD_CELULAR']}) ${dadosCarteira[0]['NR_CELULAR']} Validade: ${dadosCarteira[0]['VALIDADE_CARTEIRINHA']} CEAC: ${dadosCarteira[0]['CEAC'].toString().trim()=='N'?'NÃO':'SIM'}',
|
||||||
|
size: 12.0,fontWeight: FontWeight.bold,color: Colors.black,),
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
width: 373,
|
||||||
|
height: 26.5,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
border: Border.all(width: 2.0)
|
||||||
|
),
|
||||||
|
child: TextCustom(text: ' Tipo Transp.: ${dadosCarteira[0]['FL_TIPO_TRANSPORTE'].toString().trim()=='R'?'TRANSPORTE MUNICIPAL':'TRANSPORTE INTERMUNICIPAL'}',size: 12.0,fontWeight: FontWeight.bold,color: Colors.black,),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
width: 378,
|
||||||
|
height: 270,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
border: Border.all(width: 4.0)
|
||||||
|
),
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
Column(
|
||||||
|
children: [
|
||||||
|
SizedBox(height: 14,),
|
||||||
|
Container(
|
||||||
|
width: 212,
|
||||||
|
height: 60,
|
||||||
|
child: TextCustom(
|
||||||
|
text:'Respeite a orientação do condutor do veículo, pois ele é seu amigo. Obrigatória apresentação desta identificação, diariamente.',
|
||||||
|
maxLines: 4,
|
||||||
|
size: 12.0,
|
||||||
|
textAlign: TextAlign.justify,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
color: Colors.black,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(height: 12,),
|
||||||
|
Container(
|
||||||
|
width: 211,
|
||||||
|
height: 45,
|
||||||
|
child: TextCustom(
|
||||||
|
text:'Casos de insubordinação serão comunicados aos pais e estarão sujeitos a advertência.',
|
||||||
|
maxLines: 3,
|
||||||
|
size: 12.0,
|
||||||
|
textAlign: TextAlign.justify,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
color: Colors.black,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(height: 70,),
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.symmetric(horizontal: 5),
|
||||||
|
width: 211,
|
||||||
|
height: 2,
|
||||||
|
color: Colors.black,
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
width: 211,
|
||||||
|
height: 45,
|
||||||
|
child: TextCustom(
|
||||||
|
text:'Coordenadoria de Educação',
|
||||||
|
maxLines: 3,
|
||||||
|
size: 12.0,
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
color: Colors.black,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
Column(
|
||||||
|
children: [
|
||||||
|
SizedBox(height: 14,),
|
||||||
|
Container(
|
||||||
|
width: 132,
|
||||||
|
height: 112,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
border: Border.all(width: 2.0)
|
||||||
|
),
|
||||||
|
child: TextCustom(text: 'Ano:', size: 12.0,color: Colors.black,fontWeight: FontWeight.bold),
|
||||||
|
),
|
||||||
|
SizedBox(height: 14,),
|
||||||
|
Container(
|
||||||
|
width: 132,
|
||||||
|
height: 112,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
border: Border.all(width: 2.0)
|
||||||
|
),
|
||||||
|
child: TextCustom(text: 'Ano:', size: 12.0,color: Colors.black,fontWeight: FontWeight.bold),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Spacer(),
|
||||||
|
ButtonCustom(
|
||||||
|
text: 'Voltar',
|
||||||
|
fontsize: 14.0,
|
||||||
|
colorBorder: PaletaCores.cinzaClaro,
|
||||||
|
colorButton: PaletaCores.cinzaClaro,
|
||||||
|
colorText: Colors.white,
|
||||||
|
widthCustom: 0.25,
|
||||||
|
heightCustom: 0.05,
|
||||||
|
onPressed: ()=>Navigator.of(context).pop(),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|||||||
Reference in New Issue
Block a user