exibindo faltas na tela_faltas.dart
This commit is contained in:
40
lib/componentes/dropdown_disciplina.dart
Normal file
40
lib/componentes/dropdown_disciplina.dart
Normal file
@@ -0,0 +1,40 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:rkm_educa_prof_app/componentes/text_custom.dart';
|
||||
|
||||
import '../modelos/modelo_disciplina.dart';
|
||||
class DropdownDisciplina extends StatelessWidget {
|
||||
String titulo;
|
||||
ModeloDisciplina? seleciona;
|
||||
void Function(ModeloDisciplina?)? onChanged;
|
||||
List<DropdownMenuItem<ModeloDisciplina>> listDropDown;
|
||||
double hightLine;
|
||||
|
||||
DropdownDisciplina({
|
||||
required this.titulo,
|
||||
required this.seleciona,
|
||||
required this.onChanged,
|
||||
required this.listDropDown,
|
||||
required this.hightLine,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
height: hightLine,
|
||||
child: Row(
|
||||
children: [
|
||||
TextCustom(text: titulo,fontWeight: FontWeight.bold),
|
||||
SizedBox(width: 10,),
|
||||
DropdownButtonHideUnderline(
|
||||
child: DropdownButton<ModeloDisciplina>(
|
||||
hint: TextCustom(text: 'SELECIONE',size: 12.0,),
|
||||
value: seleciona,
|
||||
items: listDropDown,
|
||||
onChanged: onChanged,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
39
lib/componentes/dropdown_periodo.dart
Normal file
39
lib/componentes/dropdown_periodo.dart
Normal file
@@ -0,0 +1,39 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:rkm_educa_prof_app/componentes/text_custom.dart';
|
||||
import 'package:rkm_educa_prof_app/modelos/modelo_periodo.dart';
|
||||
class DropdownPeriodo extends StatelessWidget {
|
||||
String titulo;
|
||||
ModeloPeriodo? seleciona;
|
||||
void Function(ModeloPeriodo?)? onChanged;
|
||||
List<DropdownMenuItem<ModeloPeriodo>> itens;
|
||||
double hightLine;
|
||||
|
||||
DropdownPeriodo({
|
||||
required this.titulo,
|
||||
required this.seleciona,
|
||||
required this.itens,
|
||||
required this.onChanged,
|
||||
required this.hightLine,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
height: hightLine,
|
||||
child: Row(
|
||||
children: [
|
||||
TextCustom(text: titulo,fontWeight: FontWeight.bold),
|
||||
SizedBox(width: 10,),
|
||||
DropdownButtonHideUnderline(
|
||||
child: DropdownButton(
|
||||
hint: TextCustom(text: 'SELECIONE',size: 12.0,),
|
||||
value: seleciona,
|
||||
items: itens,
|
||||
onChanged: onChanged,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
46
lib/componentes/dropdown_turma.dart
Normal file
46
lib/componentes/dropdown_turma.dart
Normal file
@@ -0,0 +1,46 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:rkm_educa_prof_app/componentes/text_custom.dart';
|
||||
class DropdownTurma extends StatelessWidget {
|
||||
String titulo;
|
||||
String? seleciona;
|
||||
List itens;
|
||||
var onChanged;
|
||||
double hightLine;
|
||||
|
||||
DropdownTurma({
|
||||
required this.titulo,
|
||||
required this.seleciona,
|
||||
required this.itens,
|
||||
required this.onChanged,
|
||||
required this.hightLine,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
height: hightLine,
|
||||
child: Row(
|
||||
children: [
|
||||
TextCustom(text: titulo,fontWeight: FontWeight.bold),
|
||||
SizedBox(width: 10,),
|
||||
DropdownButtonHideUnderline(
|
||||
child: DropdownButton(
|
||||
hint: TextCustom(text: 'SELECIONE',size: 12.0,),
|
||||
value: seleciona,
|
||||
items: itens.map((value) => DropdownMenuItem(
|
||||
value: value,
|
||||
child: TextCustom(
|
||||
text: value,
|
||||
size: 12.0,
|
||||
color: Colors.black54,
|
||||
),
|
||||
)
|
||||
).toList(),
|
||||
onChanged: onChanged,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
106
lib/componentes/item_aluno_presenca.dart
Normal file
106
lib/componentes/item_aluno_presenca.dart
Normal file
@@ -0,0 +1,106 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:rkm_educa_prof_app/componentes/text_custom.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;
|
||||
|
||||
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,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
height: 40,
|
||||
child: Row(
|
||||
children: [
|
||||
Container(
|
||||
width: Dimensoes.width*0.6,
|
||||
child: TextCustom(text: 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
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
25
lib/componentes/item_subtitulo_texto.dart
Normal file
25
lib/componentes/item_subtitulo_texto.dart
Normal file
@@ -0,0 +1,25 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:rkm_educa_prof_app/componentes/text_custom.dart';
|
||||
|
||||
class ItemSubtituloTexto extends StatelessWidget {
|
||||
String titulo;
|
||||
String subtitulo;
|
||||
|
||||
ItemSubtituloTexto({
|
||||
required this.titulo,
|
||||
required this.subtitulo
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
height: 30,
|
||||
child: Row(
|
||||
children: [
|
||||
TextCustom(text: titulo,fontWeight: FontWeight.bold),
|
||||
TextCustom(text: subtitulo,size: 12.0,),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user