exibindo faltas na tela_faltas.dart
This commit is contained in:
@@ -1,8 +1,23 @@
|
||||
import 'dart:convert';
|
||||
import 'package:flutter_calendar_carousel/classes/event.dart';
|
||||
import 'package:flutter_calendar_carousel/flutter_calendar_carousel.dart';
|
||||
import 'package:http/http.dart' as http;
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
import 'package:rkm_educa_prof_app/componentes/dropdown_turma.dart';
|
||||
import 'package:rkm_educa_prof_app/componentes/dropdown_disciplina.dart';
|
||||
import 'package:rkm_educa_prof_app/componentes/dropdown_periodo.dart';
|
||||
import 'package:rkm_educa_prof_app/componentes/item_aluno_presenca.dart';
|
||||
import 'package:rkm_educa_prof_app/componentes/snackBars.dart';
|
||||
import 'package:rkm_educa_prof_app/componentes/text_custom.dart';
|
||||
import 'package:rkm_educa_prof_app/modelos/modelo_periodo.dart';
|
||||
import 'package:rkm_educa_prof_app/modelos/modelo_presenca_aluno.dart';
|
||||
import '../componentes/appbar_custom.dart';
|
||||
import '../componentes/drawer_custom.dart';
|
||||
import '../componentes/item_subtitulo_texto.dart';
|
||||
import '../modelos/modelo_disciplina.dart';
|
||||
import '../utils/cores.dart';
|
||||
import '../utils/dimensoes.dart';
|
||||
|
||||
class TelaFaltas extends StatefulWidget {
|
||||
List dados;
|
||||
@@ -17,28 +32,479 @@ class TelaFaltas extends StatefulWidget {
|
||||
|
||||
class _TelaFaltasState extends State<TelaFaltas> {
|
||||
|
||||
List<ModeloDisciplina> disciplinas = [];
|
||||
List<ModeloPeriodo> periodos = [];
|
||||
List<ModeloPresencaAluno> alunos = [];
|
||||
List turmas = [];
|
||||
List tipoEnsino = [];
|
||||
ModeloDisciplina? selecionaDisciplina;
|
||||
String? selecionaTurma;
|
||||
ModeloPeriodo? selecionaPeriodo;
|
||||
int ID_TIPO_ENSINO = 0;
|
||||
int CD_DISCIPLINA = 0;
|
||||
int CD_SALA = 0;
|
||||
DateTime? DT_INICIAL;
|
||||
DateTime? DT_FINAL;
|
||||
bool exibirCalendario = false;
|
||||
DateTime dataAtual = DateTime.now();
|
||||
DateTime? _dataSelecionada;
|
||||
double hightLine = 40;
|
||||
int DIA_SEMANA = 0;
|
||||
bool edit = false;
|
||||
EventList<Event> _markedDateMap = new EventList<Event>(
|
||||
events: {},
|
||||
);
|
||||
|
||||
Widget _eventIcon(String dia,Color cor) => Container(
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(30),
|
||||
color: cor,
|
||||
),
|
||||
width: 40,
|
||||
height: 40,
|
||||
child: Center(
|
||||
child: TextCustom(text: dia,fontWeight: FontWeight.bold,size: 14.0,color: cor==Color(0xffee1d24)?Colors.white:PaletaCores.cinza),
|
||||
),
|
||||
);
|
||||
|
||||
buscarDisciplinas()async{
|
||||
print('ususario');
|
||||
print(widget.dados[8]);
|
||||
int ano = DateTime.now().year;
|
||||
final url = '${widget.dados[2]}/buscardisciplinasprof?USUARIO_SISTEMA=${widget.dados[8]}&CIDADE=${widget.dados[0]}&ANO=$ano';
|
||||
print('dados');
|
||||
print(widget.dados);
|
||||
final url = '${widget.dados[2]}/buscardisciplinasprof?USUARIO_SISTEMA=${widget.dados[8]}&CIDADE=${widget.dados[0]}&ANO=${DateTime.now().year}';
|
||||
print(url);
|
||||
final response = await http.get(Uri.parse(url));
|
||||
var map = json.decode(response.body);
|
||||
// print(map);
|
||||
List list = map;
|
||||
for(int i = 0; list.length > i; i++){
|
||||
tipoEnsino.add(list[i]['CD_TIPO_ENSINO']);
|
||||
disciplinas.add(
|
||||
ModeloDisciplina(
|
||||
CD_ANO_DISCIPLINA: list[i]['CD_ANO_DISCIPLINA'],
|
||||
CD_CAD_DIVERSO: list[i]['CD_CAD_DIVERSO'],
|
||||
CD_SALA: list[i]['CD_SALA'],
|
||||
CD_SERIE: list[i]['CD_SERIE'],
|
||||
ANO_ATRIBUICAO: list[i]['ANO_ATRIBUICAO'],
|
||||
CD_DISCIPLINA: list[i]['CD_DISCIPLINA'],
|
||||
CD_TIPO_ENSINO: list[i]['CD_TIPO_ENSINO'],
|
||||
DESCRICAO: list[i]['DESCRICAO'],
|
||||
ABREVIATURA: list[i]['ABREVIATURA'],
|
||||
TURMA: list[i]['TURMA'].toString().trim(),
|
||||
DESC_SERIE: list[i]['DESC_SERIE'].toString().trim(),
|
||||
GRAU: list[i]['GRAU'].toString().trim(),
|
||||
HR_INICIO: list[i]['GRAU'].toString().trim()
|
||||
)
|
||||
);
|
||||
turmas.add(
|
||||
'${disciplinas[i].GRAU} - ${disciplinas[i].DESC_SERIE} - ${disciplinas[i].TURMA} - ${disciplinas[i].HR_INICIO=='07:00:00'?'MANHA':'TARDE'}'
|
||||
);
|
||||
if(turmas.isNotEmpty){
|
||||
List duplicada = turmas.toSet().toList();
|
||||
turmas = duplicada;
|
||||
}
|
||||
}
|
||||
setState(() {});
|
||||
// print(disciplinas);
|
||||
}
|
||||
|
||||
buscarPediodoBimestral()async{
|
||||
final url = '${widget.dados[2]}/buscarperiodobimestral?CIDADE=${widget.dados[0]}';
|
||||
print(url);
|
||||
final response = await http.get(Uri.parse(url));
|
||||
var map = json.decode(response.body);
|
||||
// print(map);
|
||||
List list = map;
|
||||
for(int i = 0; list.length > i; i++){
|
||||
periodos.add(ModeloPeriodo(PERIODO: list[i]['PERIODO'], NO_PERIODO: list[i]['NO_PERIODO']));
|
||||
}
|
||||
setState(() {});
|
||||
}
|
||||
buscarPediodoDatas(String id)async{
|
||||
final url = '${widget.dados[2]}/buscarintervalodatas?ID_TIPO_ENSINO=${ID_TIPO_ENSINO}&ANO=${DateTime.now().year}-01-01&NR_SEQUENCIA=${id}&CIDADE=${widget.dados[0]}';
|
||||
print(url);
|
||||
final response = await http.get(Uri.parse(url));
|
||||
var map = json.decode(response.body);
|
||||
print(map);
|
||||
List list = map;
|
||||
if(list.isNotEmpty){
|
||||
for(int i = 0; list.length > i; i ++){
|
||||
if(list[i]['NO_TITULO'].toString().toUpperCase().trim() == 'BIMESTRE'){
|
||||
List dataListInicial = list[i]['DT_INICIAL'].toString().split('-');
|
||||
List dataListFinal = list[i]['DT_FINAL'].toString().split('-');
|
||||
int diaInicial = int.parse(dataListInicial[2]);
|
||||
int mesInicial = int.parse(dataListInicial[1]);
|
||||
int anoInicial = int.parse(dataListInicial[0]);
|
||||
|
||||
int diaFinal = int.parse(dataListFinal[2]);
|
||||
int mesFinal = int.parse(dataListFinal[1]);
|
||||
int anoFinal = int.parse(dataListFinal[0]);
|
||||
DT_INICIAL = DateTime(anoInicial,mesInicial,diaInicial);
|
||||
DT_FINAL = DateTime(anoFinal,mesFinal,diaFinal);
|
||||
dataAtual = DT_INICIAL!;
|
||||
setState(() {});
|
||||
}
|
||||
}
|
||||
print('INICIAL ${DT_INICIAL}');
|
||||
print('FINAL ${DT_FINAL}');
|
||||
}
|
||||
}
|
||||
|
||||
buscarGrade(int CD_SALA, int CD_DISCIPLINA)async{
|
||||
final url = '${widget.dados[2]}/buscargrade?CD_SALA=${CD_SALA}&CD_DISCIPLINA=${CD_DISCIPLINA}&CIDADE=${widget.dados[0]}';
|
||||
print(url);
|
||||
final response = await http.get(Uri.parse(url));
|
||||
List map = json.decode(response.body);
|
||||
if(map.isNotEmpty){
|
||||
print(map);
|
||||
List diasSemana = [];
|
||||
List semana = ['DOMINGO', 'SEGUNDAS', 'TERÇAS', 'QUARTAS', 'QUINTAS', 'SEXTAS', 'SÁBADOS'];
|
||||
for(int i = 0; map.length > i; i ++){
|
||||
diasSemana.add(map[i]['DIA_SEMANA']);
|
||||
}
|
||||
if(!diasSemana.contains(DIA_SEMANA)){
|
||||
_dataSelecionada = null;
|
||||
_markedDateMap.clear();
|
||||
showSnackBar(context, 'ESSA AULA É AS ${semana[diasSemana[0]]}!', Colors.red);
|
||||
}else{
|
||||
if(_dataSelecionada!=null){
|
||||
buscarchamadasrealizadas(CD_SALA,CD_DISCIPLINA);
|
||||
}else{
|
||||
showSnackBar(context, 'Selecione uma data!', Colors.red);
|
||||
}
|
||||
}
|
||||
}
|
||||
setState(() {});
|
||||
}
|
||||
|
||||
buscarchamadasrealizadas(int CD_SALA,int CD_DISCIPLINA)async{
|
||||
String dia = _dataSelecionada!.day.toString();
|
||||
String mes = _dataSelecionada!.month.toString();
|
||||
String ano = _dataSelecionada!.year.toString();
|
||||
|
||||
final url = '${widget.dados[2]}/buscarchamadasrealizadas?CD_SALA=${CD_SALA}&CD_DISCIPLINA=${CD_DISCIPLINA}&DATA=$ano-$mes-$dia&CIDADE=${widget.dados[0]}';
|
||||
print(url);
|
||||
final response = await http.get(Uri.parse(url));
|
||||
List map = json.decode(response.body);
|
||||
print(map);
|
||||
if(map.isNotEmpty){
|
||||
alunos.clear();
|
||||
for(int i = 0; map.length > i; i++){
|
||||
|
||||
int indexAluno = alunos.indexWhere((aluno) => aluno.CD_MATRICULA == map[i]['CD_MATRICULA']);
|
||||
|
||||
if(indexAluno == -1){
|
||||
alunos.add(
|
||||
ModeloPresencaAluno(
|
||||
DT_DIARIO_CLASSE: map[i]['DT_DIARIO_CLASSE'],
|
||||
CD_MATRICULA: map[i]['CD_MATRICULA'],
|
||||
CD_ALUNO: map[i]['CD_ALUNO'],
|
||||
NO_ALUNO: map[i]['NO_ALUNO'],
|
||||
NR_TURMA: map[i]['NR_TURMA'],
|
||||
CD_DISCIPLINA: map[i]['CD_DISCIPLINA'],
|
||||
CD_AULA1: map[i]['CD_AULA'] == 1?1:0,
|
||||
CD_AULA2: map[i]['CD_AULA'] == 2?2:0,
|
||||
CD_AULA3: map[i]['CD_AULA'] == 3?3:0,
|
||||
CD_AULA4: map[i]['CD_AULA'] == 4?4:0,
|
||||
CD_AULA5: map[i]['CD_AULA'] == 5?5:0,
|
||||
FL_PRESENTE_AUSENTE1: map[i]['FL_PRESENTE_AUSENTE'].toString().toUpperCase()=='A' && map[i]['CD_AULA'] == 1?true:false,
|
||||
FL_PRESENTE_AUSENTE2: map[i]['FL_PRESENTE_AUSENTE'].toString().toUpperCase()=='A' && map[i]['CD_AULA'] == 2?true:false,
|
||||
FL_PRESENTE_AUSENTE3: map[i]['FL_PRESENTE_AUSENTE'].toString().toUpperCase()=='A' && map[i]['CD_AULA'] == 3?true:false,
|
||||
FL_PRESENTE_AUSENTE4: map[i]['FL_PRESENTE_AUSENTE'].toString().toUpperCase()=='A' && map[i]['CD_AULA'] == 4?true:false,
|
||||
FL_PRESENTE_AUSENTE5: map[i]['FL_PRESENTE_AUSENTE'].toString().toUpperCase()=='A' && map[i]['CD_AULA'] == 5?true:false,
|
||||
)
|
||||
);
|
||||
}else{
|
||||
if(map[i]['CD_AULA'] == 1){
|
||||
alunos[indexAluno].CD_AULA1 = 1;
|
||||
alunos[indexAluno].FL_PRESENTE_AUSENTE1 = map[i]['FL_PRESENTE_AUSENTE'].toString().toUpperCase()=='A'?true:false;
|
||||
}else if(map[i]['CD_AULA'] == 2){
|
||||
alunos[indexAluno].CD_AULA2 = 2;
|
||||
alunos[indexAluno].FL_PRESENTE_AUSENTE2 = map[i]['FL_PRESENTE_AUSENTE'].toString().toUpperCase()=='A'?true:false;
|
||||
}else if(map[i]['CD_AULA'] == 3){
|
||||
alunos[indexAluno].CD_AULA3 = 3;
|
||||
alunos[indexAluno].FL_PRESENTE_AUSENTE3 = map[i]['FL_PRESENTE_AUSENTE'].toString().toUpperCase()=='A'?true:false;
|
||||
}else if(map[i]['CD_AULA'] == 4){
|
||||
alunos[indexAluno].CD_AULA4 = 4;
|
||||
alunos[indexAluno].FL_PRESENTE_AUSENTE4 = map[i]['FL_PRESENTE_AUSENTE'].toString().toUpperCase()=='A'?true:false;
|
||||
}else if(map[i]['CD_AULA'] == 5){
|
||||
alunos[indexAluno].CD_AULA5 = 5;
|
||||
alunos[indexAluno].FL_PRESENTE_AUSENTE5 = map[i]['FL_PRESENTE_AUSENTE'].toString().toUpperCase()=='A'?true:false;
|
||||
}
|
||||
}
|
||||
}
|
||||
print('alunos : ${alunos.length}');
|
||||
}else{
|
||||
print('chamada não realizada');
|
||||
showSnackBar(context, 'Chamada não foi realizada nesta data!', Colors.red);
|
||||
}
|
||||
setState(() {});
|
||||
}
|
||||
|
||||
atualizarData(DateTime date, List<Event> events){
|
||||
_markedDateMap.clear();
|
||||
_markedDateMap.add(
|
||||
date,
|
||||
Event(
|
||||
date: date,
|
||||
icon: _eventIcon(date.day.toString(),Colors.indigo)
|
||||
)
|
||||
);
|
||||
|
||||
alunos.clear();
|
||||
selecionaDisciplina = null;
|
||||
_dataSelecionada = date;
|
||||
DIA_SEMANA = date.weekday;
|
||||
setState(() {});
|
||||
events.forEach((event) => print(event.title));
|
||||
print(_dataSelecionada);
|
||||
}
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
buscarDisciplinas();
|
||||
buscarPediodoBimestral();
|
||||
}
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
||||
TextStyle textStyle = TextStyle(
|
||||
color: PaletaCores.cinza,
|
||||
fontWeight: FontWeight.bold,
|
||||
fontFamily: 'Nunito',
|
||||
fontSize: 14
|
||||
);
|
||||
|
||||
TextStyle textStyleFDS = TextStyle(
|
||||
color: Colors.red,
|
||||
fontWeight: FontWeight.bold,
|
||||
fontFamily: 'Nunito',
|
||||
fontSize: 14
|
||||
);
|
||||
|
||||
final _calendario = CalendarCarousel<Event>(
|
||||
locale: 'pt',
|
||||
weekdayTextStyle: TextStyle(color: PaletaCores.cinza,fontSize: 14,fontFamily: 'Nunito',),
|
||||
daysTextStyle: textStyle,
|
||||
selectedDayButtonColor: Colors.indigo,
|
||||
weekendTextStyle: textStyleFDS,
|
||||
markedDatesMap: _markedDateMap,
|
||||
height: Dimensoes.height*0.45,
|
||||
targetDateTime: dataAtual,
|
||||
markedDateCustomTextStyle: textStyle,
|
||||
markedDateMoreShowTotal: null,
|
||||
showHeader: false,
|
||||
todayTextStyle: textStyle,
|
||||
isScrollable: false,
|
||||
todayButtonColor: Colors.green,
|
||||
selectedDayTextStyle: textStyle,
|
||||
minSelectedDate: DT_INICIAL,
|
||||
maxSelectedDate: DT_FINAL,
|
||||
markedDateIconBuilder: (event){
|
||||
return event.icon;
|
||||
},
|
||||
selectedDateTime: _dataSelecionada,
|
||||
onDayPressed: (DateTime date, List<Event> events) {
|
||||
atualizarData(date!,events);
|
||||
},
|
||||
);
|
||||
|
||||
return Scaffold(
|
||||
appBar: AppBarCustom().appbar(context, 'LANÇAMENTO DE FALTAS'),
|
||||
drawer: DrawerCustom(dados: widget.dados,),
|
||||
body: Center(child: Text('faltas'),),
|
||||
floatingActionButton: edit?Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
CircleAvatar(
|
||||
backgroundColor: Colors.red,
|
||||
child: IconButton(
|
||||
icon: Icon(Icons.clear,color: Colors.white,),
|
||||
onPressed: (){
|
||||
setState(()=>edit=false);
|
||||
buscarGrade(CD_SALA,CD_DISCIPLINA);
|
||||
}
|
||||
),
|
||||
),
|
||||
SizedBox(width: 10,),
|
||||
CircleAvatar(
|
||||
backgroundColor: PaletaCores.verdeCalendario,
|
||||
child: IconButton(
|
||||
icon: Icon(Icons.check,color: Colors.white,),
|
||||
onPressed: ()=> setState(()=>edit=false)
|
||||
)
|
||||
),
|
||||
],
|
||||
):CircleAvatar(
|
||||
backgroundColor: Colors.deepOrangeAccent,
|
||||
child: IconButton(
|
||||
icon: Icon(Icons.edit, color: Colors.white),
|
||||
onPressed: ()=> setState(()=>edit=true)
|
||||
),
|
||||
),
|
||||
body: exibirCalendario?Container(
|
||||
child: ListView(
|
||||
children: [
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
IconButton(
|
||||
onPressed: (){
|
||||
if(DT_INICIAL!.month < dataAtual.month){
|
||||
dataAtual = DateTime(dataAtual.year, dataAtual.month -1);
|
||||
setState(() {});
|
||||
}
|
||||
},
|
||||
icon: Icon(Icons.arrow_left,size: 30,color: PaletaCores.cinzaClaro,)
|
||||
),
|
||||
TextCustom(text: DateFormat('MMMM / yyyy','pt_Br').format(dataAtual),fontWeight: FontWeight.bold),
|
||||
IconButton(
|
||||
onPressed: (){
|
||||
if(DT_FINAL!.month > dataAtual.month){
|
||||
dataAtual = DateTime(dataAtual.year, dataAtual.month +1);
|
||||
setState(() {});
|
||||
}
|
||||
},
|
||||
icon: Icon(Icons.arrow_right,size: 30,color: PaletaCores.cinzaClaro,)
|
||||
),
|
||||
],
|
||||
),
|
||||
_calendario,
|
||||
Center(child: TextButton(
|
||||
style: TextButton.styleFrom(
|
||||
backgroundColor: PaletaCores.verdeCalendario,
|
||||
),
|
||||
onPressed: ()=>setState(()=>exibirCalendario = false),
|
||||
child: TextCustom(text: 'SELECIONAR', color: Colors.white, size: 10.0),
|
||||
),)
|
||||
],
|
||||
),
|
||||
):ListView(
|
||||
padding: EdgeInsets.all(20),
|
||||
children: [
|
||||
ItemSubtituloTexto(titulo:'Escola: ',subtitulo: widget.dados[3]),
|
||||
ItemSubtituloTexto(titulo:'Tipo Falta: ',subtitulo: 'AULA'),
|
||||
DropdownTurma(
|
||||
titulo: 'Turma: ',
|
||||
seleciona: selecionaTurma,
|
||||
itens: turmas,
|
||||
hightLine: hightLine,
|
||||
onChanged:edit?null: (value){
|
||||
selecionaTurma = value!.toString();
|
||||
selecionaDisciplina = null;
|
||||
selecionaPeriodo = null;
|
||||
int index = turmas.indexOf(selecionaTurma);
|
||||
ID_TIPO_ENSINO = tipoEnsino[index];
|
||||
_dataSelecionada = null;
|
||||
alunos.clear();
|
||||
setState(() {});
|
||||
},
|
||||
),
|
||||
selecionaTurma==null?Container():DropdownPeriodo(
|
||||
titulo: 'Período: ',
|
||||
seleciona: selecionaPeriodo,
|
||||
hightLine: hightLine,
|
||||
itens: periodos.map((value) => DropdownMenuItem<ModeloPeriodo>(
|
||||
value: value,
|
||||
child: TextCustom(
|
||||
text: value.NO_PERIODO,
|
||||
size: 12.0,
|
||||
color: Colors.black54,
|
||||
),
|
||||
)
|
||||
).toList(),
|
||||
onChanged:edit?null: (ModeloPeriodo? value){
|
||||
selecionaPeriodo = value;
|
||||
_dataSelecionada = null;
|
||||
alunos.clear();
|
||||
buscarPediodoDatas(value!.PERIODO);
|
||||
setState(() {});
|
||||
},
|
||||
),
|
||||
selecionaTurma ==null || selecionaPeriodo== null?Container(): Container(
|
||||
height: hightLine,
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
TextCustom(text: 'Data: ',fontWeight: FontWeight.bold),
|
||||
SizedBox(width: 10,),
|
||||
_dataSelecionada!= null?GestureDetector(
|
||||
onTap:edit?null: ()=>setState(()=>exibirCalendario = true),
|
||||
child: Container(
|
||||
child: TextCustom(text: DateFormat('dd/MM/yyyy', 'pt_BR').format(_dataSelecionada!),size: 12.0,),
|
||||
),
|
||||
):Container(),
|
||||
IconButton(
|
||||
onPressed:edit?null: ()=>setState(()=>exibirCalendario = true),
|
||||
icon: Icon(Icons.calendar_month,size: 25)
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
selecionaTurma==null || selecionaPeriodo== null || _dataSelecionada== null?Container():
|
||||
DropdownDisciplina(
|
||||
titulo: 'Disciplina: ',
|
||||
seleciona: selecionaDisciplina,
|
||||
hightLine: hightLine,
|
||||
listDropDown: disciplinas.map((value) => DropdownMenuItem<ModeloDisciplina>(
|
||||
value: value,
|
||||
child: TextCustom(
|
||||
text: value.DESCRICAO,
|
||||
size: 12.0,
|
||||
color: Colors.black54,
|
||||
),
|
||||
)
|
||||
).toList(),
|
||||
onChanged:edit?null: (ModeloDisciplina? value){
|
||||
alunos.clear();
|
||||
selecionaDisciplina = value;
|
||||
print('CD_DISCIPLINA : '+ value!.CD_DISCIPLINA.toString());
|
||||
print('CD_SALA : '+ value!.CD_SALA.toString());
|
||||
CD_DISCIPLINA = value!.CD_DISCIPLINA;
|
||||
CD_SALA = value!.CD_SALA;
|
||||
buscarGrade(value!.CD_SALA,value!.CD_DISCIPLINA);
|
||||
setState(() {});
|
||||
},
|
||||
),
|
||||
alunos.isEmpty?Container():Container(
|
||||
child: Row(
|
||||
children: [
|
||||
TextCustom(text: 'ESTUDANTE',size: 12.0, fontWeight: FontWeight.bold),
|
||||
Spacer(),
|
||||
TextCustom(text: 'FALTAS AULA',size: 12.0, fontWeight: FontWeight.bold),
|
||||
],
|
||||
),
|
||||
),
|
||||
alunos.isEmpty?Container():Container(
|
||||
height: Dimensoes.height*0.55,
|
||||
child: ListView.builder(
|
||||
itemCount: alunos.length,
|
||||
itemBuilder: (context, index){
|
||||
return ItemAlunoPresenca(
|
||||
NO_ALUNO: alunos[index].NO_ALUNO,
|
||||
edit: edit,
|
||||
CD_AULA1: alunos[index].CD_AULA1,
|
||||
CD_AULA2: alunos[index].CD_AULA2,
|
||||
CD_AULA3: alunos[index].CD_AULA3,
|
||||
CD_AULA4: alunos[index].CD_AULA4,
|
||||
CD_AULA5: alunos[index].CD_AULA5,
|
||||
FL_PRESENTE_AUSENTE1: alunos[index].FL_PRESENTE_AUSENTE1,
|
||||
FL_PRESENTE_AUSENTE2: alunos[index].FL_PRESENTE_AUSENTE2,
|
||||
FL_PRESENTE_AUSENTE3: alunos[index].FL_PRESENTE_AUSENTE3,
|
||||
FL_PRESENTE_AUSENTE4: alunos[index].FL_PRESENTE_AUSENTE4,
|
||||
FL_PRESENTE_AUSENTE5: alunos[index].FL_PRESENTE_AUSENTE5,
|
||||
onChanged1: (value)=>setState(()=>alunos[index].FL_PRESENTE_AUSENTE1 = value!),
|
||||
onChanged2: (value)=>setState(()=>alunos[index].FL_PRESENTE_AUSENTE2 = value!),
|
||||
onChanged3: (value)=>setState(()=>alunos[index].FL_PRESENTE_AUSENTE3 = value!),
|
||||
onChanged4: (value)=>setState(()=>alunos[index].FL_PRESENTE_AUSENTE4 = value!),
|
||||
onChanged5: (value)=>setState(()=>alunos[index].FL_PRESENTE_AUSENTE5 = value!)
|
||||
);
|
||||
},
|
||||
),
|
||||
)
|
||||
],
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user