salvas novas chamadas no banco na tela_faltas.dart

This commit is contained in:
Reginaldo
2023-12-07 14:53:09 -03:00
parent 3a5b2bdb44
commit 7fe3a16aef
21 changed files with 456 additions and 144 deletions

View File

@@ -1,46 +1,27 @@
import 'package:flutter/material.dart';
import 'package:rkm_educa_prof_app/componentes/text_custom.dart';
import '../modelos/modelo_presenca_aluno.dart';
import '../utils/cores.dart';
import '../utils/dimensoes.dart';
class ItemAlunoPresenca extends StatelessWidget {
String NO_ALUNO;
bool edit;
int CD_AULA1;
int CD_AULA2;
int CD_AULA3;
int CD_AULA4;
int CD_AULA5;
bool FL_PRESENTE_AUSENTE1;
bool FL_PRESENTE_AUSENTE2;
bool FL_PRESENTE_AUSENTE3;
bool FL_PRESENTE_AUSENTE4;
bool FL_PRESENTE_AUSENTE5;
var onChanged1;
var onChanged2;
var onChanged3;
var onChanged4;
var onChanged5;
ModeloPresencaAluno aluno;
ItemAlunoPresenca({
required this.NO_ALUNO,
required this.edit,
required this.CD_AULA1,
required this.CD_AULA2,
required this.CD_AULA3,
required this.CD_AULA4,
required this.CD_AULA5,
required this.FL_PRESENTE_AUSENTE1,
required this.FL_PRESENTE_AUSENTE2,
required this.FL_PRESENTE_AUSENTE3,
required this.FL_PRESENTE_AUSENTE4,
required this.FL_PRESENTE_AUSENTE5,
required this.onChanged1,
required this.onChanged2,
required this.onChanged3,
required this.onChanged4,
required this.onChanged5,
required this.aluno
});
@override
@@ -51,53 +32,57 @@ class ItemAlunoPresenca extends StatelessWidget {
children: [
Container(
width: Dimensoes.width*0.6,
child: TextCustom(text: NO_ALUNO,size: 12.0)
child: TextCustom(text: aluno.NO_ALUNO,size: 12.0)
),
Spacer(),
CD_AULA1==0?Container():TextCustom(text: '${CD_AULA1}ª',size: 15.0),
CD_AULA1==0?Container():Container(
width: 25,
child: Checkbox(
value: FL_PRESENTE_AUSENTE1,
activeColor: PaletaCores.cinzaEscuro,
onChanged:!edit?null:onChanged1
),
),
CD_AULA2==0?Container():TextCustom(text: '${CD_AULA2}ª',size: 15.0),
CD_AULA2==0?Container():Container(
width: 25,
child: Checkbox(
value: FL_PRESENTE_AUSENTE2,
activeColor: PaletaCores.cinzaEscuro,
onChanged:!edit?null: onChanged2
),
),
CD_AULA3==0?Container():TextCustom(text: '${CD_AULA3}ª',size: 15.0),
CD_AULA3==0?Container():Container(
width: 25,
child: Checkbox(
value: FL_PRESENTE_AUSENTE3,
activeColor: PaletaCores.cinzaEscuro,
onChanged:!edit?null:onChanged3
),
),
CD_AULA4==0?Container():TextCustom(text: '${CD_AULA4}ª',size: 15.0),
CD_AULA4==0?Container():Container(
width: 25,
child: Checkbox(
value: FL_PRESENTE_AUSENTE4,
activeColor: PaletaCores.cinzaEscuro,
onChanged:!edit?null:onChanged4
),
),
CD_AULA5==0?Container():TextCustom(text: '${CD_AULA5}ª',size: 15.0),
CD_AULA5==0?Container():Container(
width: 25,
child: Checkbox(
value: FL_PRESENTE_AUSENTE5,
activeColor: PaletaCores.cinzaEscuro,
onChanged:!edit?null:onChanged5
),
aluno.STATUS!='MATRICULADO'?TextCustom(text: 'TRANSFERIDO', size: 12.0, fontWeight: FontWeight.bold,color: Colors.red,):Row(
children: [
aluno.CD_AULA1==0?Container():TextCustom(text: '${aluno.CD_AULA1}ª',size: 15.0),
aluno.CD_AULA1==0?Container():Container(
width: 25,
child: Checkbox(
value: aluno.FL_PRESENTE_AUSENTE1,
activeColor: PaletaCores.cinzaEscuro,
onChanged:!edit?null:onChanged1
),
),
aluno.CD_AULA2==0?Container():TextCustom(text: '${aluno.CD_AULA2}ª',size: 15.0),
aluno.CD_AULA2==0?Container():Container(
width: 25,
child: Checkbox(
value: aluno.FL_PRESENTE_AUSENTE2,
activeColor: PaletaCores.cinzaEscuro,
onChanged:!edit?null: onChanged2
),
),
aluno.CD_AULA3==0?Container():TextCustom(text: '${aluno.CD_AULA3}ª',size: 15.0),
aluno.CD_AULA3==0?Container():Container(
width: 25,
child: Checkbox(
value: aluno.FL_PRESENTE_AUSENTE3,
activeColor: PaletaCores.cinzaEscuro,
onChanged:!edit?null:onChanged3
),
),
aluno.CD_AULA4==0?Container():TextCustom(text: '${aluno.CD_AULA4}ª',size: 15.0),
aluno.CD_AULA4==0?Container():Container(
width: 25,
child: Checkbox(
value: aluno.FL_PRESENTE_AUSENTE4,
activeColor: PaletaCores.cinzaEscuro,
onChanged:!edit?null:onChanged4
),
),
aluno.CD_AULA5==0?Container():TextCustom(text: '${aluno.CD_AULA5}ª',size: 15.0),
aluno.CD_AULA5==0?Container():Container(
width: 25,
child: Checkbox(
value: aluno.FL_PRESENTE_AUSENTE5,
activeColor: PaletaCores.cinzaEscuro,
onChanged:!edit?null:onChanged5
),
),
],
),
],
),