salvas novas notas no banco na tela_notas.dart e ajustado a tela_faltas.dart
This commit is contained in:
64
lib/componentes/item_aluno_nota.dart
Normal file
64
lib/componentes/item_aluno_nota.dart
Normal file
@@ -0,0 +1,64 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:rkm_educa_prof_app/componentes/text_custom.dart';
|
||||
import 'package:rkm_educa_prof_app/modelos/modelo_nota_aluno.dart';
|
||||
import '../modelos/modelo_presenca_aluno.dart';
|
||||
import '../utils/cores.dart';
|
||||
import '../utils/dimensoes.dart';
|
||||
|
||||
class ItemAlunoNota extends StatelessWidget {
|
||||
|
||||
bool edit;
|
||||
var onChanged;
|
||||
ModeloNotaAluno aluno;
|
||||
|
||||
ItemAlunoNota({
|
||||
required this.edit,
|
||||
required this.onChanged,
|
||||
required this.aluno
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
Container(
|
||||
width: 30,
|
||||
child: TextCustom(text: aluno.NR_TURMA,size: 12.0, fontWeight: FontWeight.bold)),
|
||||
TextCustom(text: aluno.NO_ALUNO,size: 12.0, fontWeight: FontWeight.bold),
|
||||
Spacer(),
|
||||
aluno.STATUS!='MATRICULADO'?
|
||||
Container(
|
||||
margin: EdgeInsets.symmetric(vertical: 5),
|
||||
child: TextCustom(text: 'TRANSFERIDO', size: 12.0, fontWeight: FontWeight.bold,color: Colors.red,)):
|
||||
Container(
|
||||
margin: EdgeInsets.symmetric(vertical: 5),
|
||||
color: PaletaCores.cinzaInput,
|
||||
width: 50,
|
||||
height: 25,
|
||||
child: TextFormField(
|
||||
enabled: edit,
|
||||
inputFormatters: [
|
||||
FilteringTextInputFormatter.digitsOnly,
|
||||
],
|
||||
controller: aluno.NOTA,
|
||||
keyboardType: TextInputType.numberWithOptions(decimal: true),
|
||||
decoration: InputDecoration(
|
||||
border: OutlineInputBorder(
|
||||
borderSide: BorderSide(width: 1, color: Colors.black12),
|
||||
),
|
||||
),
|
||||
onChanged: onChanged,
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
aluno.AVISO==''?Container()
|
||||
:TextCustom(text: aluno.AVISO,fontWeight: FontWeight.bold, color: Colors.red,textAlign: TextAlign.start,)
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user