ajustes de layout

This commit is contained in:
Reginaldo
2023-08-11 17:12:50 -03:00
parent 1ffaa70fed
commit 4500ee04aa
9 changed files with 197 additions and 125 deletions

View File

@@ -31,6 +31,13 @@ class MyApp extends StatelessWidget {
return MaterialApp( return MaterialApp(
debugShowCheckedModeBanner: false, debugShowCheckedModeBanner: false,
title: 'CONTROLE DE ACESSO', title: 'CONTROLE DE ACESSO',
theme: ThemeData(
scrollbarTheme: ScrollbarThemeData(
thickness: MaterialStateProperty.all<double>(15),
thumbVisibility: MaterialStateProperty.all<bool>(true),
thumbColor: MaterialStateProperty.all<Color>(Colors.black38),
)
),
onUnknownRoute: (RouteSettings settings) { onUnknownRoute: (RouteSettings settings) {
return MaterialPageRoute( return MaterialPageRoute(
builder: (context) => Scaffold( builder: (context) => Scaffold(

View File

@@ -39,9 +39,10 @@ class _HomeScreenState extends State<HomeScreen> {
carregarAlunos()async{ carregarAlunos()async{
resultadoPesquisa.clear(); resultadoPesquisa.clear();
alunos.clear(); alunos.clear();
String q = inputPesquisa.text.replaceAll(' ', '%20').toUpperCase(); String aluno = inputPesquisa.text.replaceAll(' ', '%20').toUpperCase();
String escola = widget.dados[3].replaceAll(' ', '%20').toUpperCase();
// print(q); // print(q);
final url = '${widget.dados[2]}/aluno?NOME=$q&CIDADE=${widget.dados[0]}'; final url = '${widget.dados[2]}/aluno?NOME=$aluno&CIDADE=${widget.dados[0]}&ANO=${DateTime.now().year}&ESCOLA=$escola';
print(url); print(url);
final response = await http.get(Uri.parse(url)); final response = await http.get(Uri.parse(url));
var map = json.decode(response.body); var map = json.decode(response.body);
@@ -214,21 +215,36 @@ class _HomeScreenState extends State<HomeScreen> {
child: showEscola?ListView( child: showEscola?ListView(
children: [ children: [
SizedBox(height: height*0.05), SizedBox(height: height*0.05),
Padding( Container(
padding: EdgeInsets.symmetric(horizontal: width>900?width*0.1:width*0.05), margin: EdgeInsets.symmetric(horizontal: width*0.1),
child: Row( child: Row(
crossAxisAlignment: CrossAxisAlignment.end, crossAxisAlignment: CrossAxisAlignment.end,
children: [ children: [
Container(
height: 35,
width: 70,
alignment: Alignment.center,
child: TextCustom(text: 'BUSCAR',color: Colors.black,size: 12.0),
decoration: BoxDecoration(
borderRadius: BorderRadius.only(topLeft: Radius.circular(3.0),bottomLeft: Radius.circular(3.0),),
color: PaletteColors.greySearch,
border: Border.all(color: PaletteColors.grey)
),
),
InputText( InputText(
borderRadius: 0,
hint: 'Pesquisar por login do usuário'.toUpperCase(), hint: 'Pesquisar por login do usuário'.toUpperCase(),
controller: inputPesquisa, controller: inputPesquisa,
width: width*0.25, width: width*0.662,
inputFormatters: [], inputFormatters: [],
fontSize: 14, fontSize: 14,
colorBackground: Colors.white, colorBackground: Colors.white,
), ),
SizedBox(width: 10,),
ButtonCustom( ButtonCustom(
borderRadiusbottomLeft: 0,
borderRadiustopLeft: 0,
borderRadiusbottomRight: 0,
borderRadiustopRight: 0,
widthCustom: 0.05, widthCustom: 0.05,
text: "PESQUISAR", text: "PESQUISAR",
fontSize: 10.0, fontSize: 10.0,
@@ -247,14 +263,15 @@ class _HomeScreenState extends State<HomeScreen> {
} }
}, },
), ),
SizedBox(width: 10,),
ButtonCustom( ButtonCustom(
borderRadiusbottomLeft: 0,
borderRadiustopLeft: 0,
widthCustom: 0.05, widthCustom: 0.05,
text: "LIMPAR", text: "LIMPAR",
fontSize: 10.0, fontSize: 10.0,
colorText: PaletteColors.white, colorText: PaletteColors.white,
colorButton: PaletteColors.primaryColor, colorButton: PaletteColors.grey,
colorBorder: PaletteColors.primaryColor, colorBorder: PaletteColors.grey,
onPressed: ()=>setState((){ onPressed: ()=>setState((){
inputPesquisa.clear(); inputPesquisa.clear();
resultadoPesquisa.clear(); resultadoPesquisa.clear();
@@ -265,15 +282,19 @@ class _HomeScreenState extends State<HomeScreen> {
) )
), ),
Container( Container(
margin: EdgeInsets.symmetric(vertical: 20), margin: EdgeInsets.only(top: 20,right: width*0.1,left: width*0.1),
padding: EdgeInsets.symmetric(horizontal: width>900?width*0.1:width*0.05),
width: width, width: width,
height: 42,
alignment: Alignment.center, alignment: Alignment.center,
decoration: BoxDecoration(
color: PaletteColors.greySearch,
border: Border.all(color: PaletteColors.grey)
),
child: Row( child: Row(
children: [ children: [
SizedBox(width: 30,), SizedBox(width: 30,),
Container( Container(
width: width*0.1, width: width*0.15,
child: TextCustom(text: 'USUÁRIO',size: 12,fontWeight: FontWeight.bold,color: Colors.black87,), child: TextCustom(text: 'USUÁRIO',size: 12,fontWeight: FontWeight.bold,color: Colors.black87,),
), ),
Container( Container(
@@ -292,12 +313,16 @@ class _HomeScreenState extends State<HomeScreen> {
), ),
), ),
Container( Container(
padding: EdgeInsets.symmetric(horizontal: width>900?width*0.1:width*0.05), decoration: BoxDecoration(
height: height*0.7, border: Border.all(color: logins.length==0?Colors.white:PaletteColors.grey)
),
margin: EdgeInsets.symmetric(horizontal: width>900?width*0.1:width*0.05),
height: height*0.77,
child: ListView.builder( child: ListView.builder(
itemCount: logins.length, itemCount: logins.length,
itemBuilder: (context,index){ itemBuilder: (context,index){
return ItemAcesso( return ItemAcesso(
index: index,
check: logins[index].CHECK, check: logins[index].CHECK,
ID_USUARIO: logins[index].ID_USUARIO, ID_USUARIO: logins[index].ID_USUARIO,
CADASTRADO_POR: logins[index].CADASTRADO_POR, CADASTRADO_POR: logins[index].CADASTRADO_POR,
@@ -310,19 +335,6 @@ class _HomeScreenState extends State<HomeScreen> {
inserirAcessos(index); inserirAcessos(index);
} }
); );
// return Row(
// children: [
// Checkbox(
// value: logins[index].CHECK,
// onChanged: (v){
// buscandoDados = true;
// setState(()=>logins[index].CHECK=v!);
// inserirAcessos(index);
// }
// ),
// TextCustom(text: logins[index].ID_USUARIO),
// ],
// );
}, },
), ),
) )
@@ -330,21 +342,36 @@ class _HomeScreenState extends State<HomeScreen> {
):ListView( ):ListView(
children: [ children: [
SizedBox(height: height*0.05), SizedBox(height: height*0.05),
Padding( Container(
padding: EdgeInsets.symmetric(horizontal: width>900?width*0.1:width*0.05), margin: EdgeInsets.symmetric(horizontal: width*0.1),
child: Row( child: Row(
crossAxisAlignment: CrossAxisAlignment.end, crossAxisAlignment: CrossAxisAlignment.end,
children: [ children: [
Container(
height: 35,
width: 70,
alignment: Alignment.center,
child: TextCustom(text: 'BUSCAR',color: Colors.black,size: 12.0),
decoration: BoxDecoration(
borderRadius: BorderRadius.only(topLeft: Radius.circular(3.0),bottomLeft: Radius.circular(3.0),),
color: PaletteColors.greySearch,
border: Border.all(color: PaletteColors.grey)
),
),
InputText( InputText(
hint: 'Pesquisar por nome do aluno(a)'.toUpperCase(), hint: 'Pesquisar por nome do aluno(a)'.toUpperCase(),
controller: inputPesquisa, controller: inputPesquisa,
width: width*0.25, width: width*0.662,
inputFormatters: [], inputFormatters: [],
fontSize: 14, fontSize: 14,
colorBackground: Colors.white, colorBackground: Colors.white,
borderRadius: 0,
), ),
SizedBox(width: 10,),
ButtonCustom( ButtonCustom(
borderRadiusbottomLeft: 0,
borderRadiustopLeft: 0,
borderRadiusbottomRight: 0,
borderRadiustopRight: 0,
widthCustom: 0.05, widthCustom: 0.05,
text: "PESQUISAR", text: "PESQUISAR",
fontSize: 10.0, fontSize: 10.0,
@@ -362,14 +389,15 @@ class _HomeScreenState extends State<HomeScreen> {
} }
}, },
), ),
SizedBox(width: 10,),
ButtonCustom( ButtonCustom(
borderRadiusbottomLeft: 0,
borderRadiustopLeft: 0,
widthCustom: 0.05, widthCustom: 0.05,
text: "LIMPAR", text: "LIMPAR",
fontSize: 10.0, fontSize: 10.0,
colorText: PaletteColors.white, colorText: PaletteColors.white,
colorButton: PaletteColors.primaryColor, colorButton: PaletteColors.grey,
colorBorder: PaletteColors.primaryColor, colorBorder: PaletteColors.grey,
onPressed: ()=>setState((){ onPressed: ()=>setState((){
inputPesquisa.clear(); inputPesquisa.clear();
resultadoPesquisa.clear(); resultadoPesquisa.clear();
@@ -380,16 +408,20 @@ class _HomeScreenState extends State<HomeScreen> {
) )
), ),
Container( Container(
margin: EdgeInsets.symmetric(vertical: 20), margin: EdgeInsets.only(top: 20,right: width*0.1,left: width*0.1),
padding: EdgeInsets.symmetric(horizontal: width>900?width*0.1:width*0.05),
width: width, width: width,
alignment: Alignment.center, alignment: Alignment.center,
decoration: BoxDecoration(
color: PaletteColors.greySearch,
border: Border.all(color: PaletteColors.grey)
),
child: Row( child: Row(
children: [ children: [
Container( Container(
width: width*0.2, width: width*0.2,
child: Row( child: Row(
children: [ children: [
SizedBox(width: 10,),
TextCustom(text: 'ESTUDANTE',size: 12,fontWeight: FontWeight.bold,color: Colors.black87,), TextCustom(text: 'ESTUDANTE',size: 12,fontWeight: FontWeight.bold,color: Colors.black87,),
IconButton( IconButton(
icon: Icon(filtroEstudante?Icons.arrow_drop_up:Icons.arrow_drop_down,color: filtroEstudante?PaletteColors.primaryColor:PaletteColors.grey,), icon: Icon(filtroEstudante?Icons.arrow_drop_up:Icons.arrow_drop_down,color: filtroEstudante?PaletteColors.primaryColor:PaletteColors.grey,),
@@ -401,7 +433,7 @@ class _HomeScreenState extends State<HomeScreen> {
filtroTurma = false; filtroTurma = false;
filtroEscola = false; filtroEscola = false;
}), }),
) ),
], ],
) )
), ),
@@ -420,7 +452,7 @@ class _HomeScreenState extends State<HomeScreen> {
filtroTurma = false; filtroTurma = false;
filtroEscola = false; filtroEscola = false;
}), }),
) ),
], ],
) )
), ),
@@ -439,15 +471,15 @@ class _HomeScreenState extends State<HomeScreen> {
filtroTurma = false; filtroTurma = false;
filtroEscola = false; filtroEscola = false;
}), }),
) ),
], ],
) )
), ),
Container( Container(
width: width*0.05, width: width*0.07,
child: Row( child: Row(
children: [ children: [
TextCustom(text: 'Série',size: 12,fontWeight: FontWeight.bold,color: Colors.black87,), TextCustom(text: 'SÉRIE',size: 12,fontWeight: FontWeight.bold,color: Colors.black87,),
IconButton( IconButton(
icon: Icon(filtroSerie?Icons.arrow_drop_up:Icons.arrow_drop_down,color: filtroSerie?PaletteColors.primaryColor:PaletteColors.grey,), icon: Icon(filtroSerie?Icons.arrow_drop_up:Icons.arrow_drop_down,color: filtroSerie?PaletteColors.primaryColor:PaletteColors.grey,),
onPressed: ()=>setState((){ onPressed: ()=>setState((){
@@ -458,15 +490,15 @@ class _HomeScreenState extends State<HomeScreen> {
filtroTurma = false; filtroTurma = false;
filtroEscola = false; filtroEscola = false;
}), }),
) ),
], ],
) )
), ),
Container( Container(
width: width*0.05, width: width*0.07,
child: Row( child: Row(
children: [ children: [
TextCustom(text: 'Turma',size: 12,fontWeight: FontWeight.bold,color: Colors.black87,), TextCustom(text: 'TURMA',size: 12,fontWeight: FontWeight.bold,color: Colors.black87,),
IconButton( IconButton(
icon: Icon(filtroTurma?Icons.arrow_drop_up:Icons.arrow_drop_down,color: filtroTurma?PaletteColors.primaryColor:PaletteColors.grey,), icon: Icon(filtroTurma?Icons.arrow_drop_up:Icons.arrow_drop_down,color: filtroTurma?PaletteColors.primaryColor:PaletteColors.grey,),
onPressed: ()=>setState((){ onPressed: ()=>setState((){
@@ -477,7 +509,7 @@ class _HomeScreenState extends State<HomeScreen> {
filtroEstudante = false; filtroEstudante = false;
filtroEscola = false; filtroEscola = false;
}), }),
) ),
], ],
) )
), ),
@@ -485,7 +517,7 @@ class _HomeScreenState extends State<HomeScreen> {
width: width*0.2, width: width*0.2,
child: Row( child: Row(
children: [ children: [
TextCustom(text: 'Escola',size: 12,fontWeight: FontWeight.bold,color: Colors.black87,), TextCustom(text: 'ESCOLA',size: 12,fontWeight: FontWeight.bold,color: Colors.black87,),
IconButton( IconButton(
icon: Icon(filtroEscola?Icons.arrow_drop_up:Icons.arrow_drop_down,color: filtroEscola?PaletteColors.primaryColor:PaletteColors.grey,), icon: Icon(filtroEscola?Icons.arrow_drop_up:Icons.arrow_drop_down,color: filtroEscola?PaletteColors.primaryColor:PaletteColors.grey,),
onPressed: ()=>setState((){ onPressed: ()=>setState((){
@@ -496,7 +528,7 @@ class _HomeScreenState extends State<HomeScreen> {
filtroTurma = false; filtroTurma = false;
filtroEstudante = false; filtroEstudante = false;
}), }),
) ),
], ],
) )
), ),
@@ -504,19 +536,18 @@ class _HomeScreenState extends State<HomeScreen> {
), ),
), ),
Container( Container(
padding: EdgeInsets.symmetric(horizontal: width>900?width*0.1:width*0.05), decoration: BoxDecoration(
border: Border.all(color: resultadoPesquisa.length==0?Colors.white:PaletteColors.grey)
),
margin: EdgeInsets.symmetric(horizontal: width>900?width*0.1:width*0.05),
width: width*0.75, width: width*0.75,
height: height*0.8, height: height*0.77,
child: ListView.separated( child: ListView.builder(
separatorBuilder: (context,index){
return Divider();
},
itemCount: resultadoPesquisa.length, itemCount: resultadoPesquisa.length,
itemBuilder:(context,index){ itemBuilder:(context,index){
final items = filtroEstudante||filtroData||filtroRA||filtroSerie||filtroTurma||filtroEscola?resultadoPesquisa.reversed.toList():resultadoPesquisa; final items = filtroEstudante||filtroData||filtroRA||filtroSerie||filtroTurma||filtroEscola?resultadoPesquisa.reversed.toList():resultadoPesquisa;
return DadosAlunosContainer(alunoModel: items[index],index: index,);
return DadosAlunosContainer(alunoModel: items[index]);
} }
), ),
) )

View File

@@ -23,11 +23,10 @@ class _LoginScreenState extends State<LoginScreen> {
//las1594@@ //las1594@@
//SENHAS CRIPTOGRAFADAS PORQUE FORMA ALTERADAS, SENHAS NOVAS USUÁRIO E SENHA SÃO IGUAIS //SENHAS CRIPTOGRAFADAS PORQUE FORMA ALTERADAS, SENHAS NOVAS USUÁRIO E SENHA SÃO IGUAIS
//ibueno //ibueno
final inputLogin = TextEditingController(text: 'admin'); // final inputLogin = TextEditingController(text: 'admin');
final inputSenha = TextEditingController(text: 'las1594@@'); // final inputSenha = TextEditingController(text: 'las1594@@');
// final inputCodigo = TextEditingController(text: 'e003'); final inputLogin = TextEditingController();
// final inputLogin = TextEditingController(); final inputSenha = TextEditingController();
// final inputSenha = TextEditingController();
final inputCodigo = TextEditingController(); final inputCodigo = TextEditingController();
bool carregando = false; bool carregando = false;
List listCodigo = []; List listCodigo = [];
@@ -45,7 +44,6 @@ class _LoginScreenState extends State<LoginScreen> {
if(inputSenha.text.isNotEmpty){ if(inputSenha.text.isNotEmpty){
if(widget.cidade!=''){ if(widget.cidade!=''){
if(listCodigo.contains(widget.cidade.toLowerCase())){ if(listCodigo.contains(widget.cidade.toLowerCase())){
print('vindo da main ${widget.cidade}');
setState(() { setState(() {
carregando = true; carregando = true;
}); });
@@ -107,7 +105,7 @@ class _LoginScreenState extends State<LoginScreen> {
if(map['NO_USERNAME']==map['SENHA']){ if(map['NO_USERNAME']==map['SENHA']){
if(map['NO_USERNAME']==inputLogin.text.toUpperCase() && map['SENHA']==inputSenha.text.toUpperCase()){ if(map['NO_USERNAME']==inputLogin.text.toUpperCase() && map['SENHA']==inputSenha.text.toUpperCase()){
showSnackBar(context, 'Acesso validado', Colors.green); showSnackBar(context, 'Acesso validado', Colors.green);
List dados = [widget.cidade.toUpperCase(),inputLogin.text,urlAPI]; List dados = [widget.cidade.toUpperCase(),inputLogin.text,urlAPI,map['NO_FANTASIA']??''];
Navigator.pushNamed(context, '/home',arguments: dados); Navigator.pushNamed(context, '/home',arguments: dados);
}else{ }else{
showSnackBar(context, 'Login não cadastrado e/ou senha incorreta e/ou Código incorreto', Colors.red); showSnackBar(context, 'Login não cadastrado e/ou senha incorreta e/ou Código incorreto', Colors.red);
@@ -115,7 +113,7 @@ class _LoginScreenState extends State<LoginScreen> {
}else{ }else{
if(MainControllers().encrypt(inputSenha.text,map['SENHA']) == map['SENHA']){ if(MainControllers().encrypt(inputSenha.text,map['SENHA']) == map['SENHA']){
showSnackBar(context, 'Acesso validado', Colors.green); showSnackBar(context, 'Acesso validado', Colors.green);
List dados = [widget.cidade.toUpperCase(),inputLogin.text,urlAPI]; List dados = [widget.cidade.toUpperCase(),inputLogin.text,urlAPI,map['NO_FANTASIA']??''];
Navigator.pushNamed(context, '/home',arguments: dados); Navigator.pushNamed(context, '/home',arguments: dados);
}else{ }else{
showSnackBar(context, 'Login não cadastrado e/ou senha incorreta e/ou Código incorreto', Colors.red); showSnackBar(context, 'Login não cadastrado e/ou senha incorreta e/ou Código incorreto', Colors.red);

View File

@@ -9,6 +9,7 @@ class PaletteColors{
static const Color greyInput = Color (0xffE1E1E1); static const Color greyInput = Color (0xffE1E1E1);
static const Color lightGrey = Color(0xffD0D0D0); static const Color lightGrey = Color(0xffD0D0D0);
static const Color midGrey = Color(0xffC4C4C4); static const Color midGrey = Color(0xffC4C4C4);
static const Color greySearch = Color(0xffeaecef);
static const Color backGrey = Color(0xffE9E9E9); static const Color backGrey = Color(0xffE9E9E9);
static const Color green = Color(0xff06790c); static const Color green = Color(0xff06790c);
} }

View File

@@ -1,5 +1,5 @@
class Fixos{ class Fixos{
// static const String AMB_PROD = 'https://controle-educa-api.rkmsistemas.com.br'; // static const String AMB_PROD = 'https://controle-educa-api.rkmsistemas.com.br';
static const String AMB_HOMO = 'https://homol-controle-educa-api.rkmsistemas.com.br'; static const String AMB_HOMO = 'https://homol-controle-educa-api.rkmsistemas.com.br';
static const String AMB_DEV = 'http://192.168.0.42:8013'; static const String AMB_DEV = 'http://192.168.18.2:8000';
} }

View File

@@ -9,6 +9,10 @@ class ButtonCustom extends StatelessWidget{
final Color colorBorder; final Color colorBorder;
final widthCustom; final widthCustom;
final double height; final double height;
double borderRadiustopRight;
double borderRadiusbottomLeft;
double borderRadiustopLeft;
double borderRadiusbottomRight;
ButtonCustom({ ButtonCustom({
required this.onPressed, required this.onPressed,
@@ -18,7 +22,11 @@ ButtonCustom({
required this.colorText, required this.colorText,
required this.colorBorder, required this.colorBorder,
this.widthCustom = 1.0, this.widthCustom = 1.0,
this.height = 42.0, this.height = 42.5,
this.borderRadiustopRight = 5.0,
this.borderRadiusbottomLeft = 5.0,
this.borderRadiustopLeft = 5.0,
this.borderRadiusbottomRight = 5.0,
}); });
@override @override
Widget build (BuildContext context) { Widget build (BuildContext context) {
@@ -29,6 +37,14 @@ ButtonCustom({
primary: colorButton, primary: colorButton,
minimumSize: Size(width*widthCustom! , height), minimumSize: Size(width*widthCustom! , height),
side: BorderSide(width: 2,color : colorBorder,), side: BorderSide(width: 2,color : colorBorder,),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.only(
topRight: Radius.circular(borderRadiustopRight),
bottomLeft: Radius.circular(borderRadiusbottomLeft),
topLeft: Radius.circular(borderRadiustopLeft),
bottomRight: Radius.circular(borderRadiusbottomRight)
),
),
), ),
onPressed: onPressed, onPressed: onPressed,
child: Text(text, child: Text(text,

View File

@@ -8,15 +8,18 @@ import 'caixa_texto_container.dart';
class DadosAlunosContainer extends StatelessWidget { class DadosAlunosContainer extends StatelessWidget {
AlunoModel alunoModel; AlunoModel alunoModel;
int index;
DadosAlunosContainer({ DadosAlunosContainer({
required this.alunoModel required this.alunoModel,
required this.index
}); });
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
double width = MediaQuery.of(context).size.width; double width = MediaQuery.of(context).size.width;
double resto = index%2;
return InkWell( return InkWell(
hoverColor: PaletteColors.lightGrey, hoverColor: PaletteColors.lightGrey,
@@ -24,37 +27,39 @@ class DadosAlunosContainer extends StatelessWidget {
Navigator.pushNamed(context, '/cadastro',arguments: alunoModel); Navigator.pushNamed(context, '/cadastro',arguments: alunoModel);
}, },
child: Container( child: Container(
padding: EdgeInsets.symmetric(vertical: 10,horizontal: 0), color: resto==0?Colors.white:PaletteColors.greySearch,
child: Column( height: 50,
crossAxisAlignment: CrossAxisAlignment.start, alignment: Alignment.centerLeft,
child: Row(
children: [ children: [
Row( Container(
children: [ width: width*0.2,
Container( child: Row(
width: width*0.2, children: [
child: TextCustom(text: alunoModel.nome.toUpperCase()) SizedBox(width: 10,),
), TextCustom(text: alunoModel.nome.toUpperCase()),
Container( ],
width: width*0.1, )
child: TextCustom(text: alunoModel.data_nasc.toUpperCase()) ),
), Container(
Container( width: width*0.1,
width: width*0.08, child: TextCustom(text: alunoModel.data_nasc.toUpperCase())
child: TextCustom(text: alunoModel.ra.toUpperCase()) ),
), Container(
Container( width: width*0.08,
width: width*0.05, child: TextCustom(text: alunoModel.ra.toUpperCase())
child: TextCustom(text: alunoModel.serie.toUpperCase()) ),
), Container(
Container( width: width*0.07,
width: width*0.05, child: TextCustom(text: alunoModel.serie.toUpperCase())
child: TextCustom(text: alunoModel.turma.toUpperCase(),textAlign: TextAlign.center,) ),
), Container(
Container( width: width*0.07,
width: width*0.25, child: TextCustom(text: alunoModel.turma.toUpperCase())
child: TextCustom(text: alunoModel.escola.toUpperCase(),size: 14.0,) ),
), Container(
], width: width*0.25,
child: TextCustom(text: alunoModel.escola.toUpperCase())
), ),
], ],
), ),

View File

@@ -17,6 +17,7 @@ class InputText extends StatelessWidget {
var onChanged; var onChanged;
bool enable; bool enable;
List<TextInputFormatter> inputFormatters; List<TextInputFormatter> inputFormatters;
double borderRadius;
InputText({ InputText({
required this.controller, required this.controller,
@@ -31,7 +32,8 @@ class InputText extends StatelessWidget {
this.colorBackground = PaletteColors.greyInput, this.colorBackground = PaletteColors.greyInput,
this.onChanged = null, this.onChanged = null,
this.enable = true, this.enable = true,
required this.inputFormatters required this.inputFormatters,
this.borderRadius = 3.0,
}); });
@override @override
@@ -63,19 +65,20 @@ class InputText extends StatelessWidget {
// fillColor: PaletteColors.primaryColor, // fillColor: PaletteColors.primaryColor,
// labelText: title, // labelText: title,
border: OutlineInputBorder( border: OutlineInputBorder(
borderSide: BorderSide(width: 1,color: colorBorder) borderSide: BorderSide(width: 1,color: colorBorder),
borderRadius: BorderRadius.all(Radius.circular(borderRadius)),
), ),
focusedBorder: OutlineInputBorder( focusedBorder: OutlineInputBorder(
borderSide: BorderSide(width: 1, color: colorBorder), borderSide: BorderSide(width: 1, color: colorBorder),
borderRadius: BorderRadius.circular(3), borderRadius: BorderRadius.all(Radius.circular(borderRadius)),
), ),
enabledBorder: OutlineInputBorder( enabledBorder: OutlineInputBorder(
borderSide: BorderSide(width: 1, color: colorBorder), borderSide: BorderSide(width: 1, color: colorBorder),
borderRadius: BorderRadius.circular(3), borderRadius: BorderRadius.all(Radius.circular(borderRadius)),
), ),
disabledBorder: OutlineInputBorder( disabledBorder: OutlineInputBorder(
borderSide: BorderSide(width: 1, color: colorBorder), borderSide: BorderSide(width: 1, color: colorBorder),
borderRadius: BorderRadius.circular(3), borderRadius: BorderRadius.all(Radius.circular(borderRadius)),
), ),
hintText: hint, hintText: hint,
hintStyle: TextStyle( hintStyle: TextStyle(

View File

@@ -2,6 +2,8 @@ import 'package:educa_controle_acesso/widgets/text_custom.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:intl/intl.dart'; import 'package:intl/intl.dart';
import '../utils/colors.dart';
class ItemAcesso extends StatelessWidget { class ItemAcesso extends StatelessWidget {
bool check; bool check;
String ID_USUARIO; String ID_USUARIO;
@@ -9,6 +11,7 @@ class ItemAcesso extends StatelessWidget {
String CADASTRADO_POR; String CADASTRADO_POR;
String CIDADE; String CIDADE;
var onChanged; var onChanged;
int index;
ItemAcesso({ ItemAcesso({
required this.check, required this.check,
@@ -16,7 +19,8 @@ class ItemAcesso extends StatelessWidget {
required this.DATA, required this.DATA,
required this.CADASTRADO_POR, required this.CADASTRADO_POR,
required this.CIDADE, required this.CIDADE,
required this.onChanged required this.onChanged,
required this.index,
}); });
@override @override
@@ -26,29 +30,36 @@ class ItemAcesso extends StatelessWidget {
String formataData = DATA == '00/00/0000'?'00/00/0000': DateFormat('dd/MM/yyyy hh:mm').format(DateTime.parse(DATA)); String formataData = DATA == '00/00/0000'?'00/00/0000': DateFormat('dd/MM/yyyy hh:mm').format(DateTime.parse(DATA));
return Row( double resto = index%2;
children: [
Checkbox( return Container(
value: check, color: resto==0?Colors.white:PaletteColors.greySearch,
onChanged:onChanged height: 50,
), alignment: Alignment.centerLeft,
Container( child: Row(
width: width*0.1, children: [
child: TextCustom(text: ID_USUARIO) Checkbox(
), value: check,
Container( onChanged:onChanged
width: width*0.1, ),
child: TextCustom(text: formataData) Container(
), width: width*0.15,
Container( child: TextCustom(text: ID_USUARIO)
width: width*0.1, ),
child: TextCustom(text: CADASTRADO_POR) Container(
), width: width*0.1,
Container( child: TextCustom(text: formataData)
width: width*0.1, ),
child: TextCustom(text: CIDADE) Container(
), width: width*0.1,
], child: TextCustom(text: CADASTRADO_POR)
),
Container(
width: width*0.1,
child: TextCustom(text: CIDADE)
),
],
),
); );
} }
} }