finalizada a tela service_individual_screen.dart,
ajustada service_home_screen.dart
This commit is contained in:
@@ -3,7 +3,9 @@ import 'package:rkm/utils/color_palette.dart';
|
||||
import 'package:rkm/utils/const_variable.dart';
|
||||
import 'package:rkm/widgets/button_default.dart';
|
||||
import 'package:rkm/widgets/item_alert_settings.dart';
|
||||
import 'package:rkm/widgets/switch_with_subtitle.dart';
|
||||
import 'package:rkm/widgets/text_default.dart';
|
||||
import 'package:rkm/widgets/title_containers.dart';
|
||||
|
||||
import 'dropdown_button_default.dart';
|
||||
import 'input_search_text.dart';
|
||||
@@ -137,4 +139,271 @@ class AlertDialogDefault {
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
outherProfessionals(
|
||||
BuildContext context,String title,String subtitle,String? selectProfessionals,String? selectCBO,String add
|
||||
) {
|
||||
|
||||
double width = MediaQuery.of(context).size.width;
|
||||
double height = MediaQuery.of(context).size.height;
|
||||
bool addProfissionals = false;
|
||||
|
||||
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;
|
||||
addProfissionals = true;
|
||||
}),
|
||||
select: selectProfessionals,
|
||||
title: 'Profissional',
|
||||
list: [
|
||||
'ADMINISTRADOR',
|
||||
'ALEXANDRE NITTA',
|
||||
'ALINE SUELEM LEITE',
|
||||
'ARIANE FAVORATO ROSA',
|
||||
],
|
||||
width: width
|
||||
),
|
||||
DropDownButtonDefault(
|
||||
onChanged: (value)=>setState(()=>selectCBO=value),
|
||||
select: selectCBO,
|
||||
title: 'CBO',
|
||||
list: [],
|
||||
width: width
|
||||
),
|
||||
ButtonDefault(
|
||||
onPressed:addProfissionals?()=>setState((){
|
||||
add = selectProfessionals!;
|
||||
}):null,
|
||||
title: 'Adicionar',
|
||||
width: width*0.85,
|
||||
textColor: ColorPalette.white,
|
||||
borderColor:addProfissionals?ColorPalette.appBar:ColorPalette.buttonDisable,
|
||||
background: ColorPalette.appBar,
|
||||
disableColor: ColorPalette.buttonDisable,
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
Card(
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
TitleContainers(title: 'Profissionais'),
|
||||
add!=''
|
||||
?Container(
|
||||
padding: EdgeInsets.all(10),
|
||||
child: Row(
|
||||
children: [
|
||||
TextDefault(text: add,color: ColorPalette.black54,),
|
||||
Spacer(),
|
||||
IconButton(
|
||||
icon: Icon(Icons.delete),
|
||||
onPressed: ()=>setState((){
|
||||
add='';
|
||||
addProfissionals = false;
|
||||
}),
|
||||
)
|
||||
],
|
||||
),
|
||||
)
|
||||
: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,
|
||||
)
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
outherExams(
|
||||
BuildContext context,
|
||||
String title,String subtitle,
|
||||
String? selectProfessionals,
|
||||
String? selectCBO,
|
||||
String add,
|
||||
List examsList,
|
||||
bool requested,
|
||||
bool avaliable
|
||||
) {
|
||||
|
||||
double width = MediaQuery.of(context).size.width;
|
||||
double height = MediaQuery.of(context).size.height;
|
||||
bool addProfissionals = false;
|
||||
|
||||
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;
|
||||
addProfissionals = true;
|
||||
}),
|
||||
select: selectProfessionals,
|
||||
title: 'Exame',
|
||||
list: [
|
||||
'0201010011 - AMNIOCENTESE',
|
||||
'0201010020 - BIOPSIA / PUNSAO DE TUMOR SUPERFICIAL DA PELE',
|
||||
'0201010046 - BIOPSIA DE ANUS E CANAL ANAL',
|
||||
'0201010062 - BIOSIA DE BEXIGA',
|
||||
],
|
||||
width: width
|
||||
),
|
||||
SwitchWithSubtitle(
|
||||
onChanged: (v)=>setState(()=>requested=v),
|
||||
value: requested,
|
||||
width: width*0.8,
|
||||
title: 'Solicitado'
|
||||
),
|
||||
SwitchWithSubtitle(
|
||||
onChanged: (v)=>setState(()=>avaliable=v),
|
||||
value: avaliable,
|
||||
width: width*0.8,
|
||||
title: 'Avaliado'
|
||||
),
|
||||
ButtonDefault(
|
||||
onPressed:addProfissionals || examsList.length == 4?()=>setState((){
|
||||
List list = selectProfessionals!.split(' - ');
|
||||
add = list[0] + '${requested?' - S':''}' + '${avaliable?' - A':''}'+' - ${list[1]}';
|
||||
if(examsList.length<=3){
|
||||
examsList.add(add);
|
||||
}else{
|
||||
addProfissionals = false;
|
||||
}
|
||||
selectProfessionals=null;
|
||||
avaliable = false;
|
||||
requested = false;
|
||||
}):null,
|
||||
title: 'Adicionar',
|
||||
width: width*0.85,
|
||||
textColor: ColorPalette.white,
|
||||
borderColor:addProfissionals?ColorPalette.appBar:ColorPalette.buttonDisable,
|
||||
background: ColorPalette.appBar,
|
||||
disableColor: ColorPalette.buttonDisable,
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
Card(
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
TitleContainers(title: 'Exames'),
|
||||
examsList.length!=0
|
||||
?Container(
|
||||
width: width*0.8,
|
||||
height: height*0.4,
|
||||
child: ListView.builder(
|
||||
itemCount: examsList.length,
|
||||
itemBuilder: (context,index) {
|
||||
return Container(
|
||||
width: width * 0.8,
|
||||
padding: EdgeInsets.all(10),
|
||||
child: Row(
|
||||
children: [
|
||||
Container(
|
||||
width: width * 0.6,
|
||||
child: TextDefault(text: examsList[index],
|
||||
color: ColorPalette.black54,)
|
||||
),
|
||||
Spacer(),
|
||||
IconButton(
|
||||
icon: Icon(Icons.delete),
|
||||
onPressed: () =>
|
||||
setState(() {
|
||||
examsList.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,
|
||||
)
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user