inserida a possibilidade de resetar a senha e bloquear o responsável
This commit is contained in:
@@ -186,7 +186,7 @@ class _HomeScreenState extends State<HomeScreen> {
|
|||||||
setState(()=>showEscola?showEscola=false:showEscola=true);
|
setState(()=>showEscola?showEscola=false:showEscola=true);
|
||||||
},
|
},
|
||||||
text: showEscola?'Cadastrar Pais':'Cadastrar Usuários',
|
text: showEscola?'Cadastrar Pais':'Cadastrar Usuários',
|
||||||
size: 15,
|
fontSize: 15,
|
||||||
widthCustom: 0.1,
|
widthCustom: 0.1,
|
||||||
heightCustom: 0.05,
|
heightCustom: 0.05,
|
||||||
colorButton: PaletteColors.primaryColor,
|
colorButton: PaletteColors.primaryColor,
|
||||||
@@ -231,7 +231,7 @@ class _HomeScreenState extends State<HomeScreen> {
|
|||||||
widthCustom: 0.05,
|
widthCustom: 0.05,
|
||||||
heightCustom: 0.063,
|
heightCustom: 0.063,
|
||||||
text: "PESQUISAR",
|
text: "PESQUISAR",
|
||||||
size: 10.0,
|
fontSize: 10.0,
|
||||||
colorText: PaletteColors.white,
|
colorText: PaletteColors.white,
|
||||||
colorButton: PaletteColors.green,
|
colorButton: PaletteColors.green,
|
||||||
colorBorder: PaletteColors.green,
|
colorBorder: PaletteColors.green,
|
||||||
@@ -251,7 +251,7 @@ class _HomeScreenState extends State<HomeScreen> {
|
|||||||
widthCustom: 0.05,
|
widthCustom: 0.05,
|
||||||
heightCustom: 0.063,
|
heightCustom: 0.063,
|
||||||
text: "LIMPAR",
|
text: "LIMPAR",
|
||||||
size: 10.0,
|
fontSize: 10.0,
|
||||||
colorText: PaletteColors.white,
|
colorText: PaletteColors.white,
|
||||||
colorButton: PaletteColors.primaryColor,
|
colorButton: PaletteColors.primaryColor,
|
||||||
colorBorder: PaletteColors.primaryColor,
|
colorBorder: PaletteColors.primaryColor,
|
||||||
@@ -347,7 +347,7 @@ class _HomeScreenState extends State<HomeScreen> {
|
|||||||
widthCustom: 0.05,
|
widthCustom: 0.05,
|
||||||
heightCustom: 0.063,
|
heightCustom: 0.063,
|
||||||
text: "PESQUISAR",
|
text: "PESQUISAR",
|
||||||
size: 10.0,
|
fontSize: 10.0,
|
||||||
colorText: PaletteColors.white,
|
colorText: PaletteColors.white,
|
||||||
colorButton: PaletteColors.green,
|
colorButton: PaletteColors.green,
|
||||||
colorBorder: PaletteColors.green,
|
colorBorder: PaletteColors.green,
|
||||||
@@ -366,7 +366,7 @@ class _HomeScreenState extends State<HomeScreen> {
|
|||||||
widthCustom: 0.05,
|
widthCustom: 0.05,
|
||||||
heightCustom: 0.063,
|
heightCustom: 0.063,
|
||||||
text: "LIMPAR",
|
text: "LIMPAR",
|
||||||
size: 10.0,
|
fontSize: 10.0,
|
||||||
colorText: PaletteColors.white,
|
colorText: PaletteColors.white,
|
||||||
colorButton: PaletteColors.primaryColor,
|
colorButton: PaletteColors.primaryColor,
|
||||||
colorBorder: PaletteColors.primaryColor,
|
colorBorder: PaletteColors.primaryColor,
|
||||||
|
|||||||
@@ -197,7 +197,7 @@ class _LoginScreenState extends State<LoginScreen> {
|
|||||||
widthCustom: 0.1,
|
widthCustom: 0.1,
|
||||||
heightCustom: 0.07,
|
heightCustom: 0.07,
|
||||||
text: "ENTRAR",
|
text: "ENTRAR",
|
||||||
size: 14.0,
|
fontSize: 14.0,
|
||||||
colorText: PaletteColors.white,
|
colorText: PaletteColors.white,
|
||||||
colorButton: PaletteColors.primaryColor,
|
colorButton: PaletteColors.primaryColor,
|
||||||
colorBorder: PaletteColors.primaryColor,
|
colorBorder: PaletteColors.primaryColor,
|
||||||
|
|||||||
@@ -33,59 +33,74 @@ class _ResponsibleRegisterScreenState extends State<ResponsibleRegisterScreen> {
|
|||||||
var inputNome = TextEditingController();
|
var inputNome = TextEditingController();
|
||||||
var inputParentesco = TextEditingController();
|
var inputParentesco = TextEditingController();
|
||||||
var inputCpf = TextEditingController();
|
var inputCpf = TextEditingController();
|
||||||
var inputSenha = TextEditingController();
|
// var inputSenha = TextEditingController();
|
||||||
var inputData = TextEditingController();
|
var inputData = TextEditingController();
|
||||||
bool carregando = true;
|
bool carregando = true;
|
||||||
|
|
||||||
inserirDB()async{
|
bloquearResponsavel(int index)async{
|
||||||
final url = 'http://192.168.18.2:8000/inserirpais';
|
final url = 'http://192.168.18.2:8000/inserirpais';
|
||||||
|
|
||||||
final response = await http.post(
|
final response = await http.post(
|
||||||
Uri.parse(url),
|
Uri.parse(url),
|
||||||
body:{
|
body:{
|
||||||
'CD_ALUNO' : widget.alunoModel.dados['CD_ALUNO'],
|
'CD_ALUNO' : widget.alunoModel.dados['CD_ALUNO'],
|
||||||
'ALUNO': widget.alunoModel.dados['NO_ALUNO'],
|
'ALUNO': widget.alunoModel.dados['NO_ALUNO'],
|
||||||
'CPF': inputCpf.text,
|
'CPF': responsaveis[index].CPF,
|
||||||
'NOME' : inputNome.text,
|
'NOME' : responsaveis[index].NOME,
|
||||||
'SENHA' : inputSenha.text,
|
'SENHA' : responsaveis[index].SENHA,
|
||||||
'PARENTESCO' : inputParentesco.text,
|
'PARENTESCO' : responsaveis[index].PARENTESCO,
|
||||||
'DATA_CADASTRO' : DateFormat('dd/MM/yyyy HH:mm').format(DateTime.now()),
|
'DATA_CADASTRO' : DateFormat('dd/MM/yyyy HH:mm').format(DateTime.now()),
|
||||||
'CONDICAO' : editando?'EDITADO':'NOVO',
|
'CONDICAO' : 'BLOQUEADO',
|
||||||
'CIDADE' : widget.alunoModel.cidade
|
'CIDADE' : widget.alunoModel.cidade
|
||||||
}
|
}
|
||||||
|
);
|
||||||
|
if(response.body == 'cadastrado com sucesso' || response.body == 'editado com sucesso'){
|
||||||
|
editando?
|
||||||
|
showSnackBar(context, 'Responsável alterado!', Colors.green):
|
||||||
|
showSnackBar(context, 'Responsável adicionado!', Colors.green);
|
||||||
|
|
||||||
|
inputNome.clear();
|
||||||
|
inputParentesco.clear();
|
||||||
|
inputCpf.clear();
|
||||||
|
showRegister = false;
|
||||||
|
editando = false;
|
||||||
|
indice = null;
|
||||||
|
inputData.clear();
|
||||||
|
paisBanco();
|
||||||
|
setState((){});
|
||||||
|
|
||||||
|
}else{
|
||||||
|
carregando = false;
|
||||||
|
setState((){});
|
||||||
|
showSnackBar(context, 'Erro ao fazer o registro, verifique os dados do usuário', Colors.red);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
inserirDB(int index)async{
|
||||||
|
final url = 'http://192.168.18.2:8000/inserirpais';
|
||||||
|
|
||||||
|
final response = await http.post(
|
||||||
|
Uri.parse(url),
|
||||||
|
body:{
|
||||||
|
'CD_ALUNO' : widget.alunoModel.dados['CD_ALUNO'],
|
||||||
|
'ALUNO': widget.alunoModel.dados['NO_ALUNO'],
|
||||||
|
'CPF': responsaveis[index].CPF,
|
||||||
|
'NOME' : responsaveis[index].NOME,
|
||||||
|
'SENHA' : editando?responsaveis[index].SENHA: responsaveis[index].CPF.replaceAll('-','').replaceAll('.', ''),
|
||||||
|
'PARENTESCO' : responsaveis[index].PARENTESCO,
|
||||||
|
'DATA_CADASTRO' : DateFormat('dd/MM/yyyy HH:mm').format(DateTime.now()),
|
||||||
|
'CONDICAO' : editando?'EDITADO':'NOVO',
|
||||||
|
'CIDADE' : widget.alunoModel.cidade
|
||||||
|
}
|
||||||
);
|
);
|
||||||
print(response.body);
|
|
||||||
if(response.body == 'cadastrado com sucesso' || response.body == 'editado com sucesso'){
|
if(response.body == 'cadastrado com sucesso' || response.body == 'editado com sucesso'){
|
||||||
editando?
|
editando?
|
||||||
showSnackBar(context, 'Responsável alterado!', Colors.green):
|
showSnackBar(context, 'Responsável alterado!', Colors.green):
|
||||||
showSnackBar(context, 'Responsável adicionado!', Colors.green);
|
showSnackBar(context, 'Responsável adicionado!', Colors.green);
|
||||||
|
|
||||||
if(editando && indice!=null){
|
|
||||||
responsaveis[indice!] = ResponsavelModel(
|
|
||||||
CD_ALUNO: widget.alunoModel.dados['CD_ALUNO'],
|
|
||||||
NOME: inputNome.text,
|
|
||||||
PARENTESCO: inputParentesco.text,
|
|
||||||
CPF: inputCpf.text,
|
|
||||||
SENHA: inputSenha.text,
|
|
||||||
DATA_CADASTRO: DateFormat('dd/MM/yyyy HH:mm').format(DateTime.now()),
|
|
||||||
CONDICAO: ''
|
|
||||||
);
|
|
||||||
}else{
|
|
||||||
responsaveis.add(
|
|
||||||
ResponsavelModel(
|
|
||||||
CD_ALUNO: widget.alunoModel.dados['CD_ALUNO'],
|
|
||||||
NOME: inputNome.text.toUpperCase(),
|
|
||||||
PARENTESCO: inputParentesco.text.toUpperCase(),
|
|
||||||
CPF: inputCpf.text,
|
|
||||||
SENHA: inputSenha.text.toUpperCase(),
|
|
||||||
DATA_CADASTRO: DateFormat('dd/MM/yyyy HH:mm').format(DateTime.now()),
|
|
||||||
CONDICAO: ''
|
|
||||||
)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
inputNome.clear();
|
inputNome.clear();
|
||||||
inputParentesco.clear();
|
inputParentesco.clear();
|
||||||
inputCpf.clear();
|
inputCpf.clear();
|
||||||
inputSenha.clear();
|
|
||||||
showRegister = false;
|
showRegister = false;
|
||||||
editando = false;
|
editando = false;
|
||||||
indice = null;
|
indice = null;
|
||||||
@@ -104,14 +119,10 @@ class _ResponsibleRegisterScreenState extends State<ResponsibleRegisterScreen> {
|
|||||||
if(inputNome.text.isNotEmpty && inputNome.text.contains(' ')){
|
if(inputNome.text.isNotEmpty && inputNome.text.contains(' ')){
|
||||||
if(inputParentesco.text.isNotEmpty){
|
if(inputParentesco.text.isNotEmpty){
|
||||||
if(inputCpf.text.isNotEmpty && GetUtils.isCpf(inputCpf.text)){
|
if(inputCpf.text.isNotEmpty && GetUtils.isCpf(inputCpf.text)){
|
||||||
if(inputSenha.text.isNotEmpty && inputSenha.text.length > 5){
|
setState(() {
|
||||||
setState(() {
|
carregando = true;
|
||||||
carregando = true;
|
});
|
||||||
});
|
inserirDB(indice!);
|
||||||
inserirDB();
|
|
||||||
}else{
|
|
||||||
showSnackBar(context, 'Insira o uma senha com o mínimo de 6 caracteres', Colors.red);
|
|
||||||
}
|
|
||||||
}else{
|
}else{
|
||||||
showSnackBar(context, 'CPF inválido', Colors.red);
|
showSnackBar(context, 'CPF inválido', Colors.red);
|
||||||
}
|
}
|
||||||
@@ -347,16 +358,6 @@ class _ResponsibleRegisterScreenState extends State<ResponsibleRegisterScreen> {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Container(
|
|
||||||
width: width>900? width * 0.18:width*0.4,
|
|
||||||
child: InputText(
|
|
||||||
inputFormatters: [],
|
|
||||||
controller: inputSenha,
|
|
||||||
title: 'Senha',
|
|
||||||
width: width * 0.18,
|
|
||||||
colorBorder: PaletteColors.white,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
editando?Container(
|
editando?Container(
|
||||||
width: width>900? width * 0.18:width*0.4,
|
width: width>900? width * 0.18:width*0.4,
|
||||||
child: InputText(
|
child: InputText(
|
||||||
@@ -380,7 +381,6 @@ class _ResponsibleRegisterScreenState extends State<ResponsibleRegisterScreen> {
|
|||||||
inputData.clear();
|
inputData.clear();
|
||||||
inputNome.clear();
|
inputNome.clear();
|
||||||
inputParentesco.clear();
|
inputParentesco.clear();
|
||||||
inputSenha.clear();
|
|
||||||
inputCpf.clear();
|
inputCpf.clear();
|
||||||
}),
|
}),
|
||||||
text: 'Cancelar',
|
text: 'Cancelar',
|
||||||
@@ -389,18 +389,21 @@ class _ResponsibleRegisterScreenState extends State<ResponsibleRegisterScreen> {
|
|||||||
colorText: Colors.white,
|
colorText: Colors.white,
|
||||||
colorBorder: PaletteColors.primaryColor,
|
colorBorder: PaletteColors.primaryColor,
|
||||||
colorButton: PaletteColors.primaryColor,
|
colorButton: PaletteColors.primaryColor,
|
||||||
size: 15,
|
fontSize: 15,
|
||||||
),
|
),
|
||||||
SizedBox(width: 50,),
|
SizedBox(width: 50,),
|
||||||
ButtonCustom(
|
ButtonCustom(
|
||||||
onPressed:()=>salvarResponsavel(),
|
onPressed:(){
|
||||||
|
responsaveis[indice!].CPF = inputCpf.text;
|
||||||
|
salvarResponsavel();
|
||||||
|
},
|
||||||
text: 'Salvar',
|
text: 'Salvar',
|
||||||
widthCustom: 0.1,
|
widthCustom: 0.1,
|
||||||
heightCustom: 0.05,
|
heightCustom: 0.05,
|
||||||
colorText: Colors.white,
|
colorText: Colors.white,
|
||||||
colorBorder: PaletteColors.green,
|
colorBorder: PaletteColors.green,
|
||||||
colorButton: PaletteColors.green,
|
colorButton: PaletteColors.green,
|
||||||
size: 15,
|
fontSize: 15,
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
@@ -433,12 +436,10 @@ class _ResponsibleRegisterScreenState extends State<ResponsibleRegisterScreen> {
|
|||||||
inputNome.text = responsaveis[index].NOME;
|
inputNome.text = responsaveis[index].NOME;
|
||||||
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;
|
|
||||||
inputData.text = responsaveis[index].DATA_CADASTRO;
|
inputData.text = responsaveis[index].DATA_CADASTRO;
|
||||||
setState(() {});
|
setState(() {});
|
||||||
},
|
},
|
||||||
onTapDelete: (){
|
onTapDelete: (){
|
||||||
|
|
||||||
showDialog(
|
showDialog(
|
||||||
context: context,
|
context: context,
|
||||||
builder: (BuildContext context){
|
builder: (BuildContext context){
|
||||||
@@ -454,7 +455,7 @@ class _ResponsibleRegisterScreenState extends State<ResponsibleRegisterScreen> {
|
|||||||
colorText: Colors.white,
|
colorText: Colors.white,
|
||||||
colorBorder: PaletteColors.bgColor,
|
colorBorder: PaletteColors.bgColor,
|
||||||
colorButton: PaletteColors.bgColor,
|
colorButton: PaletteColors.bgColor,
|
||||||
size: 15,
|
fontSize: 15,
|
||||||
),
|
),
|
||||||
ButtonCustom(
|
ButtonCustom(
|
||||||
onPressed:()=>excluirResponsavel(index, responsaveis[index].CPF),
|
onPressed:()=>excluirResponsavel(index, responsaveis[index].CPF),
|
||||||
@@ -464,7 +465,84 @@ class _ResponsibleRegisterScreenState extends State<ResponsibleRegisterScreen> {
|
|||||||
colorText: Colors.white,
|
colorText: Colors.white,
|
||||||
colorBorder: PaletteColors.primaryColor,
|
colorBorder: PaletteColors.primaryColor,
|
||||||
colorButton: PaletteColors.primaryColor,
|
colorButton: PaletteColors.primaryColor,
|
||||||
size: 15,
|
fontSize: 15,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
resetarSenha: (){
|
||||||
|
showDialog(
|
||||||
|
context: context,
|
||||||
|
builder: (BuildContext context){
|
||||||
|
return AlertDialog(
|
||||||
|
title: TextCustom(text: 'Resetar senha'),
|
||||||
|
content: TextCustom(text:'Deseja realmente resetar a senha desse responsável?',),
|
||||||
|
actions: [
|
||||||
|
ButtonCustom(
|
||||||
|
onPressed:()=>Navigator.pop(context),
|
||||||
|
text: 'NÃO',
|
||||||
|
widthCustom: 0.1,
|
||||||
|
heightCustom: 0.05,
|
||||||
|
colorText: Colors.white,
|
||||||
|
colorBorder: PaletteColors.bgColor,
|
||||||
|
colorButton: PaletteColors.bgColor,
|
||||||
|
fontSize: 15,
|
||||||
|
),
|
||||||
|
ButtonCustom(
|
||||||
|
onPressed:(){
|
||||||
|
Navigator.pop(context);
|
||||||
|
editando = true;
|
||||||
|
responsaveis[index].SENHA = responsaveis[index].CPF.toString().replaceAll('-', '').replaceAll('.', '');
|
||||||
|
carregando = true;
|
||||||
|
setState(() {});
|
||||||
|
inserirDB(index);
|
||||||
|
},
|
||||||
|
text: 'SIM',
|
||||||
|
widthCustom: 0.1,
|
||||||
|
heightCustom: 0.05,
|
||||||
|
colorText: Colors.white,
|
||||||
|
colorBorder: PaletteColors.primaryColor,
|
||||||
|
colorButton: PaletteColors.primaryColor,
|
||||||
|
fontSize: 15,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
bloquearSenha: (){
|
||||||
|
showDialog(
|
||||||
|
context: context,
|
||||||
|
builder: (BuildContext context){
|
||||||
|
return AlertDialog(
|
||||||
|
title: TextCustom(text: 'Bloquear'),
|
||||||
|
content: TextCustom(text:'Deseja realmente bloquear esse responsável?',),
|
||||||
|
actions: [
|
||||||
|
ButtonCustom(
|
||||||
|
onPressed:()=>Navigator.pop(context),
|
||||||
|
text: 'NÃO',
|
||||||
|
widthCustom: 0.1,
|
||||||
|
heightCustom: 0.05,
|
||||||
|
colorText: Colors.white,
|
||||||
|
colorBorder: PaletteColors.bgColor,
|
||||||
|
colorButton: PaletteColors.bgColor,
|
||||||
|
fontSize: 15,
|
||||||
|
),
|
||||||
|
ButtonCustom(
|
||||||
|
onPressed:(){
|
||||||
|
Navigator.pop(context);
|
||||||
|
editando = true;
|
||||||
|
carregando = true;
|
||||||
|
setState(() {});
|
||||||
|
bloquearResponsavel(index);
|
||||||
|
},
|
||||||
|
text: 'SIM',
|
||||||
|
widthCustom: 0.1,
|
||||||
|
heightCustom: 0.05,
|
||||||
|
colorText: Colors.white,
|
||||||
|
colorBorder: PaletteColors.primaryColor,
|
||||||
|
colorButton: PaletteColors.primaryColor,
|
||||||
|
fontSize: 15,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import 'package:flutter/material.dart';
|
|||||||
class ButtonCustom extends StatelessWidget{
|
class ButtonCustom extends StatelessWidget{
|
||||||
final VoidCallback onPressed;
|
final VoidCallback onPressed;
|
||||||
final String text;
|
final String text;
|
||||||
final double size;
|
final double fontSize;
|
||||||
final Color colorButton;
|
final Color colorButton;
|
||||||
final Color colorText;
|
final Color colorText;
|
||||||
final Color colorBorder;
|
final Color colorBorder;
|
||||||
@@ -13,7 +13,7 @@ class ButtonCustom extends StatelessWidget{
|
|||||||
ButtonCustom({
|
ButtonCustom({
|
||||||
required this.onPressed,
|
required this.onPressed,
|
||||||
required this.text,
|
required this.text,
|
||||||
required this.size,
|
required this.fontSize,
|
||||||
required this.colorButton,
|
required this.colorButton,
|
||||||
required this.colorText,
|
required this.colorText,
|
||||||
required this.colorBorder,
|
required this.colorBorder,
|
||||||
@@ -35,7 +35,7 @@ ButtonCustom({
|
|||||||
child: Text(text,
|
child: Text(text,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: colorText,
|
color: colorText,
|
||||||
fontSize: size,
|
fontSize: fontSize,
|
||||||
fontWeight: FontWeight.bold
|
fontWeight: FontWeight.bold
|
||||||
),
|
),
|
||||||
) ,
|
) ,
|
||||||
|
|||||||
@@ -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 'buttom_custom.dart';
|
||||||
import 'caixa_texto_container.dart';
|
import 'caixa_texto_container.dart';
|
||||||
|
|
||||||
class DadosResponsaveisContainer extends StatelessWidget {
|
class DadosResponsaveisContainer extends StatelessWidget {
|
||||||
@@ -11,11 +12,15 @@ class DadosResponsaveisContainer extends StatelessWidget {
|
|||||||
ResponsavelModel responsavelModel;
|
ResponsavelModel responsavelModel;
|
||||||
var onTapEdit;
|
var onTapEdit;
|
||||||
var onTapDelete;
|
var onTapDelete;
|
||||||
|
var resetarSenha;
|
||||||
|
var bloquearSenha;
|
||||||
|
|
||||||
DadosResponsaveisContainer({
|
DadosResponsaveisContainer({
|
||||||
required this.responsavelModel,
|
required this.responsavelModel,
|
||||||
required this.onTapEdit,
|
required this.onTapEdit,
|
||||||
required this.onTapDelete
|
required this.onTapDelete,
|
||||||
|
required this.resetarSenha,
|
||||||
|
required this.bloquearSenha
|
||||||
});
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@@ -32,7 +37,7 @@ class DadosResponsaveisContainer extends StatelessWidget {
|
|||||||
icon: Icon(Icons.delete,color: PaletteColors.grey,),
|
icon: Icon(Icons.delete,color: PaletteColors.grey,),
|
||||||
),
|
),
|
||||||
Container(
|
Container(
|
||||||
width: width*0.35,
|
width: width*0.5,
|
||||||
padding: EdgeInsets.symmetric(vertical: 10,horizontal: 5),
|
padding: EdgeInsets.symmetric(vertical: 10,horizontal: 5),
|
||||||
child: Row(
|
child: Row(
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
@@ -43,6 +48,27 @@ class DadosResponsaveisContainer extends StatelessWidget {
|
|||||||
alignment: Alignment.bottomCenter,
|
alignment: Alignment.bottomCenter,
|
||||||
margin: EdgeInsets.all(5),
|
margin: EdgeInsets.all(5),
|
||||||
child: Icon(Icons.check_circle,color: Colors.green,),
|
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,
|
||||||
|
),
|
||||||
|
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,
|
||||||
):Container()
|
):Container()
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user