ajustes na tela de Atendimento Domiliar, nos models e alert dialog

This commit is contained in:
Reginaldo
2023-05-05 17:49:04 -03:00
parent 899cf51fe0
commit 532d186d5b
8 changed files with 507 additions and 147 deletions

View File

@@ -138,7 +138,7 @@ class AlertDialogDefault {
);
}
outherProfessionals(
otherProfessionals(
BuildContext context,String title,String subtitle,String? selectProfessionals,String? selectCBO,String add
) {
@@ -254,7 +254,7 @@ class AlertDialogDefault {
);
}
outherExams(
otherExams(
BuildContext context,
String title,String subtitle,
String? selectProfessionals,
@@ -404,4 +404,130 @@ class AlertDialogDefault {
}
);
}
otherProc(
BuildContext context,
String title,
String subtitle,
String? selectProfessionals,
String? selectCBO,
String add,
List list,
List listProc,
) {
double width = MediaQuery.of(context).size.width;
double height = MediaQuery.of(context).size.height;
return showDialog(
context: context,
builder: (context){
return StatefulBuilder(
builder:(context,setState)=> AlertDialog(
titlePadding: EdgeInsets.all(0),
contentPadding: EdgeInsets.all(0),
title: Container(
padding: EdgeInsets.all(10),
color: ColorPalette.blackButton,
child: TextDefault(
text: title,
color: ColorPalette.white,
textAlign: TextAlign.center,
fontWeigth: FontWeight.bold,
),
),
content: Container(
decoration: ConstVariable().backgroundGradient,
child: Column(
children: [
Card(
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
TitleContainers(title: subtitle),
DropDownButtonDefault(
onChanged: (value)=>setState((){
selectProfessionals=value;
}),
select: selectProfessionals,
title: 'Procedimento',
list: list,
width: width
),
ButtonDefault(
onPressed:(){
listProc.add(selectProfessionals);
setState((){});
},
title: 'Adicionar',
width: width*0.8,
textColor: ColorPalette.white,
borderColor:ColorPalette.appBar,
background: ColorPalette.appBar,
disableColor: ColorPalette.buttonDisable,
)
],
),
),
Card(
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
TitleContainers(title: 'Procedimentos'),
list.length!=0
?Container(
width: width*0.8,
height: height*0.4,
child: ListView.builder(
itemCount: listProc.length,
itemBuilder: (context,index) {
return Container(
width: width * 0.8,
padding: EdgeInsets.all(10),
child: Row(
children: [
Container(
width: width * 0.65,
child: TextDefault(
fontSize: 15,
text: listProc[index],
color: ColorPalette.black54,)
),
Spacer(),
IconButton(
icon: Icon(Icons.delete),
onPressed: () =>
setState(() {
listProc.removeAt(index);
}),
)
],
),
);
}
),
)
:Container()
],
),
)
],
),
),
actionsAlignment: MainAxisAlignment.start,
actions: [
ButtonDefault(
onPressed: ()=>Navigator.pop(context),
title: 'Fechar',
width: width*0.2,
textColor: ColorPalette.black54,
borderColor: ColorPalette.white,
background: ColorPalette.white,
)
],
),
);
}
);
}
}

View File

@@ -15,7 +15,7 @@ class CheckBoxSubtitle extends StatelessWidget {
required this.checkbox,
required this.subtitle,
required this.onChanged,
this.fontSize = 15
this.fontSize = 14
});
@override