From d5aef78f064f25d6e9394182ea7355b1a8be861a Mon Sep 17 00:00:00 2001 From: Reginaldo Date: Tue, 8 Aug 2023 09:35:23 -0300 Subject: [PATCH] ajustes de layout --- lib/screens/home_screen.dart | 13 +++-- lib/screens/login_screen.dart | 9 ++-- lib/screens/responsible_register_screen.dart | 8 --- lib/widgets/buttom_custom.dart | 7 ++- lib/widgets/dados_responsaveis_container.dart | 53 +++++++++++-------- lib/widgets/input_text.dart | 4 +- 6 files changed, 48 insertions(+), 46 deletions(-) diff --git a/lib/screens/home_screen.dart b/lib/screens/home_screen.dart index 72927d3..ecb6b28 100644 --- a/lib/screens/home_screen.dart +++ b/lib/screens/home_screen.dart @@ -189,7 +189,6 @@ class _HomeScreenState extends State { text: showEscola?'Cadastrar Pais':'Cadastrar Usuários', fontSize: 15, widthCustom: 0.1, - heightCustom: 0.05, colorButton: PaletteColors.primaryColor, colorText: PaletteColors.white, colorBorder: PaletteColors.white @@ -218,7 +217,7 @@ class _HomeScreenState extends State { Padding( padding: EdgeInsets.symmetric(horizontal: width>900?width*0.1:width*0.05), child: Row( - crossAxisAlignment: CrossAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.end, children: [ InputText( hint: 'Pesquisar por login do usuário'.toUpperCase(), @@ -228,9 +227,9 @@ class _HomeScreenState extends State { fontSize: 14, colorBackground: Colors.white, ), + SizedBox(width: 10,), ButtonCustom( widthCustom: 0.05, - heightCustom: 0.063, text: "PESQUISAR", fontSize: 10.0, colorText: PaletteColors.white, @@ -248,9 +247,9 @@ class _HomeScreenState extends State { } }, ), + SizedBox(width: 10,), ButtonCustom( widthCustom: 0.05, - heightCustom: 0.063, text: "LIMPAR", fontSize: 10.0, colorText: PaletteColors.white, @@ -334,7 +333,7 @@ class _HomeScreenState extends State { Padding( padding: EdgeInsets.symmetric(horizontal: width>900?width*0.1:width*0.05), child: Row( - crossAxisAlignment: CrossAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.end, children: [ InputText( hint: 'Pesquisar por nome do aluno(a)'.toUpperCase(), @@ -344,9 +343,9 @@ class _HomeScreenState extends State { fontSize: 14, colorBackground: Colors.white, ), + SizedBox(width: 10,), ButtonCustom( widthCustom: 0.05, - heightCustom: 0.063, text: "PESQUISAR", fontSize: 10.0, colorText: PaletteColors.white, @@ -363,9 +362,9 @@ class _HomeScreenState extends State { } }, ), + SizedBox(width: 10,), ButtonCustom( widthCustom: 0.05, - heightCustom: 0.063, text: "LIMPAR", fontSize: 10.0, colorText: PaletteColors.white, diff --git a/lib/screens/login_screen.dart b/lib/screens/login_screen.dart index f629fce..f93ac4b 100644 --- a/lib/screens/login_screen.dart +++ b/lib/screens/login_screen.dart @@ -24,11 +24,11 @@ class _LoginScreenState extends State { //las1594@@ //SENHAS CRIPTOGRAFADAS PORQUE FORMA ALTERADAS, SENHAS NOVAS USUÁRIO E SENHA SÃO IGUAIS //ibueno - // final inputLogin = TextEditingController(text: 'admin'); - // final inputSenha = TextEditingController(text: 'las1594@@'); + final inputLogin = TextEditingController(text: 'admin'); + final inputSenha = TextEditingController(text: 'las1594@@'); // final inputCodigo = TextEditingController(text: 'e003'); - final inputLogin = TextEditingController(); - final inputSenha = TextEditingController(); + // final inputLogin = TextEditingController(); + // final inputSenha = TextEditingController(); final inputCodigo = TextEditingController(); bool carregando = false; List listCodigo = []; @@ -221,7 +221,6 @@ class _LoginScreenState extends State { ], ):ButtonCustom( widthCustom: 0.1, - heightCustom: 0.07, text: "ENTRAR", fontSize: 14.0, colorText: PaletteColors.white, diff --git a/lib/screens/responsible_register_screen.dart b/lib/screens/responsible_register_screen.dart index bab70a4..705aaeb 100644 --- a/lib/screens/responsible_register_screen.dart +++ b/lib/screens/responsible_register_screen.dart @@ -386,7 +386,6 @@ class _ResponsibleRegisterScreenState extends State { }), text: 'Cancelar', widthCustom: 0.1, - heightCustom: 0.05, colorText: Colors.white, colorBorder: PaletteColors.primaryColor, colorButton: PaletteColors.primaryColor, @@ -400,7 +399,6 @@ class _ResponsibleRegisterScreenState extends State { }, text: 'Salvar', widthCustom: 0.1, - heightCustom: 0.05, colorText: Colors.white, colorBorder: PaletteColors.green, colorButton: PaletteColors.green, @@ -452,7 +450,6 @@ class _ResponsibleRegisterScreenState extends State { onPressed:()=>Navigator.pop(context), text: 'NÃO', widthCustom: 0.1, - heightCustom: 0.05, colorText: Colors.white, colorBorder: PaletteColors.bgColor, colorButton: PaletteColors.bgColor, @@ -462,7 +459,6 @@ class _ResponsibleRegisterScreenState extends State { onPressed:()=>excluirResponsavel(index, responsaveis[index].CPF), text: 'SIM', widthCustom: 0.1, - heightCustom: 0.05, colorText: Colors.white, colorBorder: PaletteColors.primaryColor, colorButton: PaletteColors.primaryColor, @@ -484,7 +480,6 @@ class _ResponsibleRegisterScreenState extends State { onPressed:()=>Navigator.pop(context), text: 'NÃO', widthCustom: 0.1, - heightCustom: 0.05, colorText: Colors.white, colorBorder: PaletteColors.bgColor, colorButton: PaletteColors.bgColor, @@ -501,7 +496,6 @@ class _ResponsibleRegisterScreenState extends State { }, text: 'SIM', widthCustom: 0.1, - heightCustom: 0.05, colorText: Colors.white, colorBorder: PaletteColors.primaryColor, colorButton: PaletteColors.primaryColor, @@ -523,7 +517,6 @@ class _ResponsibleRegisterScreenState extends State { onPressed:()=>Navigator.pop(context), text: 'NÃO', widthCustom: 0.1, - heightCustom: 0.05, colorText: Colors.white, colorBorder: PaletteColors.bgColor, colorButton: PaletteColors.bgColor, @@ -539,7 +532,6 @@ class _ResponsibleRegisterScreenState extends State { }, text: 'SIM', widthCustom: 0.1, - heightCustom: 0.05, colorText: Colors.white, colorBorder: PaletteColors.primaryColor, colorButton: PaletteColors.primaryColor, diff --git a/lib/widgets/buttom_custom.dart b/lib/widgets/buttom_custom.dart index c945282..fdd08aa 100644 --- a/lib/widgets/buttom_custom.dart +++ b/lib/widgets/buttom_custom.dart @@ -8,7 +8,7 @@ class ButtonCustom extends StatelessWidget{ final Color colorText; final Color colorBorder; final widthCustom; - final heightCustom; + final double height; ButtonCustom({ required this.onPressed, @@ -18,17 +18,16 @@ ButtonCustom({ required this.colorText, required this.colorBorder, this.widthCustom = 1.0, - this.heightCustom = 1.0 + this.height = 42.0, }); @override Widget build (BuildContext context) { double width =MediaQuery.of(context).size.width; - double height =MediaQuery.of(context).size.height; return ElevatedButton( style: ElevatedButton.styleFrom( primary: colorButton, - minimumSize: Size(width*widthCustom! , height*heightCustom!), + minimumSize: Size(width*widthCustom! , height), side: BorderSide(width: 2,color : colorBorder,), ), onPressed: onPressed, diff --git a/lib/widgets/dados_responsaveis_container.dart b/lib/widgets/dados_responsaveis_container.dart index f5f4c25..ed8317e 100644 --- a/lib/widgets/dados_responsaveis_container.dart +++ b/lib/widgets/dados_responsaveis_container.dart @@ -45,30 +45,41 @@ class DadosResponsaveisContainer extends StatelessWidget { CaixaTextoContainer(texto: responsavelModel.NOME,titulo: 'Nome',widthCustom: 0.15), CaixaTextoContainer(texto: responsavelModel.PARENTESCO,titulo: 'Parentesco',widthCustom: 0.1,), responsavelModel.CPF!='' && responsavelModel.SENHA!=''?Container( - alignment: Alignment.bottomCenter, + height: 12, + alignment: Alignment.center, margin: EdgeInsets.all(5), child: Icon(Icons.check_circle,color: Colors.green,), - ):Container(), - ButtonCustom( - text: 'Resetar Senha', - fontSize: 14.0, - colorButton: PaletteColors.grey, - colorText: PaletteColors.white, - colorBorder: PaletteColors.grey, - onPressed:resetarSenha, - heightCustom: 0.05, - widthCustom: 0.05, + ):Container(height: 12,width: 30,), + Column( + children: [ + SizedBox(height: 12,), + ButtonCustom( + text: 'Resetar Senha', + fontSize: 14.0, + colorButton: PaletteColors.grey, + colorText: PaletteColors.white, + colorBorder: PaletteColors.grey, + onPressed:resetarSenha, + widthCustom: 0.05, + height: 39, + ), + ], ), - SizedBox(width: 10,), - responsavelModel.CPF!='' && responsavelModel.SENHA!=''?ButtonCustom( - text: 'Bloquear Responsável', - fontSize: 14.0, - colorButton: PaletteColors.primaryColor, - colorText: PaletteColors.white, - colorBorder: PaletteColors.primaryColor, - onPressed:bloquearSenha, - heightCustom: 0.05, - widthCustom: 0.05, + SizedBox(width: 15,), + responsavelModel.CPF!='' && responsavelModel.SENHA!=''?Column( + children: [ + SizedBox(height: 12,), + ButtonCustom( + text: 'Bloquear Responsável', + fontSize: 14.0, + colorButton: PaletteColors.primaryColor, + colorText: PaletteColors.white, + colorBorder: PaletteColors.primaryColor, + onPressed:bloquearSenha, + widthCustom: 0.05, + height: 39, + ), + ], ):Container() ], ), diff --git a/lib/widgets/input_text.dart b/lib/widgets/input_text.dart index e7de370..b792104 100644 --- a/lib/widgets/input_text.dart +++ b/lib/widgets/input_text.dart @@ -43,7 +43,8 @@ class InputText extends StatelessWidget { Container( color:colorBackground, width: width, - margin: EdgeInsets.only(bottom: 5), + height: 35, + margin: EdgeInsets.only(bottom: 0), child: TextFormField( inputFormatters: inputFormatters, keyboardType: textInputType, @@ -52,6 +53,7 @@ class InputText extends StatelessWidget { obscureText: this.obscure, controller: this.controller, enabled: enable, + textAlignVertical: TextAlignVertical.bottom, style: TextStyle( color: Colors.black, fontSize: this.fontSize,