|
|
|
|
@ -10,7 +10,6 @@ import 'package:doctor_app_flutter/widgets/shared/TextFields.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/widgets/shared/divider_with_spaces_around.dart';
|
|
|
|
|
import 'package:flutter/cupertino.dart';
|
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
|
|
|
|
|
@ -37,164 +36,159 @@ class _ProcedureCheckOutScreenState extends State<ProcedureCheckOutScreen> {
|
|
|
|
|
AppScaffold(
|
|
|
|
|
backgroundColor: Color(0xffF8F8F8).withOpacity(0.9),
|
|
|
|
|
isShowAppBar: false,
|
|
|
|
|
body: Column(
|
|
|
|
|
children: [
|
|
|
|
|
Container(
|
|
|
|
|
height: MediaQuery.of(context).size.height * 0.070,
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding: EdgeInsets.all(12.0),
|
|
|
|
|
child: Row(
|
|
|
|
|
//mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
children: [
|
|
|
|
|
InkWell(
|
|
|
|
|
child: Icon(
|
|
|
|
|
Icons.arrow_back_ios_sharp,
|
|
|
|
|
size: 24.0,
|
|
|
|
|
body: SingleChildScrollView(
|
|
|
|
|
child: Column(
|
|
|
|
|
children: [
|
|
|
|
|
Container(
|
|
|
|
|
height: MediaQuery.of(context).size.height * 0.070,
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding: EdgeInsets.all(12.0),
|
|
|
|
|
child: Row(
|
|
|
|
|
//mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
children: [
|
|
|
|
|
InkWell(
|
|
|
|
|
child: Icon(
|
|
|
|
|
Icons.arrow_back_ios_sharp,
|
|
|
|
|
size: 24.0,
|
|
|
|
|
),
|
|
|
|
|
onTap: () {
|
|
|
|
|
Navigator.pop(context);
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
onTap: () {
|
|
|
|
|
Navigator.pop(context);
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
width: 5.0,
|
|
|
|
|
),
|
|
|
|
|
AppText(
|
|
|
|
|
'Add Procedure',
|
|
|
|
|
fontWeight: FontWeight.w700,
|
|
|
|
|
fontSize: 20,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
SizedBox(
|
|
|
|
|
width: 5.0,
|
|
|
|
|
),
|
|
|
|
|
AppText(
|
|
|
|
|
'Add Procedure',
|
|
|
|
|
fontWeight: FontWeight.w700,
|
|
|
|
|
fontSize: 20,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Padding(
|
|
|
|
|
padding: const EdgeInsets.only(
|
|
|
|
|
left: 12.0, right: 12.0, bottom: 26.0, top: 10),
|
|
|
|
|
child: ListView.builder(
|
|
|
|
|
scrollDirection: Axis.vertical,
|
|
|
|
|
physics: AlwaysScrollableScrollPhysics(),
|
|
|
|
|
shrinkWrap: true,
|
|
|
|
|
itemCount: widget.items.length,
|
|
|
|
|
itemBuilder: (BuildContext context, int index) {
|
|
|
|
|
return Container(
|
|
|
|
|
margin: EdgeInsets.only(bottom: 15.0),
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
borderRadius:
|
|
|
|
|
BorderRadius.all(Radius.circular(10.0))),
|
|
|
|
|
child: ExpansionTile(
|
|
|
|
|
initiallyExpanded: true,
|
|
|
|
|
title: Row(
|
|
|
|
|
SizedBox(height: 30,),
|
|
|
|
|
...List.generate(widget.items.length, (index) => Container(
|
|
|
|
|
margin: EdgeInsets.only(bottom: 15.0),
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
borderRadius:
|
|
|
|
|
BorderRadius.all(Radius.circular(10.0))),
|
|
|
|
|
child: ExpansionTile(
|
|
|
|
|
initiallyExpanded: true,
|
|
|
|
|
title: Row(
|
|
|
|
|
children: [
|
|
|
|
|
Icon(
|
|
|
|
|
Icons.check_box,
|
|
|
|
|
color: Color(0xffD02127),
|
|
|
|
|
size: 30.5,
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
width: 6.0,
|
|
|
|
|
),
|
|
|
|
|
Expanded(
|
|
|
|
|
child:
|
|
|
|
|
AppText(widget.items[index].procedureName)),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
children: [
|
|
|
|
|
Container(
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: 12),
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
Icon(
|
|
|
|
|
Icons.check_box,
|
|
|
|
|
color: Color(0xffD02127),
|
|
|
|
|
size: 30.5,
|
|
|
|
|
Row(
|
|
|
|
|
children: [
|
|
|
|
|
Padding(
|
|
|
|
|
padding: const EdgeInsets.symmetric(
|
|
|
|
|
horizontal: 11),
|
|
|
|
|
child: AppText(
|
|
|
|
|
TranslationBase.of(context).orderType,
|
|
|
|
|
fontWeight: FontWeight.w700,
|
|
|
|
|
color: Color(0xff2B353E),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
width: 6.0,
|
|
|
|
|
Row(
|
|
|
|
|
children: [
|
|
|
|
|
Radio(
|
|
|
|
|
activeColor: Color(0xFFD02127),
|
|
|
|
|
value: 0,
|
|
|
|
|
groupValue:
|
|
|
|
|
widget.items[index].selectedType,
|
|
|
|
|
onChanged: (value) {
|
|
|
|
|
widget.items[index].selectedType = 0;
|
|
|
|
|
setState(() {
|
|
|
|
|
widget.items[index].type =
|
|
|
|
|
value.toString();
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
AppText(
|
|
|
|
|
'routine',
|
|
|
|
|
color: Color(0xff575757),
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
),
|
|
|
|
|
Radio(
|
|
|
|
|
activeColor: Color(0xFFD02127),
|
|
|
|
|
groupValue:
|
|
|
|
|
widget.items[index].selectedType,
|
|
|
|
|
value: 1,
|
|
|
|
|
onChanged: (value) {
|
|
|
|
|
widget.items[index].selectedType = 1;
|
|
|
|
|
setState(() {
|
|
|
|
|
widget.items[index].type =
|
|
|
|
|
value.toString();
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
AppText(
|
|
|
|
|
TranslationBase.of(context).urgent,
|
|
|
|
|
color: Color(0xff575757),
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
Expanded(
|
|
|
|
|
child:
|
|
|
|
|
AppText(widget.items[index].procedureName)),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
children: [
|
|
|
|
|
Container(
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: 12),
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
Row(
|
|
|
|
|
children: [
|
|
|
|
|
Padding(
|
|
|
|
|
padding: const EdgeInsets.symmetric(
|
|
|
|
|
horizontal: 11),
|
|
|
|
|
child: AppText(
|
|
|
|
|
TranslationBase.of(context).orderType,
|
|
|
|
|
fontWeight: FontWeight.w700,
|
|
|
|
|
color: Color(0xff2B353E),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
Row(
|
|
|
|
|
children: [
|
|
|
|
|
Radio(
|
|
|
|
|
activeColor: Color(0xFFD02127),
|
|
|
|
|
value: 0,
|
|
|
|
|
groupValue:
|
|
|
|
|
widget.items[index].selectedType,
|
|
|
|
|
onChanged: (value) {
|
|
|
|
|
widget.items[index].selectedType = 0;
|
|
|
|
|
setState(() {
|
|
|
|
|
widget.items[index].type =
|
|
|
|
|
value.toString();
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
AppText(
|
|
|
|
|
'routine',
|
|
|
|
|
color: Color(0xff575757),
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
),
|
|
|
|
|
Radio(
|
|
|
|
|
activeColor: Color(0xFFD02127),
|
|
|
|
|
groupValue:
|
|
|
|
|
widget.items[index].selectedType,
|
|
|
|
|
value: 1,
|
|
|
|
|
onChanged: (value) {
|
|
|
|
|
widget.items[index].selectedType = 1;
|
|
|
|
|
setState(() {
|
|
|
|
|
widget.items[index].type =
|
|
|
|
|
value.toString();
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
AppText(
|
|
|
|
|
TranslationBase.of(context).urgent,
|
|
|
|
|
color: Color(0xff575757),
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 2.0,
|
|
|
|
|
),
|
|
|
|
|
Padding(
|
|
|
|
|
padding: EdgeInsets.symmetric(
|
|
|
|
|
horizontal: 12, vertical: 15.0),
|
|
|
|
|
child: TextFields(
|
|
|
|
|
hintText: TranslationBase.of(context).remarks,
|
|
|
|
|
controller: remarksController,
|
|
|
|
|
onChanged: (value) {
|
|
|
|
|
widget.items[index].remarks = value;
|
|
|
|
|
},
|
|
|
|
|
minLines: 3,
|
|
|
|
|
maxLines: 5,
|
|
|
|
|
borderWidth: 0.5,
|
|
|
|
|
borderColor: Colors.grey[500],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 19.0,
|
|
|
|
|
),
|
|
|
|
|
//DividerWithSpacesAround(),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 2.0,
|
|
|
|
|
),
|
|
|
|
|
Padding(
|
|
|
|
|
padding: EdgeInsets.symmetric(
|
|
|
|
|
horizontal: 12, vertical: 15.0),
|
|
|
|
|
child: TextFields(
|
|
|
|
|
hintText: TranslationBase.of(context).remarks,
|
|
|
|
|
controller: remarksController,
|
|
|
|
|
onChanged: (value) {
|
|
|
|
|
widget.items[index].remarks = value;
|
|
|
|
|
},
|
|
|
|
|
minLines: 3,
|
|
|
|
|
maxLines: 5,
|
|
|
|
|
borderWidth: 0.5,
|
|
|
|
|
borderColor: Colors.grey[500],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 19.0,
|
|
|
|
|
),
|
|
|
|
|
//DividerWithSpacesAround(),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
)),
|
|
|
|
|
SizedBox(height: 90,),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
bottomSheet: Container(
|
|
|
|
|
margin: EdgeInsets.all(SizeConfig.widthMultiplier * 5),
|
|
|
|
|
@ -206,15 +200,6 @@ class _ProcedureCheckOutScreenState extends State<ProcedureCheckOutScreen> {
|
|
|
|
|
color: Color(0xff359846),
|
|
|
|
|
fontWeight: FontWeight.w700,
|
|
|
|
|
onPressed: () async {
|
|
|
|
|
//print(entityList.toString());
|
|
|
|
|
onPressed:
|
|
|
|
|
// if (entityList.isEmpty == true) {
|
|
|
|
|
// DrAppToastMsg.showErrorToast(
|
|
|
|
|
// TranslationBase.of(context)
|
|
|
|
|
// .fillTheMandatoryProcedureDetails,
|
|
|
|
|
// );
|
|
|
|
|
// return;
|
|
|
|
|
// }
|
|
|
|
|
List<EntityList> entityList = List();
|
|
|
|
|
widget.items.forEach((element) {
|
|
|
|
|
entityList.add(
|
|
|
|
|
|