92 lines
3.3 KiB
Dart
92 lines
3.3 KiB
Dart
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';
|
|
import 'buttom_custom.dart';
|
|
import 'caixa_texto_container.dart';
|
|
|
|
class DadosResponsaveisContainer extends StatelessWidget {
|
|
|
|
ResponsavelModel responsavelModel;
|
|
var onTapEdit;
|
|
var onTapDelete;
|
|
var resetarSenha;
|
|
var bloquearSenha;
|
|
|
|
DadosResponsaveisContainer({
|
|
required this.responsavelModel,
|
|
required this.onTapEdit,
|
|
required this.onTapDelete,
|
|
required this.resetarSenha,
|
|
required this.bloquearSenha,
|
|
});
|
|
|
|
@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.5,
|
|
padding: EdgeInsets.symmetric(vertical: 10,horizontal: 5),
|
|
child: Row(
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
children: [
|
|
CaixaTextoContainer(texto: responsavelModel.NOME,titulo: 'Nome',widthCustom: 0.15),
|
|
CaixaTextoContainer(texto: responsavelModel.PARENTESCO,titulo: 'Parentesco',widthCustom: 0.1,),
|
|
responsavelModel.CPF!='' && responsavelModel.SENHA!=''?Container(
|
|
height: 12,
|
|
alignment: Alignment.center,
|
|
margin: EdgeInsets.all(5),
|
|
child: Icon(Icons.check_circle,color: Colors.green,),
|
|
):Container(height: 12,width: 30,),
|
|
Column(
|
|
children: [
|
|
responsavelModel.CONDICAO=='BLOQUEADO'?Container():SizedBox(height: 12,),
|
|
responsavelModel.CONDICAO=='BLOQUEADO'||responsavelModel.CONDICAO==''?Container(): 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: 15,),
|
|
responsavelModel.CPF!='' && responsavelModel.SENHA!=''?Column(
|
|
children: [
|
|
SizedBox(height: 12,),
|
|
ButtonCustom(
|
|
text: responsavelModel.CONDICAO=='BLOQUEADO'?'Desbloquear Responsável':'Bloquear Responsável',
|
|
fontSize: 14.0,
|
|
colorButton: PaletteColors.primaryColor,
|
|
colorText: PaletteColors.white,
|
|
colorBorder: PaletteColors.primaryColor,
|
|
onPressed:bloquearSenha,
|
|
widthCustom: 0.05,
|
|
height: 39,
|
|
),
|
|
],
|
|
):Container()
|
|
],
|
|
),
|
|
),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|