Files
rkm_educa_prof_app/lib/componentes/item_aluno_presenca.dart
2023-12-07 14:53:09 -03:00

92 lines
3.1 KiB
Dart

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 {
bool edit;
var onChanged1;
var onChanged2;
var onChanged3;
var onChanged4;
var onChanged5;
ModeloPresencaAluno aluno;
ItemAlunoPresenca({
required this.edit,
required this.onChanged1,
required this.onChanged2,
required this.onChanged3,
required this.onChanged4,
required this.onChanged5,
required this.aluno
});
@override
Widget build(BuildContext context) {
return Container(
height: 40,
child: Row(
children: [
Container(
width: Dimensoes.width*0.6,
child: TextCustom(text: aluno.NO_ALUNO,size: 12.0)
),
Spacer(),
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
),
),
],
),
],
),
);
}
}