ajustes de layout
This commit is contained in:
@@ -13,7 +13,7 @@ class MyApp extends StatelessWidget {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return MaterialApp(
|
return MaterialApp(
|
||||||
debugShowCheckedModeBanner: false,
|
debugShowCheckedModeBanner: false,
|
||||||
title: 'Controle de Acesso',
|
title: 'CONTROLE DE ACESSO',
|
||||||
home: LoginScreen(),
|
home: LoginScreen(),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ import 'package:educa_controle_acesso/utils/colors.dart';
|
|||||||
import 'package:educa_controle_acesso/widgets/input_text.dart';
|
import 'package:educa_controle_acesso/widgets/input_text.dart';
|
||||||
import 'package:educa_controle_acesso/widgets/text_custom.dart';
|
import 'package:educa_controle_acesso/widgets/text_custom.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
import '../models/aluno_model.dart';
|
import '../models/aluno_model.dart';
|
||||||
|
import '../widgets/buttom_custom.dart';
|
||||||
import '../widgets/dados_alunos_container.dart';
|
import '../widgets/dados_alunos_container.dart';
|
||||||
|
|
||||||
class HomeScreen extends StatefulWidget {
|
class HomeScreen extends StatefulWidget {
|
||||||
@@ -18,10 +18,18 @@ class _HomeScreenState extends State<HomeScreen> {
|
|||||||
var controllerPesquisa = TextEditingController();
|
var controllerPesquisa = TextEditingController();
|
||||||
List<AlunoModel> alunos = [];
|
List<AlunoModel> alunos = [];
|
||||||
List resultadoPesquisa = [];
|
List resultadoPesquisa = [];
|
||||||
|
bool filtroEstudante = false;
|
||||||
|
bool filtroData = false;
|
||||||
|
bool filtroRA = false;
|
||||||
|
bool filtroSerie = false;
|
||||||
|
bool filtroTurma = false;
|
||||||
|
bool filtroEscola = false;
|
||||||
|
|
||||||
carregarAlunos(){
|
carregarAlunos(){
|
||||||
alunos.add(AlunoModel(nome: 'Maria da Silva', data_nasc: '01/01/2010', ra: '000.000.000-8', escola: 'EMEI Profª Therezinha de Jesus Alguz', serie: '8', turma: 'A'));
|
alunos=[
|
||||||
alunos.add(AlunoModel(nome: 'Pedro Costa Almeida', data_nasc: '01/01/2015', ra: '111.111.111-5', escola: 'EMEI Profª Enestina Loureiro Miranda', serie: '7', turma: 'C'));
|
AlunoModel(nome: 'Maria da Silva', data_nasc: '01/01/2010', ra: '000.000.000-8', escola: 'EMEI Profª Therezinha de Jesus Alguz', serie: '8', turma: 'A'),
|
||||||
|
AlunoModel(nome: 'Pedro Costa Almeida', data_nasc: '01/01/2015', ra: '111.111.111-5', escola: 'EMEI Profª Enestina Loureiro Miranda', serie: '7', turma: 'C')
|
||||||
|
];
|
||||||
pesquisarAluno();
|
pesquisarAluno();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -47,8 +55,14 @@ class _HomeScreenState extends State<HomeScreen> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
for(int i = 0;i<10;i++){
|
if(alunos.length<10){
|
||||||
resultadoPesquisa.add(alunos[i]);
|
for(int i = 0;i<alunos.length;i++){
|
||||||
|
resultadoPesquisa.add(alunos[i]);
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
for(int i = 0;i<10;i++){
|
||||||
|
resultadoPesquisa.add(alunos[i]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
setState(() {});
|
setState(() {});
|
||||||
@@ -74,7 +88,7 @@ class _HomeScreenState extends State<HomeScreen> {
|
|||||||
Container(
|
Container(
|
||||||
child: Image.asset("assets/images/logoEduca.png",width:width * 0.08,height: height * 0.12)
|
child: Image.asset("assets/images/logoEduca.png",width:width * 0.08,height: height * 0.12)
|
||||||
),
|
),
|
||||||
TextCustom(text: '- Pesquisar aluno',color: Colors.white,),
|
TextCustom(text: '- PESQUISAR ALUNO',color: Colors.white,),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
backgroundColor: PaletteColors.grey,
|
backgroundColor: PaletteColors.grey,
|
||||||
@@ -85,20 +99,169 @@ class _HomeScreenState extends State<HomeScreen> {
|
|||||||
children: [
|
children: [
|
||||||
SizedBox(height: height*0.05),
|
SizedBox(height: height*0.05),
|
||||||
Padding(
|
Padding(
|
||||||
padding: EdgeInsets.symmetric(horizontal: width>900?width*0.3:width*0.05),
|
padding: EdgeInsets.symmetric(horizontal: width>900?width*0.15:width*0.05),
|
||||||
child: InputText(controller: controllerPesquisa, width: width*0.2,title: 'Pesquisar Aluno(a)',inputFormatters: [],)
|
child: Row(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
InputText(
|
||||||
|
hint: 'Pesquisar por estudante, RA ou data de nascimento'.toUpperCase(),
|
||||||
|
controller: controllerPesquisa,
|
||||||
|
width: width*0.25,
|
||||||
|
inputFormatters: [],
|
||||||
|
fontSize: 12,
|
||||||
|
colorBackground: Colors.white,
|
||||||
|
),
|
||||||
|
ButtonCustom(
|
||||||
|
widthCustom: 0.05,
|
||||||
|
heightCustom: 0.063,
|
||||||
|
text: "LIMPAR",
|
||||||
|
size: 10.0,
|
||||||
|
colorText: PaletteColors.white,
|
||||||
|
colorButton: PaletteColors.primaryColor,
|
||||||
|
colorBorder: PaletteColors.primaryColor,
|
||||||
|
onPressed: ()=>setState(()=>controllerPesquisa.clear()),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
)
|
||||||
),
|
),
|
||||||
Container(
|
Container(
|
||||||
padding: EdgeInsets.symmetric(horizontal: width>900?width*0.3:width*0.05),
|
margin: EdgeInsets.symmetric(vertical: 20),
|
||||||
|
padding: EdgeInsets.symmetric(horizontal: width>900?width*0.15:width*0.05),
|
||||||
|
width: width,
|
||||||
|
alignment: Alignment.center,
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
width: width*0.2,
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
TextCustom(text: 'ESTUDANTE',size: 12,fontWeight: FontWeight.bold,color: Colors.black87,),
|
||||||
|
IconButton(
|
||||||
|
icon: Icon(filtroEstudante?Icons.arrow_drop_up:Icons.arrow_drop_down,color: filtroEstudante?PaletteColors.primaryColor:PaletteColors.grey,),
|
||||||
|
onPressed: ()=>setState((){
|
||||||
|
filtroEstudante?filtroEstudante=false:filtroEstudante=true;
|
||||||
|
filtroData = false;
|
||||||
|
filtroRA = false;
|
||||||
|
filtroSerie = false;
|
||||||
|
filtroTurma = false;
|
||||||
|
filtroEscola = false;
|
||||||
|
}),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
)
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
width: width*0.1,
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
TextCustom(text: 'DATA DE NASCIMENTO',size: 12,fontWeight: FontWeight.bold,color: Colors.black87,),
|
||||||
|
IconButton(
|
||||||
|
icon: Icon(filtroData?Icons.arrow_drop_up:Icons.arrow_drop_down,color: filtroData?PaletteColors.primaryColor:PaletteColors.grey,),
|
||||||
|
onPressed: ()=>setState((){
|
||||||
|
filtroData?filtroData=false:filtroData=true;
|
||||||
|
filtroEstudante = false;
|
||||||
|
filtroRA = false;
|
||||||
|
filtroSerie = false;
|
||||||
|
filtroTurma = false;
|
||||||
|
filtroEscola = false;
|
||||||
|
}),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
)
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
width: width*0.08,
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
TextCustom(text: 'RA',size: 12,fontWeight: FontWeight.bold,color: Colors.black87,),
|
||||||
|
IconButton(
|
||||||
|
icon: Icon(filtroRA?Icons.arrow_drop_up:Icons.arrow_drop_down,color: filtroRA?PaletteColors.primaryColor:PaletteColors.grey,),
|
||||||
|
onPressed: ()=>setState((){
|
||||||
|
filtroRA?filtroRA=false:filtroRA=true;
|
||||||
|
filtroData = false;
|
||||||
|
filtroEstudante = false;
|
||||||
|
filtroSerie = false;
|
||||||
|
filtroTurma = false;
|
||||||
|
filtroEscola = false;
|
||||||
|
}),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
)
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
width: width*0.05,
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
TextCustom(text: 'Série',size: 12,fontWeight: FontWeight.bold,color: Colors.black87,),
|
||||||
|
IconButton(
|
||||||
|
icon: Icon(filtroSerie?Icons.arrow_drop_up:Icons.arrow_drop_down,color: filtroSerie?PaletteColors.primaryColor:PaletteColors.grey,),
|
||||||
|
onPressed: ()=>setState((){
|
||||||
|
filtroSerie?filtroSerie=false:filtroSerie=true;
|
||||||
|
filtroData = false;
|
||||||
|
filtroRA = false;
|
||||||
|
filtroEstudante = false;
|
||||||
|
filtroTurma = false;
|
||||||
|
filtroEscola = false;
|
||||||
|
}),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
)
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
width: width*0.05,
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
TextCustom(text: 'Turma',size: 12,fontWeight: FontWeight.bold,color: Colors.black87,),
|
||||||
|
IconButton(
|
||||||
|
icon: Icon(filtroTurma?Icons.arrow_drop_up:Icons.arrow_drop_down,color: filtroTurma?PaletteColors.primaryColor:PaletteColors.grey,),
|
||||||
|
onPressed: ()=>setState((){
|
||||||
|
filtroTurma?filtroTurma=false:filtroTurma=true;
|
||||||
|
filtroData = false;
|
||||||
|
filtroRA = false;
|
||||||
|
filtroSerie = false;
|
||||||
|
filtroEstudante = false;
|
||||||
|
filtroEscola = false;
|
||||||
|
}),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
)
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
width: width*0.15,
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
TextCustom(text: 'Escola',size: 12,fontWeight: FontWeight.bold,color: Colors.black87,),
|
||||||
|
IconButton(
|
||||||
|
icon: Icon(filtroEscola?Icons.arrow_drop_up:Icons.arrow_drop_down,color: filtroEscola?PaletteColors.primaryColor:PaletteColors.grey,),
|
||||||
|
onPressed: ()=>setState((){
|
||||||
|
filtroEscola?filtroEscola=false:filtroEscola=true;
|
||||||
|
filtroData = false;
|
||||||
|
filtroRA = false;
|
||||||
|
filtroSerie = false;
|
||||||
|
filtroTurma = false;
|
||||||
|
filtroEstudante = false;
|
||||||
|
}),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
)
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
padding: EdgeInsets.symmetric(horizontal: width>900?width*0.15:width*0.05),
|
||||||
width: width*0.5,
|
width: width*0.5,
|
||||||
height: height*0.5,
|
height: height*0.8,
|
||||||
child: ListView.separated(
|
child: ListView.separated(
|
||||||
separatorBuilder: (context,index){
|
separatorBuilder: (context,index){
|
||||||
return Divider();
|
return Divider();
|
||||||
},
|
},
|
||||||
itemCount: resultadoPesquisa.length,
|
itemCount: resultadoPesquisa.length,
|
||||||
itemBuilder:(context,index){
|
itemBuilder:(context,index){
|
||||||
return DadosAlunosContainer(alunoModel: resultadoPesquisa[index],);
|
|
||||||
|
final items = filtroEstudante||filtroData||filtroRA||filtroSerie||filtroTurma||filtroEscola?resultadoPesquisa.reversed.toList():resultadoPesquisa;
|
||||||
|
|
||||||
|
return DadosAlunosContainer(alunoModel: items[index]);
|
||||||
}
|
}
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -96,7 +96,7 @@ class _LoginScreenState extends State<LoginScreen> {
|
|||||||
child: InputText(
|
child: InputText(
|
||||||
inputFormatters: [],
|
inputFormatters: [],
|
||||||
controller: inputLogin,
|
controller: inputLogin,
|
||||||
title: 'Login',
|
title: 'LOGIN',
|
||||||
width: width>900? width * 0.18:width*0.5,
|
width: width>900? width * 0.18:width*0.5,
|
||||||
colorBorder: PaletteColors.white,
|
colorBorder: PaletteColors.white,
|
||||||
),
|
),
|
||||||
@@ -107,7 +107,7 @@ class _LoginScreenState extends State<LoginScreen> {
|
|||||||
child: InputText(
|
child: InputText(
|
||||||
inputFormatters: [],
|
inputFormatters: [],
|
||||||
controller: inputSenha,
|
controller: inputSenha,
|
||||||
title: 'Senha',
|
title: 'SENHA',
|
||||||
obscure: true,
|
obscure: true,
|
||||||
width: width * 0.18,
|
width: width * 0.18,
|
||||||
colorBorder: PaletteColors.white,
|
colorBorder: PaletteColors.white,
|
||||||
@@ -119,12 +119,12 @@ class _LoginScreenState extends State<LoginScreen> {
|
|||||||
children: [
|
children: [
|
||||||
CircularProgressIndicator(),
|
CircularProgressIndicator(),
|
||||||
SizedBox(width: 20,),
|
SizedBox(width: 20,),
|
||||||
TextCustom(text: 'Validando Acesso...')
|
TextCustom(text: 'VALIDANDO ACESSO...')
|
||||||
],
|
],
|
||||||
):ButtonCustom(
|
):ButtonCustom(
|
||||||
widthCustom: 0.1,
|
widthCustom: 0.1,
|
||||||
heightCustom: 0.07,
|
heightCustom: 0.07,
|
||||||
text: "Entrar",
|
text: "ENTRAR",
|
||||||
size: 14.0,
|
size: 14.0,
|
||||||
colorText: PaletteColors.white,
|
colorText: PaletteColors.white,
|
||||||
colorButton: PaletteColors.primaryColor,
|
colorButton: PaletteColors.primaryColor,
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import 'package:get/get.dart';
|
|||||||
import 'package:intl/intl.dart';
|
import 'package:intl/intl.dart';
|
||||||
import '../utils/colors.dart';
|
import '../utils/colors.dart';
|
||||||
import '../widgets/buttom_custom.dart';
|
import '../widgets/buttom_custom.dart';
|
||||||
|
import '../widgets/caixa_texto_container.dart';
|
||||||
import '../widgets/input_text.dart';
|
import '../widgets/input_text.dart';
|
||||||
import '../widgets/snackBars.dart';
|
import '../widgets/snackBars.dart';
|
||||||
import '../widgets/text_custom.dart';
|
import '../widgets/text_custom.dart';
|
||||||
@@ -114,12 +115,22 @@ class _ResponsibleRegisterScreenState extends State<ResponsibleRegisterScreen> {
|
|||||||
body: Padding(
|
body: Padding(
|
||||||
padding: const EdgeInsets.all(30.0),
|
padding: const EdgeInsets.all(30.0),
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: [
|
children: [
|
||||||
TextCustom(text: 'Aluno(a): ${widget.alunoModel.nome}'),
|
Row(
|
||||||
TextCustom(text: 'Turma: ${widget.alunoModel.serie}° ANO ${widget.alunoModel.turma}'),
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
TextCustom(text: 'RA: ${widget.alunoModel.ra}'),
|
children: [
|
||||||
TextCustom(text: 'Escola: ${widget.alunoModel.escola}'),
|
CaixaTextoContainer(texto: widget.alunoModel.nome.toUpperCase(),titulo: 'Estudante'),
|
||||||
|
CaixaTextoContainer(texto: widget.alunoModel.serie.toUpperCase()+'°',titulo: 'Série',),
|
||||||
|
CaixaTextoContainer(texto: widget.alunoModel.turma.toUpperCase(),titulo: 'Turma',),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
CaixaTextoContainer(texto: widget.alunoModel.ra.toUpperCase(),titulo: 'RA'),
|
||||||
|
CaixaTextoContainer(texto: widget.alunoModel.escola.toUpperCase(),titulo: 'Escola',),
|
||||||
|
],
|
||||||
|
),
|
||||||
SizedBox(height: 50,),
|
SizedBox(height: 50,),
|
||||||
Row(
|
Row(
|
||||||
children: [
|
children: [
|
||||||
@@ -250,34 +261,35 @@ class _ResponsibleRegisterScreenState extends State<ResponsibleRegisterScreen> {
|
|||||||
),
|
),
|
||||||
):Container(),
|
):Container(),
|
||||||
showRegister?Container():Container(
|
showRegister?Container():Container(
|
||||||
width: width*0.3,
|
alignment: Alignment.centerLeft,
|
||||||
|
width: width,
|
||||||
height: height*0.3,
|
height: height*0.3,
|
||||||
child: ListView.separated(
|
child: ListView.separated(
|
||||||
itemCount: responsaveis.length,
|
itemCount: responsaveis.length,
|
||||||
separatorBuilder: (context,index){
|
separatorBuilder: (context,index){
|
||||||
return Divider();
|
return Divider();
|
||||||
},
|
},
|
||||||
itemBuilder: (context,index){
|
itemBuilder: (context,index){
|
||||||
return DadosResponsaveisContainer(
|
return DadosResponsaveisContainer(
|
||||||
responsavelModel: responsaveis[index],
|
responsavelModel: responsaveis[index],
|
||||||
onTapEdit: (){
|
onTapEdit: (){
|
||||||
showRegister = true;
|
showRegister = true;
|
||||||
editando = true;
|
editando = true;
|
||||||
indice = index;
|
indice = index;
|
||||||
inputNome.text = responsaveis[index].nomeResponsavel;
|
inputNome.text = responsaveis[index].nomeResponsavel;
|
||||||
inputParentesco.text = responsaveis[index].parentesco;
|
inputParentesco.text = responsaveis[index].parentesco;
|
||||||
inputCpf.text = responsaveis[index].cpf;
|
inputCpf.text = responsaveis[index].cpf;
|
||||||
inputSenha.text = responsaveis[index].senha;
|
inputSenha.text = responsaveis[index].senha;
|
||||||
inputData.text = responsaveis[index].dataCadastro;
|
inputData.text = responsaveis[index].dataCadastro;
|
||||||
setState(() {});
|
setState(() {});
|
||||||
},
|
},
|
||||||
onTapDelete: (){
|
onTapDelete: (){
|
||||||
responsaveis.removeAt(index);
|
responsaveis.removeAt(index);
|
||||||
setState(() {});
|
setState(() {});
|
||||||
showSnackBar(context, 'Responsável deletado!', Colors.green);
|
showSnackBar(context, 'Responsável deletado!', Colors.green);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|||||||
39
lib/widgets/caixa_texto_container.dart
Normal file
39
lib/widgets/caixa_texto_container.dart
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
import 'package:educa_controle_acesso/widgets/text_custom.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import '../utils/colors.dart';
|
||||||
|
|
||||||
|
class CaixaTextoContainer extends StatelessWidget {
|
||||||
|
String texto;
|
||||||
|
String titulo;
|
||||||
|
double widthCustom;
|
||||||
|
|
||||||
|
CaixaTextoContainer({
|
||||||
|
required this.texto,
|
||||||
|
required this.titulo,
|
||||||
|
this.widthCustom = 0.2
|
||||||
|
});
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
double width = MediaQuery.of(context).size.width;
|
||||||
|
return Container(
|
||||||
|
margin: EdgeInsets.all(5),
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
TextCustom(text: titulo,size: 12,),
|
||||||
|
Container(
|
||||||
|
child: TextCustom(text: texto),
|
||||||
|
width: width*widthCustom,
|
||||||
|
padding: EdgeInsets.all(5),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: PaletteColors.greyInput,
|
||||||
|
borderRadius: BorderRadius.circular(3),
|
||||||
|
border: Border.all(color: PaletteColors.lightGrey)
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -3,6 +3,7 @@ import 'package:educa_controle_acesso/screens/responsible_register_screen.dart';
|
|||||||
import 'package:educa_controle_acesso/widgets/text_custom.dart';
|
import 'package:educa_controle_acesso/widgets/text_custom.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import '../utils/colors.dart';
|
import '../utils/colors.dart';
|
||||||
|
import 'caixa_texto_container.dart';
|
||||||
|
|
||||||
class DadosAlunosContainer extends StatelessWidget {
|
class DadosAlunosContainer extends StatelessWidget {
|
||||||
|
|
||||||
@@ -14,7 +15,11 @@ class DadosAlunosContainer extends StatelessWidget {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
|
||||||
|
double width = MediaQuery.of(context).size.width;
|
||||||
|
|
||||||
return InkWell(
|
return InkWell(
|
||||||
|
hoverColor: PaletteColors.lightGrey,
|
||||||
onTap: (){
|
onTap: (){
|
||||||
Navigator.push(
|
Navigator.push(
|
||||||
context,
|
context,
|
||||||
@@ -22,34 +27,37 @@ class DadosAlunosContainer extends StatelessWidget {
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
padding: EdgeInsets.symmetric(vertical: 10,horizontal: 5),
|
padding: EdgeInsets.symmetric(vertical: 10,horizontal: 0),
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
TextCustom(
|
Row(
|
||||||
text: 'Nome: '+alunoModel.nome,
|
children: [
|
||||||
color: PaletteColors.grey,
|
Container(
|
||||||
size: 20,
|
width: width*0.2,
|
||||||
),
|
child: TextCustom(text: alunoModel.nome.toUpperCase())
|
||||||
TextCustom(
|
),
|
||||||
text: 'Data de Nascimento: '+alunoModel.data_nasc,
|
Container(
|
||||||
color: PaletteColors.grey,
|
width: width*0.1,
|
||||||
size: 15,
|
child: TextCustom(text: alunoModel.data_nasc.toUpperCase())
|
||||||
),
|
),
|
||||||
TextCustom(
|
Container(
|
||||||
text: 'RA: '+alunoModel.ra,
|
width: width*0.08,
|
||||||
color: PaletteColors.grey,
|
child: TextCustom(text: alunoModel.ra.toUpperCase())
|
||||||
size: 15,
|
),
|
||||||
),
|
Container(
|
||||||
TextCustom(
|
width: width*0.05,
|
||||||
text: 'Turma: '+alunoModel.serie+'° ANO '+alunoModel.turma,
|
child: TextCustom(text: alunoModel.serie.toUpperCase()+'°')
|
||||||
color: PaletteColors.grey,
|
),
|
||||||
size: 15,
|
Container(
|
||||||
),
|
width: width*0.05,
|
||||||
TextCustom(
|
child: TextCustom(text: alunoModel.turma.toUpperCase())
|
||||||
text: 'Escola: '+alunoModel.escola,
|
),
|
||||||
color: PaletteColors.grey,
|
Container(
|
||||||
size: 15,
|
width: width*0.20,
|
||||||
|
child: TextCustom(text: alunoModel.escola.toUpperCase())
|
||||||
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import 'package:educa_controle_acesso/screens/responsible_register_screen.dart';
|
|||||||
import 'package:educa_controle_acesso/widgets/text_custom.dart';
|
import 'package:educa_controle_acesso/widgets/text_custom.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import '../utils/colors.dart';
|
import '../utils/colors.dart';
|
||||||
|
import 'caixa_texto_container.dart';
|
||||||
|
|
||||||
class DadosResponsaveisContainer extends StatelessWidget {
|
class DadosResponsaveisContainer extends StatelessWidget {
|
||||||
|
|
||||||
@@ -31,12 +32,13 @@ class DadosResponsaveisContainer extends StatelessWidget {
|
|||||||
icon: Icon(Icons.delete,color: PaletteColors.grey,),
|
icon: Icon(Icons.delete,color: PaletteColors.grey,),
|
||||||
),
|
),
|
||||||
Container(
|
Container(
|
||||||
width: width*0.15,
|
width: width*0.35,
|
||||||
padding: EdgeInsets.symmetric(vertical: 10,horizontal: 5),
|
padding: EdgeInsets.symmetric(vertical: 10,horizontal: 5),
|
||||||
child: TextCustom(
|
child: Row(
|
||||||
text: '${responsavelModel.nomeResponsavel}, ${responsavelModel.parentesco}',
|
children: [
|
||||||
color: PaletteColors.grey,
|
CaixaTextoContainer(texto: responsavelModel.nomeResponsavel,titulo: 'Nome',widthCustom: 0.15),
|
||||||
size: 15,
|
CaixaTextoContainer(texto: responsavelModel.parentesco,titulo: 'Parentesco',widthCustom: 0.1,),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import 'package:educa_controle_acesso/utils/colors.dart';
|
import 'package:educa_controle_acesso/utils/colors.dart';
|
||||||
|
import 'package:educa_controle_acesso/widgets/text_custom.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
|
|
||||||
@@ -7,10 +8,12 @@ class InputText extends StatelessWidget {
|
|||||||
var controller;
|
var controller;
|
||||||
double fontSize;
|
double fontSize;
|
||||||
String title;
|
String title;
|
||||||
|
String hint;
|
||||||
double width;
|
double width;
|
||||||
TextInputType textInputType;
|
TextInputType textInputType;
|
||||||
int maxLines;
|
int maxLines;
|
||||||
Color colorBorder;
|
Color colorBorder;
|
||||||
|
Color colorBackground;
|
||||||
var onChanged;
|
var onChanged;
|
||||||
bool enable;
|
bool enable;
|
||||||
List<TextInputFormatter> inputFormatters;
|
List<TextInputFormatter> inputFormatters;
|
||||||
@@ -21,9 +24,11 @@ class InputText extends StatelessWidget {
|
|||||||
this.obscure = false,
|
this.obscure = false,
|
||||||
this.fontSize = 15.0,
|
this.fontSize = 15.0,
|
||||||
this.title = '',
|
this.title = '',
|
||||||
|
this.hint = '',
|
||||||
this.textInputType = TextInputType.text,
|
this.textInputType = TextInputType.text,
|
||||||
this.maxLines = 1,
|
this.maxLines = 1,
|
||||||
this.colorBorder = PaletteColors.grey,
|
this.colorBorder = PaletteColors.grey,
|
||||||
|
this.colorBackground = PaletteColors.greyInput,
|
||||||
this.onChanged = null,
|
this.onChanged = null,
|
||||||
this.enable = true,
|
this.enable = true,
|
||||||
required this.inputFormatters
|
required this.inputFormatters
|
||||||
@@ -31,47 +36,54 @@ class InputText extends StatelessWidget {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Container(
|
return Column(
|
||||||
color:PaletteColors.greyInput,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
width: width,
|
children: [
|
||||||
margin: EdgeInsets.only(bottom: 5),
|
TextCustom(text: title,size: 10),
|
||||||
child: TextFormField(
|
Container(
|
||||||
inputFormatters: inputFormatters,
|
color:colorBackground,
|
||||||
keyboardType: textInputType,
|
width: width,
|
||||||
maxLines: maxLines,
|
margin: EdgeInsets.only(bottom: 5),
|
||||||
onChanged: onChanged,
|
child: TextFormField(
|
||||||
obscureText: this.obscure,
|
inputFormatters: inputFormatters,
|
||||||
controller: this.controller,
|
keyboardType: textInputType,
|
||||||
enabled: enable,
|
maxLines: maxLines,
|
||||||
style: TextStyle(
|
onChanged: onChanged,
|
||||||
color: Colors.black,
|
obscureText: this.obscure,
|
||||||
fontSize: this.fontSize,
|
controller: this.controller,
|
||||||
fontFamily: 'Nunito'
|
enabled: enable,
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.black,
|
||||||
|
fontSize: this.fontSize,
|
||||||
|
fontFamily: 'Nunito'
|
||||||
|
),
|
||||||
|
decoration: InputDecoration(
|
||||||
|
// fillColor: PaletteColors.primaryColor,
|
||||||
|
// labelText: title,
|
||||||
|
border: OutlineInputBorder(
|
||||||
|
borderSide: BorderSide(width: 1,color: colorBorder)
|
||||||
|
),
|
||||||
|
focusedBorder: OutlineInputBorder(
|
||||||
|
borderSide: BorderSide(width: 1, color: colorBorder),
|
||||||
|
borderRadius: BorderRadius.circular(3),
|
||||||
|
),
|
||||||
|
enabledBorder: OutlineInputBorder(
|
||||||
|
borderSide: BorderSide(width: 1, color: colorBorder),
|
||||||
|
borderRadius: BorderRadius.circular(3),
|
||||||
|
),
|
||||||
|
disabledBorder: OutlineInputBorder(
|
||||||
|
borderSide: BorderSide(width: 1, color: colorBorder),
|
||||||
|
borderRadius: BorderRadius.circular(3),
|
||||||
|
),
|
||||||
|
hintText: hint,
|
||||||
|
hintStyle: TextStyle(
|
||||||
|
color: PaletteColors.grey,
|
||||||
|
fontSize: this.fontSize,
|
||||||
|
)
|
||||||
|
)
|
||||||
|
),
|
||||||
),
|
),
|
||||||
decoration: InputDecoration(
|
],
|
||||||
// fillColor: PaletteColors.primaryColor,
|
|
||||||
labelText: title,
|
|
||||||
border: OutlineInputBorder(
|
|
||||||
borderSide: BorderSide(width: 1,color: colorBorder)
|
|
||||||
),
|
|
||||||
focusedBorder: OutlineInputBorder(
|
|
||||||
borderSide: BorderSide(width: 1, color: colorBorder),
|
|
||||||
borderRadius: BorderRadius.circular(3),
|
|
||||||
),
|
|
||||||
enabledBorder: OutlineInputBorder(
|
|
||||||
borderSide: BorderSide(width: 1, color: colorBorder),
|
|
||||||
borderRadius: BorderRadius.circular(3),
|
|
||||||
),
|
|
||||||
disabledBorder: OutlineInputBorder(
|
|
||||||
borderSide: BorderSide(width: 1, color: colorBorder),
|
|
||||||
borderRadius: BorderRadius.circular(3),
|
|
||||||
),
|
|
||||||
hintStyle: TextStyle(
|
|
||||||
color: Colors.black,
|
|
||||||
fontSize: this.fontSize,
|
|
||||||
)
|
|
||||||
)
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user