criada a tela responsible_register_screen.dart, o model responsavel_model.dart e feitos outros ajustes
This commit is contained in:
@@ -9,11 +9,8 @@ class ButtonCustom extends StatelessWidget{
|
||||
final Color colorBorder;
|
||||
final widthCustom;
|
||||
final heightCustom;
|
||||
final font;
|
||||
|
||||
const ButtonCustom(
|
||||
{Key? key,
|
||||
required this.font,
|
||||
ButtonCustom({
|
||||
required this.onPressed,
|
||||
required this.text,
|
||||
required this.size,
|
||||
@@ -22,7 +19,7 @@ class ButtonCustom extends StatelessWidget{
|
||||
required this.colorBorder,
|
||||
this.widthCustom = 1.0,
|
||||
this.heightCustom = 1.0
|
||||
}) : super(key: key);
|
||||
});
|
||||
@override
|
||||
Widget build (BuildContext context) {
|
||||
double width =MediaQuery.of(context).size.width;
|
||||
@@ -33,16 +30,14 @@ class ButtonCustom extends StatelessWidget{
|
||||
primary: colorButton,
|
||||
minimumSize: Size(width*widthCustom! , height*heightCustom!),
|
||||
side: BorderSide(width: 2,color : colorBorder,),
|
||||
|
||||
|
||||
),
|
||||
onPressed: onPressed,
|
||||
child: Text(text,
|
||||
style: TextStyle(fontFamily: font, color: colorText,
|
||||
fontSize: size,fontWeight: FontWeight.bold
|
||||
style: TextStyle(
|
||||
color: colorText,
|
||||
fontSize: size,
|
||||
fontWeight: FontWeight.bold
|
||||
),
|
||||
|
||||
|
||||
) ,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import 'package:educa_controle_acesso/models/aluno_model.dart';
|
||||
import 'package:educa_controle_acesso/screens/responsible_register_screen.dart';
|
||||
import 'package:educa_controle_acesso/widgets/text_custom.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import '../utils/colors.dart';
|
||||
@@ -13,37 +14,45 @@ class DadosAlunosContainer extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
padding: EdgeInsets.symmetric(vertical: 10,horizontal: 5),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
TextCustom(
|
||||
text: 'Nome: '+alunoModel.nome,
|
||||
color: PaletteColors.grey,
|
||||
size: 20,
|
||||
),
|
||||
TextCustom(
|
||||
text: 'Data de Nascimento: '+alunoModel.data_nasc,
|
||||
return InkWell(
|
||||
onTap: (){
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(builder: (context) => ResponsibleRegisterScreen(alunoModel: alunoModel)),
|
||||
);
|
||||
},
|
||||
child: Container(
|
||||
padding: EdgeInsets.symmetric(vertical: 10,horizontal: 5),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
TextCustom(
|
||||
text: 'Nome: '+alunoModel.nome,
|
||||
color: PaletteColors.grey,
|
||||
size: 20,
|
||||
),
|
||||
TextCustom(
|
||||
text: 'Data de Nascimento: '+alunoModel.data_nasc,
|
||||
color: PaletteColors.grey,
|
||||
size: 15,
|
||||
),
|
||||
TextCustom(
|
||||
text: 'RA: '+alunoModel.ra,
|
||||
color: PaletteColors.grey,
|
||||
size: 15,
|
||||
),
|
||||
TextCustom(
|
||||
text: 'RA: '+alunoModel.ra,
|
||||
color: PaletteColors.grey,
|
||||
size: 15,
|
||||
),
|
||||
TextCustom(
|
||||
text: 'Turma: '+alunoModel.serie+'° ANO '+alunoModel.turma,
|
||||
color: PaletteColors.grey,
|
||||
size: 15,
|
||||
),
|
||||
TextCustom(
|
||||
text: 'Escola: '+alunoModel.escola,
|
||||
color: PaletteColors.grey,
|
||||
size: 15,
|
||||
),
|
||||
],
|
||||
),
|
||||
TextCustom(
|
||||
text: 'Turma: '+alunoModel.serie+'° ANO '+alunoModel.turma,
|
||||
color: PaletteColors.grey,
|
||||
size: 15,
|
||||
),
|
||||
TextCustom(
|
||||
text: 'Escola: '+alunoModel.escola,
|
||||
color: PaletteColors.grey,
|
||||
size: 15,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
46
lib/widgets/dados_responsaveis_container.dart
Normal file
46
lib/widgets/dados_responsaveis_container.dart
Normal file
@@ -0,0 +1,46 @@
|
||||
import 'package:educa_controle_acesso/models/aluno_model.dart';
|
||||
import 'package:educa_controle_acesso/models/responsavel_model.dart';
|
||||
import 'package:educa_controle_acesso/screens/responsible_register_screen.dart';
|
||||
import 'package:educa_controle_acesso/widgets/text_custom.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import '../utils/colors.dart';
|
||||
|
||||
class DadosResponsaveisContainer extends StatelessWidget {
|
||||
|
||||
ResponsavelModel responsavelModel;
|
||||
var onTapEdit;
|
||||
var onTapDelete;
|
||||
|
||||
DadosResponsaveisContainer({
|
||||
required this.responsavelModel,
|
||||
required this.onTapEdit,
|
||||
required this.onTapDelete
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
||||
double width = MediaQuery.of(context).size.width;
|
||||
|
||||
return InkWell(
|
||||
onTap: onTapEdit,
|
||||
child: Row(
|
||||
children: [
|
||||
IconButton(
|
||||
onPressed:onTapDelete,
|
||||
icon: Icon(Icons.delete,color: PaletteColors.grey,),
|
||||
),
|
||||
Container(
|
||||
width: width*0.15,
|
||||
padding: EdgeInsets.symmetric(vertical: 10,horizontal: 5),
|
||||
child: TextCustom(
|
||||
text: '${responsavelModel.nomeResponsavel}, ${responsavelModel.parentesco}',
|
||||
color: PaletteColors.grey,
|
||||
size: 15,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -12,6 +12,8 @@ class InputText extends StatelessWidget {
|
||||
int maxLines;
|
||||
Color colorBorder;
|
||||
var onChanged;
|
||||
bool enable;
|
||||
List<TextInputFormatter> inputFormatters;
|
||||
|
||||
InputText({
|
||||
required this.controller,
|
||||
@@ -23,6 +25,8 @@ class InputText extends StatelessWidget {
|
||||
this.maxLines = 1,
|
||||
this.colorBorder = PaletteColors.grey,
|
||||
this.onChanged = null,
|
||||
this.enable = true,
|
||||
required this.inputFormatters
|
||||
});
|
||||
|
||||
@override
|
||||
@@ -32,11 +36,13 @@ class InputText extends StatelessWidget {
|
||||
width: width,
|
||||
margin: EdgeInsets.only(bottom: 5),
|
||||
child: TextFormField(
|
||||
inputFormatters: inputFormatters,
|
||||
keyboardType: textInputType,
|
||||
maxLines: maxLines,
|
||||
onChanged: onChanged,
|
||||
obscureText: this.obscure,
|
||||
controller: this.controller,
|
||||
enabled: enable,
|
||||
style: TextStyle(
|
||||
color: Colors.black,
|
||||
fontSize: this.fontSize,
|
||||
|
||||
@@ -14,7 +14,7 @@ class TextCustom extends StatelessWidget {
|
||||
TextCustom({
|
||||
required this.text,
|
||||
this.size = 16.0,
|
||||
this.color = PaletteColors.primaryColor,
|
||||
this.color = PaletteColors.grey,
|
||||
this.fontWeight = FontWeight.normal,
|
||||
this.textAlign = TextAlign.start,
|
||||
this.maxLines = 1,
|
||||
|
||||
Reference in New Issue
Block a user