Merge branch 'episode_fixes_dev_merge' into 'development'
Episode fixes dev merge See merge request Cloud_Solution/doctor_app_flutter!788merge-requests/789/head
commit
8b7d61ba03
@ -1,54 +0,0 @@
|
||||
import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart';
|
||||
|
||||
class MySelectedAllergy {
|
||||
MasterKeyModel selectedAllergySeverity;
|
||||
MasterKeyModel selectedAllergy;
|
||||
String remark;
|
||||
bool isChecked;
|
||||
bool isExpanded;
|
||||
bool isLocal;
|
||||
int createdBy;
|
||||
bool hasValidationError;
|
||||
|
||||
MySelectedAllergy(
|
||||
{this.selectedAllergySeverity,
|
||||
this.selectedAllergy,
|
||||
this.remark,
|
||||
this.isChecked,
|
||||
this.isExpanded = true,
|
||||
this.isLocal = true,
|
||||
this.createdBy,
|
||||
this.hasValidationError = false});
|
||||
|
||||
MySelectedAllergy.fromJson(Map<String, dynamic> json) {
|
||||
selectedAllergySeverity = json['selectedAllergySeverity'] != null
|
||||
? new MasterKeyModel.fromJson(json['selectedAllergySeverity'])
|
||||
: null;
|
||||
selectedAllergy = json['selectedAllergy'] != null
|
||||
? new MasterKeyModel.fromJson(json['selectedAllergy'])
|
||||
: null;
|
||||
remark = json['remark'];
|
||||
isChecked = json['isChecked'];
|
||||
isExpanded = json['isExpanded'];
|
||||
isLocal = json['isLocal'];
|
||||
createdBy = json['createdBy'];
|
||||
hasValidationError = json['hasValidationError'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
if (this.selectedAllergySeverity != null) {
|
||||
data['selectedAllergySeverity'] = this.selectedAllergySeverity.toJson();
|
||||
}
|
||||
if (this.selectedAllergy != null) {
|
||||
data['selectedAllergy'] = this.selectedAllergy.toJson();
|
||||
}
|
||||
data['remark'] = this.remark;
|
||||
data['isChecked'] = this.isChecked;
|
||||
data['isExpanded'] = this.isExpanded;
|
||||
data['createdBy'] = this.createdBy;
|
||||
data['isLocal'] = this.isLocal;
|
||||
data['hasValidationError'] = this.hasValidationError;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@ -1,65 +0,0 @@
|
||||
import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart';
|
||||
|
||||
class MySelectedAssessment {
|
||||
MasterKeyModel selectedICD;
|
||||
MasterKeyModel selectedDiagnosisCondition;
|
||||
MasterKeyModel selectedDiagnosisType;
|
||||
String remark;
|
||||
int appointmentId;
|
||||
int createdBy;
|
||||
String createdOn;
|
||||
int doctorID;
|
||||
String doctorName;
|
||||
String icdCode10ID;
|
||||
|
||||
MySelectedAssessment(
|
||||
{this.selectedICD,
|
||||
this.selectedDiagnosisCondition,
|
||||
this.selectedDiagnosisType,
|
||||
this.remark, this.appointmentId, this.createdBy,
|
||||
this.createdOn,
|
||||
this.doctorID,
|
||||
this.doctorName,
|
||||
this.icdCode10ID});
|
||||
|
||||
MySelectedAssessment.fromJson(Map<String, dynamic> json) {
|
||||
selectedICD = json['selectedICD'] != null
|
||||
? new MasterKeyModel.fromJson(json['selectedICD'])
|
||||
: null;
|
||||
selectedDiagnosisCondition = json['selectedDiagnosisCondition'] != null
|
||||
? new MasterKeyModel.fromJson(json['selectedDiagnosisCondition'])
|
||||
: null;
|
||||
selectedDiagnosisType = json['selectedDiagnosisType'] != null
|
||||
? new MasterKeyModel.fromJson(json['selectedDiagnosisType'])
|
||||
: null;
|
||||
remark = json['remark'];
|
||||
appointmentId = json['appointmentId'];
|
||||
createdBy = json['createdBy'];
|
||||
createdOn = json['createdOn'];
|
||||
doctorID = json['doctorID'];
|
||||
doctorName = json['doctorName'];
|
||||
icdCode10ID = json['icdCode10ID'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
|
||||
if (this.selectedICD != null) {
|
||||
data['selectedICD'] = this.selectedICD.toJson();
|
||||
}
|
||||
if (this.selectedDiagnosisCondition != null) {
|
||||
data['selectedICD'] = this.selectedDiagnosisCondition.toJson();
|
||||
}
|
||||
if (this.selectedDiagnosisType != null) {
|
||||
data['selectedICD'] = this.selectedDiagnosisType.toJson();
|
||||
}
|
||||
data['remark'] = this.remark;
|
||||
data['appointmentId'] = this.appointmentId;
|
||||
data['createdBy'] = this.createdBy;
|
||||
data['createdOn'] = this.createdOn;
|
||||
data['doctorID'] = this.doctorID;
|
||||
data['doctorName'] = this.doctorName;
|
||||
data['icdCode10ID'] = this.icdCode10ID;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@ -1,61 +0,0 @@
|
||||
import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart';
|
||||
|
||||
class MySelectedExamination {
|
||||
MasterKeyModel selectedExamination;
|
||||
String remark;
|
||||
bool isNormal;
|
||||
bool isAbnormal;
|
||||
bool notExamined;
|
||||
bool isNew;
|
||||
bool isLocal;
|
||||
int createdBy;
|
||||
String createdOn;
|
||||
String editedOn;
|
||||
|
||||
MySelectedExamination({
|
||||
this.selectedExamination,
|
||||
this.remark,
|
||||
this.isNormal = false,
|
||||
this.isAbnormal = false,
|
||||
this.notExamined = true,
|
||||
this.isNew = true,
|
||||
this.isLocal = true,
|
||||
this.createdBy,
|
||||
this.createdOn,
|
||||
this.editedOn,
|
||||
});
|
||||
|
||||
MySelectedExamination.fromJson(Map<String, dynamic> json) {
|
||||
selectedExamination = json['selectedExamination'] != null
|
||||
? new MasterKeyModel.fromJson(json['selectedExamination'])
|
||||
: null;
|
||||
remark = json['remark'];
|
||||
isNormal = json['isNormal'];
|
||||
isAbnormal = json['isAbnormal'];
|
||||
notExamined = json['notExamined'];
|
||||
isNew = json['isNew'];
|
||||
createdBy = json['createdBy'];
|
||||
createdOn = json['createdOn'];
|
||||
editedOn = json['editedOn'];
|
||||
isLocal = json['isLocal'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
|
||||
if (this.selectedExamination != null) {
|
||||
data['selectedExamination'] = this.selectedExamination.toJson();
|
||||
}
|
||||
data['remark'] = this.remark;
|
||||
data['isNormal'] = this.isNormal;
|
||||
data['isAbnormal'] = this.isAbnormal;
|
||||
data['notExamined'] = this.notExamined;
|
||||
data['isNew'] = this.isNew;
|
||||
data['createdBy'] = this.createdBy;
|
||||
data['createdOn'] = this.createdOn;
|
||||
data['editedOn'] = this.editedOn;
|
||||
data['isLocal'] = this.isLocal;
|
||||
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@ -1,33 +0,0 @@
|
||||
import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart';
|
||||
|
||||
class MySelectedHistory {
|
||||
MasterKeyModel selectedHistory;
|
||||
String remark;
|
||||
bool isChecked;
|
||||
bool isLocal;
|
||||
|
||||
MySelectedHistory(
|
||||
{ this.selectedHistory, this.remark, this.isChecked, this.isLocal = true});
|
||||
|
||||
MySelectedHistory.fromJson(Map<String, dynamic> json) {
|
||||
|
||||
selectedHistory = json['selectedHistory'] != null
|
||||
? new MasterKeyModel.fromJson(json['selectedHistory'])
|
||||
: null;
|
||||
remark = json['remark'];
|
||||
remark = json['isChecked'];
|
||||
isLocal = json['isLocal'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
|
||||
if (this.selectedHistory != null) {
|
||||
data['selectedHistory'] = this.selectedHistory.toJson();
|
||||
}
|
||||
data['remark'] = this.remark;
|
||||
data['isChecked'] = this.remark;
|
||||
data['isLocal'] = this.isLocal;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,23 @@
|
||||
import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart';
|
||||
|
||||
class MySelectedAllergy {
|
||||
MasterKeyModel selectedAllergySeverity;
|
||||
MasterKeyModel selectedAllergy;
|
||||
String remark;
|
||||
bool isChecked;
|
||||
bool isExpanded;
|
||||
bool isLocal;
|
||||
int createdBy;
|
||||
bool hasValidationError;
|
||||
|
||||
MySelectedAllergy(
|
||||
{this.selectedAllergySeverity,
|
||||
this.selectedAllergy,
|
||||
this.remark,
|
||||
this.isChecked,
|
||||
this.isExpanded = true,
|
||||
this.isLocal = true,
|
||||
this.createdBy,
|
||||
this.hasValidationError = false});
|
||||
|
||||
}
|
||||
@ -0,0 +1,24 @@
|
||||
import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart';
|
||||
|
||||
class MySelectedAssessment {
|
||||
MasterKeyModel selectedICD;
|
||||
MasterKeyModel selectedDiagnosisCondition;
|
||||
MasterKeyModel selectedDiagnosisType;
|
||||
String remark;
|
||||
int appointmentId;
|
||||
int createdBy;
|
||||
String createdOn;
|
||||
int doctorID;
|
||||
String doctorName;
|
||||
String icdCode10ID;
|
||||
|
||||
MySelectedAssessment(
|
||||
{this.selectedICD,
|
||||
this.selectedDiagnosisCondition,
|
||||
this.selectedDiagnosisType,
|
||||
this.remark, this.appointmentId, this.createdBy,
|
||||
this.createdOn,
|
||||
this.doctorID,
|
||||
this.doctorName,
|
||||
this.icdCode10ID});
|
||||
}
|
||||
@ -0,0 +1,27 @@
|
||||
import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart';
|
||||
|
||||
class MySelectedExamination {
|
||||
MasterKeyModel selectedExamination;
|
||||
String remark;
|
||||
bool isNormal;
|
||||
bool isAbnormal;
|
||||
bool notExamined;
|
||||
bool isNew;
|
||||
bool isLocal;
|
||||
int createdBy;
|
||||
String createdOn;
|
||||
String editedOn;
|
||||
|
||||
MySelectedExamination({
|
||||
this.selectedExamination,
|
||||
this.remark,
|
||||
this.isNormal = false,
|
||||
this.isAbnormal = false,
|
||||
this.notExamined = true,
|
||||
this.isNew = true,
|
||||
this.isLocal = true,
|
||||
this.createdBy,
|
||||
this.createdOn,
|
||||
this.editedOn,
|
||||
});
|
||||
}
|
||||
@ -0,0 +1,11 @@
|
||||
import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart';
|
||||
|
||||
class MySelectedHistory {
|
||||
MasterKeyModel selectedHistory;
|
||||
String remark;
|
||||
bool isChecked;
|
||||
bool isLocal;
|
||||
|
||||
MySelectedHistory(
|
||||
{this.selectedHistory, this.remark, this.isChecked, this.isLocal = true});
|
||||
}
|
||||
@ -0,0 +1,3 @@
|
||||
abstract class AssessmentCallBack{
|
||||
nextFunction(model);
|
||||
}
|
||||
@ -0,0 +1,3 @@
|
||||
abstract class ObjectiveCallBack{
|
||||
nextFunction(model);
|
||||
}
|
||||
@ -0,0 +1,3 @@
|
||||
abstract class PlanCallBack{
|
||||
nextFunction(model);
|
||||
}
|
||||
@ -0,0 +1,52 @@
|
||||
import 'package:doctor_app_flutter/config/size_config.dart';
|
||||
import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:hexcolor/hexcolor.dart';
|
||||
|
||||
class BottomSheetDialogButton extends StatelessWidget {
|
||||
final Function onTap;
|
||||
final String label;
|
||||
|
||||
double headerHeight = SizeConfig.heightMultiplier * 12;
|
||||
|
||||
BottomSheetDialogButton({Key key, this.onTap, this.label}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.all(
|
||||
Radius.circular(0.0),
|
||||
),
|
||||
border: Border.all(color: HexColor('#EFEFEF'), width: 1),
|
||||
),
|
||||
height: headerHeight,
|
||||
width: double.infinity,
|
||||
child: Column(
|
||||
children: [
|
||||
Container(
|
||||
margin: EdgeInsets.only(
|
||||
top: headerHeight * (SizeConfig.isWidthLarge ? 0.3 : 0.2)),
|
||||
child: FractionallySizedBox(
|
||||
widthFactor: .80,
|
||||
child: Center(
|
||||
child: AppButton(
|
||||
height: SizeConfig.heightMultiplier *
|
||||
(SizeConfig.isHeightVeryShort ? 8 : 6),
|
||||
title: label,
|
||||
padding: 10,
|
||||
color: Color(0xFF359846),
|
||||
onPressed: onTap,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
height: 5,
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -1,63 +1,67 @@
|
||||
import 'package:doctor_app_flutter/config/size_config.dart';
|
||||
import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class BottomSheetTitle extends StatelessWidget with PreferredSizeWidget {
|
||||
const BottomSheetTitle({
|
||||
BottomSheetTitle({
|
||||
Key key, this.title,
|
||||
}) : super(key: key);
|
||||
|
||||
final String title;
|
||||
double headerHeight = SizeConfig.heightMultiplier*15;
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
padding: EdgeInsets.only(
|
||||
left: 0, right: 5, bottom: 5, top: 5),
|
||||
// padding: EdgeInsets.only(
|
||||
// left: 0, right: 5, bottom: 5, top: 5),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
),
|
||||
height: 115,
|
||||
child: Container(
|
||||
padding: EdgeInsets.only(
|
||||
left: 10, right: 10),
|
||||
margin: EdgeInsets.only(top: 60),
|
||||
child: Column(
|
||||
children: [
|
||||
Row(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
RichText(
|
||||
text: TextSpan(
|
||||
style: TextStyle(
|
||||
fontSize:20,
|
||||
color: Colors.black),
|
||||
children: <TextSpan>[
|
||||
new TextSpan(
|
||||
height: headerHeight,
|
||||
child: Center(
|
||||
child: Container(
|
||||
padding: EdgeInsets.only(
|
||||
left: 10, right: 10),
|
||||
margin: EdgeInsets.only(top: headerHeight *0.5),
|
||||
child: Column(
|
||||
children: [
|
||||
Row(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
RichText(
|
||||
text: TextSpan(
|
||||
style: TextStyle(
|
||||
fontSize:20,
|
||||
color: Colors.black),
|
||||
children: <TextSpan>[
|
||||
new TextSpan(
|
||||
|
||||
text: title,
|
||||
style: TextStyle(
|
||||
color: Color(0xFF2B353E),
|
||||
fontWeight: FontWeight.bold,
|
||||
fontFamily: 'Poppins',
|
||||
fontSize: 22)),
|
||||
],
|
||||
text: title,
|
||||
style: TextStyle(
|
||||
color: Color(0xFF2B353E),
|
||||
fontWeight: FontWeight.bold,
|
||||
fontFamily: 'Poppins',
|
||||
fontSize: SizeConfig.getTextMultiplierBasedOnWidth()*6)),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
InkWell(
|
||||
onTap: () {
|
||||
Navigator.pop(context);
|
||||
},
|
||||
child: Icon(DoctorApp.close_1,
|
||||
size:20,
|
||||
color: Color(0xFF2B353E)))
|
||||
],
|
||||
),
|
||||
],
|
||||
InkWell(
|
||||
onTap: () {
|
||||
Navigator.pop(context);
|
||||
},
|
||||
child: Icon(DoctorApp.close_1,
|
||||
size:SizeConfig.getTextMultiplierBasedOnWidth()*5,
|
||||
color: Color(0xFF2B353E)))
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Size get preferredSize => Size(double.maxFinite,115);
|
||||
Size get preferredSize => Size(double.maxFinite,headerHeight);
|
||||
}
|
||||
|
||||
@ -0,0 +1,24 @@
|
||||
|
||||
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class RemarkText extends StatelessWidget {
|
||||
final String remark;
|
||||
const RemarkText({
|
||||
Key key, this.remark,
|
||||
}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
width: MediaQuery.of(context).size.width * 0.55,
|
||||
child: AppText(
|
||||
remark ?? '',
|
||||
color: Color(0xFF575757),
|
||||
fontSize: 10,
|
||||
fontWeight: FontWeight.w700,
|
||||
letterSpacing: -0.4,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,39 @@
|
||||
|
||||
import 'package:doctor_app_flutter/config/size_config.dart';
|
||||
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
|
||||
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
||||
import 'package:hexcolor/hexcolor.dart';
|
||||
|
||||
class RemoveButton extends StatelessWidget {
|
||||
final Function onTap;
|
||||
final String label;
|
||||
|
||||
const RemoveButton({Key key, this.onTap, this.label}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return InkWell(
|
||||
child: Row(
|
||||
children: [
|
||||
Container(
|
||||
child: AppText(
|
||||
label??TranslationBase.of(context).remove,
|
||||
fontSize: SizeConfig.getTextMultiplierBasedOnWidth() *3.5,
|
||||
fontWeight: FontWeight.w700,
|
||||
color: HexColor("#D02127"),
|
||||
letterSpacing:-0.48,
|
||||
),
|
||||
),
|
||||
Icon(
|
||||
FontAwesomeIcons.times,
|
||||
color: HexColor("#D02127"),
|
||||
size: SizeConfig.getTextMultiplierBasedOnWidth() *4,
|
||||
),
|
||||
],
|
||||
),
|
||||
onTap: onTap,
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,22 @@
|
||||
import 'package:doctor_app_flutter/config/size_config.dart';
|
||||
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class StepDetailsWidget extends StatelessWidget {
|
||||
final String stepLabel;
|
||||
final double marginLeft;
|
||||
|
||||
const StepDetailsWidget({
|
||||
Key key, this.stepLabel, this.marginLeft = 0,
|
||||
}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return AppText(
|
||||
stepLabel,
|
||||
fontWeight: FontWeight.bold,
|
||||
marginLeft: marginLeft,
|
||||
fontSize:SizeConfig.getTextMultiplierBasedOnWidth() * 3.5 //12,
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,52 @@
|
||||
import 'package:doctor_app_flutter/config/size_config.dart';
|
||||
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
|
||||
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:hexcolor/hexcolor.dart';
|
||||
|
||||
class StatusLabel extends StatelessWidget {
|
||||
const StatusLabel({
|
||||
Key key,
|
||||
this.stepId,
|
||||
this.selectedStepId,
|
||||
}) : super(key: key);
|
||||
|
||||
final int stepId;
|
||||
final int selectedStepId;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
width: SizeConfig.getTextMultiplierBasedOnWidth() * 18.5,
|
||||
padding: EdgeInsets.symmetric(horizontal: 2, vertical: 3),
|
||||
decoration: BoxDecoration(
|
||||
color: stepId == selectedStepId
|
||||
? Color(0xFFF1E9D3)
|
||||
: stepId < selectedStepId
|
||||
? Color(0xFFD8E8DB)
|
||||
: Color(0xFFCCCCCC),
|
||||
borderRadius: BorderRadius.all(
|
||||
Radius.circular(5.0),
|
||||
),
|
||||
border: Border.all(color: HexColor('#707070'), width: 0.30),
|
||||
),
|
||||
child: Center(
|
||||
child: AppText(
|
||||
stepId == selectedStepId
|
||||
? TranslationBase.of(context).inProgress
|
||||
: stepId < selectedStepId
|
||||
? TranslationBase.of(context).completed
|
||||
: TranslationBase.of(context).locked,
|
||||
fontWeight: FontWeight.bold,
|
||||
textAlign: TextAlign.center,
|
||||
fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 2.7,
|
||||
color: stepId == selectedStepId
|
||||
? Color(0xFFCC9B14)
|
||||
: stepId < selectedStepId
|
||||
? Color(0xFF359846)
|
||||
: Color(0xFF969696),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,511 @@
|
||||
import 'package:doctor_app_flutter/config/size_config.dart';
|
||||
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
|
||||
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
|
||||
import 'package:doctor_app_flutter/screens/patients/profile/soap_update/shared_soap_widgets/steper/status_Label.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
import 'Step_details_widget.dart';
|
||||
|
||||
class StepsWidget extends StatelessWidget {
|
||||
final int index;
|
||||
final Function changeCurrentTab;
|
||||
final double height;
|
||||
final PatiantInformtion patientInfo;
|
||||
|
||||
StepsWidget(
|
||||
{Key key,
|
||||
this.index,
|
||||
this.changeCurrentTab,
|
||||
this.height = 0.0,
|
||||
this.patientInfo});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
ProjectViewModel projectViewModel = Provider.of(context);
|
||||
double circleHeight = (SizeConfig.isHeightVeryShort
|
||||
? 30
|
||||
: SizeConfig.isHeightShort
|
||||
? 38
|
||||
: 38);
|
||||
double circleTop = (SizeConfig.isHeightVeryShort
|
||||
? 12
|
||||
: SizeConfig.isHeightShort
|
||||
? 10
|
||||
: 10);
|
||||
double containerHeight =
|
||||
SizeConfig.heightMultiplier * (SizeConfig.isHeightVeryShort ? 16 : 15);
|
||||
|
||||
return !projectViewModel.isArabic
|
||||
? Stack(
|
||||
children: [
|
||||
Container(
|
||||
height: height == 0 ? containerHeight : height,
|
||||
width: MediaQuery.of(context).size.width * 0.9,
|
||||
color: Colors.transparent,
|
||||
),
|
||||
Positioned(
|
||||
top: 30,
|
||||
child: Center(
|
||||
child: Container(
|
||||
width: MediaQuery.of(context).size.width *
|
||||
(patientInfo.admissionNo == null ||
|
||||
patientInfo.admissionNo.isEmpty
|
||||
? 0.9
|
||||
: 0.85),
|
||||
child: Divider(
|
||||
color: Colors.grey,
|
||||
height: 0.75,
|
||||
thickness: 0.75,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
top: circleTop,
|
||||
left: 0,
|
||||
child: InkWell(
|
||||
onTap: () => changeCurrentTab(0),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Container(
|
||||
width: circleHeight,
|
||||
height: circleHeight,
|
||||
decoration: BoxDecoration(
|
||||
border: index == 0
|
||||
? Border.all(color: Color(0xFFCC9B14), width: 2)
|
||||
: index > 0
|
||||
? null
|
||||
: Border.all(
|
||||
color: Colors.black, width: 0.75),
|
||||
shape: BoxShape.circle,
|
||||
color: index == 0
|
||||
? Color(0xFFCC9B14)
|
||||
: index > 0
|
||||
? Color(0xFF359846)
|
||||
: Color(0xFFCCCCCC),
|
||||
),
|
||||
child: Center(
|
||||
child: Icon(
|
||||
FontAwesomeIcons.check,
|
||||
size: 20,
|
||||
color: Colors.white,
|
||||
)),
|
||||
),
|
||||
SizedBox(height: 5),
|
||||
Column(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
StepDetailsWidget(
|
||||
stepLabel: "Subjective",
|
||||
),
|
||||
StatusLabel(
|
||||
selectedStepId: index,
|
||||
stepId: 0,
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
top: circleTop,
|
||||
left: patientInfo.admissionNo == null ||
|
||||
patientInfo.admissionNo.isEmpty
|
||||
? MediaQuery.of(context).size.width * 0.25
|
||||
: MediaQuery.of(context).size.width * 0.71,
|
||||
child: InkWell(
|
||||
onTap: () => index >= 1 ? changeCurrentTab(1) : null,
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Container(
|
||||
width: circleHeight,
|
||||
height: circleHeight,
|
||||
decoration: BoxDecoration(
|
||||
border: index == 1
|
||||
? Border.all(color: Color(0xFFCC9B14), width: 2)
|
||||
: index > 2
|
||||
? null
|
||||
: Border.all(
|
||||
color: Color(0xFFCCCCCC), width: 0.75),
|
||||
shape: BoxShape.circle,
|
||||
color: index == 1
|
||||
? Color(0xFFCC9B14)
|
||||
: index > 1
|
||||
? Color(0xFF359846)
|
||||
: Color(0xFFCCCCCC),
|
||||
),
|
||||
child: Center(
|
||||
child: Icon(
|
||||
FontAwesomeIcons.check,
|
||||
size: 20,
|
||||
color: Colors.white,
|
||||
)),
|
||||
),
|
||||
SizedBox(
|
||||
height: 5,
|
||||
),
|
||||
Column(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
StepDetailsWidget(
|
||||
stepLabel: "Objective",
|
||||
),
|
||||
StatusLabel(
|
||||
selectedStepId: index,
|
||||
stepId: 1,
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
if (patientInfo.admissionNo == null ||
|
||||
patientInfo.admissionNo.isEmpty)
|
||||
Positioned(
|
||||
top: circleTop,
|
||||
left: MediaQuery.of(context).size.width * 0.47,
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
if (index >= 3) changeCurrentTab(2);
|
||||
},
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Container(
|
||||
width: circleHeight,
|
||||
height: circleHeight,
|
||||
decoration: BoxDecoration(
|
||||
border: index == 2
|
||||
? Border.all(color: Color(0xFFCC9B14), width: 2)
|
||||
: index > 2
|
||||
? null
|
||||
: Border.all(
|
||||
color: Color(0xFFCCCCCC), width: 0.75),
|
||||
shape: BoxShape.circle,
|
||||
color: index == 2
|
||||
? Color(0xFFCC9B14)
|
||||
: index > 2
|
||||
? Color(0xFF359846)
|
||||
: Color(0xFFCCCCCC),
|
||||
),
|
||||
child: Center(
|
||||
child: Icon(
|
||||
FontAwesomeIcons.check,
|
||||
size: 20,
|
||||
color: Colors.white,
|
||||
)),
|
||||
),
|
||||
SizedBox(
|
||||
height: 5,
|
||||
),
|
||||
Column(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
StepDetailsWidget(
|
||||
stepLabel: "Assessment",
|
||||
),
|
||||
StatusLabel(
|
||||
selectedStepId: index,
|
||||
stepId: 2,
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
if (patientInfo.admissionNo == null ||
|
||||
patientInfo.admissionNo.isEmpty)
|
||||
Positioned(
|
||||
top: circleTop,
|
||||
right: 0,
|
||||
child: InkWell(
|
||||
onTap: () => index >= 3 ? changeCurrentTab(4) : null,
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.end,
|
||||
children: [
|
||||
Container(
|
||||
width: circleHeight,
|
||||
height: circleHeight,
|
||||
decoration: BoxDecoration(
|
||||
border: index == 3
|
||||
? Border.all(color: Color(0xFFCC9B14), width: 2)
|
||||
: index > 3
|
||||
? null
|
||||
: Border.all(
|
||||
color: Color(0xFFCCCCCC), width: 0.75),
|
||||
shape: BoxShape.circle,
|
||||
color: index == 3
|
||||
? Color(0xFFCC9B14)
|
||||
: index > 3
|
||||
? Color(0xFF359846)
|
||||
: Color(0xFFCCCCCC),
|
||||
),
|
||||
child: Center(
|
||||
child: Icon(
|
||||
FontAwesomeIcons.check,
|
||||
size: 20,
|
||||
color: Colors.white,
|
||||
)),
|
||||
),
|
||||
SizedBox(
|
||||
height: 5,
|
||||
),
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
StepDetailsWidget(
|
||||
stepLabel: "Plan",
|
||||
marginLeft: 30,
|
||||
),
|
||||
StatusLabel(
|
||||
selectedStepId: index,
|
||||
stepId: 3,
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
)
|
||||
: Stack(
|
||||
children: [
|
||||
Container(
|
||||
height: height == 0 ? 100 : height,
|
||||
width: MediaQuery.of(context).size.width * 0.9,
|
||||
color: Colors.transparent,
|
||||
),
|
||||
Positioned(
|
||||
top: 30,
|
||||
child: Center(
|
||||
child: Container(
|
||||
width: MediaQuery.of(context).size.width * (patientInfo.admissionNo == null ||
|
||||
patientInfo.admissionNo.isEmpty?0.9:0.85),
|
||||
child: Divider(
|
||||
color: Colors.grey,
|
||||
height: 0.75,
|
||||
thickness: 0.75,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
top: circleTop,
|
||||
right: 0,
|
||||
child: InkWell(
|
||||
onTap: () => changeCurrentTab(0),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Container(
|
||||
width: circleHeight,
|
||||
height: circleHeight,
|
||||
decoration: BoxDecoration(
|
||||
border: index == 0
|
||||
? Border.all(color: Color(0xFFCC9B14), width: 2)
|
||||
: index > 0
|
||||
? null
|
||||
: Border.all(
|
||||
color: Colors.black, width: 0.75),
|
||||
shape: BoxShape.circle,
|
||||
color: index == 0
|
||||
? Color(0xFFCC9B14)
|
||||
: index > 0
|
||||
? Color(0xFF359846)
|
||||
: Color(0xFFCCCCCC),
|
||||
),
|
||||
child: Center(
|
||||
child: Icon(
|
||||
FontAwesomeIcons.check,
|
||||
size: 20,
|
||||
color: Colors.white,
|
||||
)),
|
||||
),
|
||||
SizedBox(height: 3),
|
||||
Column(
|
||||
children: [
|
||||
StepDetailsWidget(
|
||||
stepLabel: "شخصي",
|
||||
),
|
||||
StatusLabel(
|
||||
selectedStepId: index,
|
||||
stepId: 0,
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
top: circleTop,
|
||||
right: MediaQuery.of(context).size.width * (patientInfo.admissionNo == null ||
|
||||
patientInfo.admissionNo.isEmpty?0.25:0.71),
|
||||
child: InkWell(
|
||||
onTap: () => index >= 2 ? changeCurrentTab(1) : null,
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Container(
|
||||
width: circleHeight,
|
||||
height: circleHeight,
|
||||
decoration: BoxDecoration(
|
||||
border: index == 1
|
||||
? Border.all(color: Color(0xFFCC9B14), width: 2)
|
||||
: index > 2
|
||||
? null
|
||||
: Border.all(
|
||||
color: Color(0xFFCCCCCC), width: 0.75),
|
||||
shape: BoxShape.circle,
|
||||
color: index == 1
|
||||
? Color(0xFFCC9B14)
|
||||
: index > 1
|
||||
? Color(0xFF359846)
|
||||
: Color(0xFFCCCCCC),
|
||||
),
|
||||
child: Center(
|
||||
child: Icon(
|
||||
FontAwesomeIcons.check,
|
||||
size: 20,
|
||||
color: Colors.white,
|
||||
)),
|
||||
),
|
||||
SizedBox(height: 5),
|
||||
Column(
|
||||
children: [
|
||||
StepDetailsWidget(
|
||||
stepLabel: "هدف",
|
||||
),
|
||||
StatusLabel(
|
||||
selectedStepId: index,
|
||||
stepId: 1,
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
if (patientInfo.admissionNo == null ||
|
||||
patientInfo.admissionNo.isEmpty)
|
||||
Positioned(
|
||||
top: circleTop,
|
||||
right: MediaQuery.of(context).size.width * 0.50,
|
||||
child: InkWell(
|
||||
onTap: () => index >= 3 ? changeCurrentTab(2) : null,
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Container(
|
||||
width: circleHeight,
|
||||
height: circleHeight,
|
||||
decoration: BoxDecoration(
|
||||
border: index == 2
|
||||
? Border.all(color: Color(0xFFCC9B14), width: 2)
|
||||
: index > 2
|
||||
? null
|
||||
: Border.all(
|
||||
color: Color(0xFFCCCCCC), width: 0.75),
|
||||
shape: BoxShape.circle,
|
||||
color: index == 2
|
||||
? Color(0xFFCC9B14)
|
||||
: index > 2
|
||||
? Color(0xFFCC9B14)
|
||||
: Color(0xFFCCCCCC),
|
||||
),
|
||||
child: Center(
|
||||
child: Icon(
|
||||
FontAwesomeIcons.check,
|
||||
size: 20,
|
||||
color: Colors.white,
|
||||
)),
|
||||
),
|
||||
SizedBox(
|
||||
height: 5,
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(right: 2),
|
||||
child: Column(
|
||||
children: [
|
||||
StepDetailsWidget(
|
||||
stepLabel: "تقدير",
|
||||
),
|
||||
StatusLabel(
|
||||
selectedStepId: index,
|
||||
stepId: 2,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
if (patientInfo.admissionNo == null ||
|
||||
patientInfo.admissionNo.isEmpty)
|
||||
Positioned(
|
||||
top: circleTop,
|
||||
left: 0,
|
||||
child: InkWell(
|
||||
onTap: () => index >= 3 ? changeCurrentTab(4) : null,
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.end,
|
||||
children: [
|
||||
Container(
|
||||
width: circleHeight,
|
||||
height: circleHeight,
|
||||
decoration: BoxDecoration(
|
||||
border: index == 3
|
||||
? Border.all(color: Color(0xFFCC9B14), width: 2)
|
||||
: index > 3
|
||||
? null
|
||||
: Border.all(
|
||||
color: Color(0xFFCCCCCC), width: 0.75),
|
||||
shape: BoxShape.circle,
|
||||
color: index == 3
|
||||
? Color(0xFFCC9B14)
|
||||
: index > 3
|
||||
? Color(0xFFCC9B14)
|
||||
: Color(0xFFCCCCCC),
|
||||
),
|
||||
child: Center(
|
||||
child: Icon(
|
||||
FontAwesomeIcons.check,
|
||||
size: 20,
|
||||
color: Colors.white,
|
||||
)),
|
||||
),
|
||||
SizedBox(
|
||||
height: 5,
|
||||
),
|
||||
Container(
|
||||
margin: EdgeInsets.only(right: index == 3 ? 15 : 0),
|
||||
child: Column(
|
||||
children: [
|
||||
StepDetailsWidget(
|
||||
stepLabel: "خطة",
|
||||
),
|
||||
StatusLabel(
|
||||
selectedStepId: index,
|
||||
stepId: 3,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -1,554 +0,0 @@
|
||||
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
|
||||
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
||||
import 'package:hexcolor/hexcolor.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
class StepsWidget extends StatelessWidget {
|
||||
final int index;
|
||||
final Function changeCurrentTab;
|
||||
final double height;
|
||||
|
||||
StepsWidget({Key key, this.index, this.changeCurrentTab, this.height = 0.0});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
ProjectViewModel projectViewModel = Provider.of(context);
|
||||
return !projectViewModel.isArabic
|
||||
? Stack(
|
||||
children: [
|
||||
Container(
|
||||
height: height == 0 ? 100 : height,
|
||||
width: MediaQuery.of(context).size.width * 0.9,
|
||||
color: Colors.transparent,
|
||||
),
|
||||
Positioned(
|
||||
top: 30
|
||||
,
|
||||
child: Center(
|
||||
child: Container(
|
||||
width: MediaQuery
|
||||
.of(context)
|
||||
.size
|
||||
.width * 0.9,
|
||||
child: Divider(
|
||||
color: Colors.grey,
|
||||
height: 0.75,
|
||||
thickness: 0.75,
|
||||
),
|
||||
),
|
||||
),),
|
||||
Positioned(
|
||||
top: 10,
|
||||
left: 0,
|
||||
child: InkWell(
|
||||
onTap: () => changeCurrentTab(0),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Container(
|
||||
width: 38,
|
||||
height: 38,
|
||||
decoration: BoxDecoration(
|
||||
border: index == 0
|
||||
? Border.all(color: Color(0xFFCC9B14), width: 2)
|
||||
: index > 0
|
||||
? null
|
||||
: Border.all(
|
||||
color: Colors.black, width: 0.75),
|
||||
shape: BoxShape.circle,
|
||||
color: index == 0
|
||||
? Color(0xFFCC9B14)
|
||||
: index > 0
|
||||
? Color(0xFF359846)
|
||||
: Color(0xFFCCCCCC),
|
||||
),
|
||||
child: Center(
|
||||
child: Icon(
|
||||
FontAwesomeIcons.check,
|
||||
size: 20,
|
||||
color: Colors.white,
|
||||
)),
|
||||
),
|
||||
SizedBox(height: 5),
|
||||
Column(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
AppText(
|
||||
"Subjective",
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: 12,
|
||||
),
|
||||
StatusLabel(
|
||||
selectedStepId: index,
|
||||
stepId: 0,
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
top: 10,
|
||||
left: MediaQuery
|
||||
.of(context)
|
||||
.size
|
||||
.width * 0.25,
|
||||
child: InkWell(
|
||||
onTap: () => index >= 1 ? changeCurrentTab(1) : null,
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Container(
|
||||
width: 38,
|
||||
height: 38,
|
||||
decoration: BoxDecoration(
|
||||
border: index == 1
|
||||
? Border.all(color: Color(0xFFCC9B14), width: 2)
|
||||
: index > 2
|
||||
? null
|
||||
: Border.all(
|
||||
color: Color(0xFFCCCCCC), width: 0.75),
|
||||
shape: BoxShape.circle,
|
||||
color: index == 1
|
||||
? Color(0xFFCC9B14)
|
||||
: index > 1
|
||||
? Color(0xFF359846)
|
||||
: Color(0xFFCCCCCC),
|
||||
),
|
||||
child: Center(
|
||||
child: Icon(
|
||||
FontAwesomeIcons.check,
|
||||
size: 20,
|
||||
color: Colors.white,
|
||||
)),
|
||||
),
|
||||
SizedBox(
|
||||
height: 5,
|
||||
),
|
||||
Column(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
AppText(
|
||||
"Objective",
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: 12,
|
||||
),
|
||||
StatusLabel(
|
||||
selectedStepId: index,
|
||||
stepId: 1,
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
top: 10,
|
||||
left: MediaQuery
|
||||
.of(context)
|
||||
.size
|
||||
.width * 0.50,
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
if (index >= 3) changeCurrentTab(2);
|
||||
},
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Container(
|
||||
width: 38,
|
||||
height: 38,
|
||||
decoration: BoxDecoration(
|
||||
border: index == 2
|
||||
? Border.all(color: Color(0xFFCC9B14), width: 2)
|
||||
: index > 2
|
||||
? null
|
||||
: Border.all(
|
||||
color: Color(0xFFCCCCCC), width: 0.75),
|
||||
shape: BoxShape.circle,
|
||||
color: index == 2
|
||||
? Color(0xFFCC9B14)
|
||||
: index > 2
|
||||
? Color(0xFF359846)
|
||||
: Color(0xFFCCCCCC),
|
||||
),
|
||||
child: Center(
|
||||
child: Icon(
|
||||
FontAwesomeIcons.check,
|
||||
size: 20,
|
||||
color: Colors.white,
|
||||
)),
|
||||
),
|
||||
SizedBox(
|
||||
height: 5,
|
||||
),
|
||||
Column(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
AppText(
|
||||
"Assessment",
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: 12,
|
||||
),
|
||||
StatusLabel(
|
||||
selectedStepId: index,
|
||||
stepId: 2,
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
top: 10,
|
||||
right: 0,
|
||||
child: InkWell(
|
||||
onTap: () => index >= 3 ? changeCurrentTab(4) : null,
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.end,
|
||||
children: [
|
||||
Container(
|
||||
width: 38,
|
||||
height: 38,
|
||||
decoration: BoxDecoration(
|
||||
border: index == 3
|
||||
? Border.all(color: Color(0xFFCC9B14), width: 2)
|
||||
: index > 3
|
||||
? null
|
||||
: Border.all(
|
||||
color: Color(0xFFCCCCCC), width: 0.75),
|
||||
shape: BoxShape.circle,
|
||||
color: index == 3
|
||||
? Color(0xFFCC9B14)
|
||||
: index > 3
|
||||
? Color(0xFF359846)
|
||||
: Color(0xFFCCCCCC),
|
||||
),
|
||||
child: Center(
|
||||
child: Icon(
|
||||
FontAwesomeIcons.check,
|
||||
size: 20,
|
||||
color: Colors.white,
|
||||
)),
|
||||
),
|
||||
SizedBox(
|
||||
height: 5,
|
||||
),
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
AppText(
|
||||
"Plan",
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: 12,
|
||||
textAlign: TextAlign.end,
|
||||
marginLeft: 25,
|
||||
),
|
||||
StatusLabel(
|
||||
selectedStepId: index,
|
||||
stepId: 3,
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
)
|
||||
: Stack(
|
||||
children: [
|
||||
Container(
|
||||
height: height == 0 ? 100 : height,
|
||||
width: MediaQuery.of(context).size.width * 0.9,
|
||||
color: Colors.transparent,
|
||||
),
|
||||
Positioned(
|
||||
top: 30
|
||||
,
|
||||
child: Center(
|
||||
child: Container(
|
||||
width: MediaQuery
|
||||
.of(context)
|
||||
.size
|
||||
.width * 0.9,
|
||||
child: Divider(
|
||||
color: Colors.grey,
|
||||
height: 0.75,
|
||||
thickness: 0.75,
|
||||
),
|
||||
),
|
||||
),),
|
||||
Positioned(
|
||||
top: 10,
|
||||
right: 0,
|
||||
child: InkWell(
|
||||
onTap: () => changeCurrentTab(0),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Container(
|
||||
width: 38,
|
||||
height: 38,
|
||||
decoration: BoxDecoration(
|
||||
border: index == 0
|
||||
? Border.all(color: Color(0xFFCC9B14), width: 2)
|
||||
: index > 0
|
||||
? null
|
||||
: Border.all(
|
||||
color: Colors.black, width: 0.75),
|
||||
shape: BoxShape.circle,
|
||||
color: index == 0
|
||||
? Color(0xFFCC9B14)
|
||||
: index > 0
|
||||
? Color(0xFF359846)
|
||||
: Color(0xFFCCCCCC),
|
||||
),
|
||||
child: Center(
|
||||
child: Icon(
|
||||
FontAwesomeIcons.check,
|
||||
size: 20,
|
||||
color: Colors.white,
|
||||
)),
|
||||
),
|
||||
SizedBox(height: 3),
|
||||
Column(
|
||||
children: [
|
||||
AppText(
|
||||
"شخصي",
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: 16,
|
||||
),
|
||||
StatusLabel(
|
||||
selectedStepId: index,
|
||||
stepId: 0,
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
top: 10,
|
||||
right: MediaQuery
|
||||
.of(context)
|
||||
.size
|
||||
.width * 0.28,
|
||||
child: InkWell(
|
||||
onTap: () => index >= 2 ? changeCurrentTab(1) : null,
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Container(
|
||||
width: 38,
|
||||
height: 38,
|
||||
decoration: BoxDecoration(
|
||||
border: index == 1
|
||||
? Border.all(color: Color(0xFFCC9B14), width: 2)
|
||||
: index > 2
|
||||
? null
|
||||
: Border.all(
|
||||
color: Color(0xFFCCCCCC), width: 0.75),
|
||||
shape: BoxShape.circle,
|
||||
color: index == 1
|
||||
? Color(0xFFCC9B14)
|
||||
: index > 1
|
||||
? Color(0xFF359846)
|
||||
: Color(0xFFCCCCCC),
|
||||
),
|
||||
child: Center(
|
||||
child: Icon(
|
||||
FontAwesomeIcons.check,
|
||||
size: 20,
|
||||
color: Colors.white,
|
||||
)),
|
||||
),
|
||||
SizedBox(height: 5),
|
||||
Column(
|
||||
children: [
|
||||
AppText(
|
||||
"هدف",
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: 14,
|
||||
),
|
||||
StatusLabel(
|
||||
selectedStepId: index,
|
||||
stepId: 1,
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
top: 10,
|
||||
right: MediaQuery
|
||||
.of(context)
|
||||
.size
|
||||
.width * 0.52,
|
||||
child: InkWell(
|
||||
onTap: () => index >= 3 ? changeCurrentTab(2) : null,
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Container(
|
||||
width: 38,
|
||||
height: 38,
|
||||
decoration: BoxDecoration(
|
||||
border: index == 2
|
||||
? Border.all(color: Color(0xFFCC9B14), width: 2)
|
||||
: index > 2
|
||||
? null
|
||||
: Border.all(
|
||||
color: Color(0xFFCCCCCC), width: 0.75),
|
||||
shape: BoxShape.circle,
|
||||
color: index == 2
|
||||
? Color(0xFFCC9B14)
|
||||
: index > 2
|
||||
? Color(0xFFCC9B14)
|
||||
: Color(0xFFCCCCCC),
|
||||
),
|
||||
child: Center(
|
||||
child: Icon(
|
||||
FontAwesomeIcons.check,
|
||||
size: 20,
|
||||
color: Colors.white,
|
||||
)),
|
||||
),
|
||||
SizedBox(
|
||||
height: 5,
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(right: 2),
|
||||
child: Column(
|
||||
children: [
|
||||
AppText(
|
||||
"تقدير",
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: 14,
|
||||
),
|
||||
StatusLabel(
|
||||
selectedStepId: index,
|
||||
stepId: 2,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
top: 10,
|
||||
left: 0,
|
||||
child: InkWell(
|
||||
onTap: () => index >= 3 ? changeCurrentTab(4) : null,
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.end,
|
||||
children: [
|
||||
Container(
|
||||
width: 38,
|
||||
height: 38,
|
||||
decoration: BoxDecoration(
|
||||
border: index == 3
|
||||
? Border.all(color: Color(0xFFCC9B14), width: 2)
|
||||
: index > 3
|
||||
? null
|
||||
: Border.all(
|
||||
color: Color(0xFFCCCCCC), width: 0.75),
|
||||
shape: BoxShape.circle,
|
||||
color: index == 3
|
||||
? Color(0xFFCC9B14)
|
||||
: index > 3
|
||||
? Color(0xFFCC9B14)
|
||||
: Color(0xFFCCCCCC),
|
||||
),
|
||||
child: Center(
|
||||
child: Icon(
|
||||
FontAwesomeIcons.check,
|
||||
size: 20,
|
||||
color: Colors.white,
|
||||
)),
|
||||
),
|
||||
SizedBox(
|
||||
height: 5,
|
||||
),
|
||||
Container(
|
||||
margin: EdgeInsets.only(right: index == 3 ? 15 : 0),
|
||||
child: Column(
|
||||
children: [
|
||||
AppText(
|
||||
"خطة",
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: 14,
|
||||
),
|
||||
StatusLabel(
|
||||
selectedStepId: index,
|
||||
stepId: 3,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class StatusLabel extends StatelessWidget {
|
||||
const StatusLabel({
|
||||
Key key,
|
||||
this.stepId,
|
||||
this.selectedStepId,
|
||||
}) : super(key: key);
|
||||
|
||||
final int stepId;
|
||||
final int selectedStepId;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
width: 65,
|
||||
padding: EdgeInsets.symmetric(horizontal: 2, vertical: 3),
|
||||
decoration: BoxDecoration(
|
||||
color: stepId == selectedStepId
|
||||
? Color(0xFFF1E9D3)
|
||||
: stepId < selectedStepId
|
||||
? Color(0xFFD8E8DB)
|
||||
: Color(0xFFCCCCCC),
|
||||
borderRadius: BorderRadius.all(
|
||||
Radius.circular(5.0),
|
||||
),
|
||||
border: Border.all(color: HexColor('#707070'), width: 0.30),
|
||||
),
|
||||
child: Center(
|
||||
child: AppText(
|
||||
stepId == selectedStepId
|
||||
? "inProgress"
|
||||
: stepId < selectedStepId
|
||||
? "Completed"
|
||||
: "Locked",
|
||||
fontWeight: FontWeight.bold,
|
||||
textAlign: TextAlign.center,
|
||||
fontSize: 10,
|
||||
color: stepId == selectedStepId
|
||||
? Color(0xFFCC9B14)
|
||||
: stepId < selectedStepId
|
||||
? Color(0xFF359846)
|
||||
: Color(0xFF969696),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,88 @@
|
||||
import 'package:doctor_app_flutter/models/SOAP/selected_items/my_selected_allergy.dart';
|
||||
import 'package:doctor_app_flutter/models/SOAP/selected_items/my_selected_assement.dart';
|
||||
import 'package:doctor_app_flutter/models/SOAP/selected_items/my_selected_examination.dart';
|
||||
import 'package:doctor_app_flutter/models/SOAP/selected_items/my_selected_history.dart';
|
||||
|
||||
class SoapUtils {
|
||||
static MySelectedHistory generateMySelectedHistory(
|
||||
{history, isChecked = false, remark, isLocal = true}) {
|
||||
MySelectedHistory mySelectedHistory = MySelectedHistory(
|
||||
selectedHistory: history,
|
||||
isChecked: isChecked,
|
||||
remark: remark,
|
||||
isLocal: isLocal);
|
||||
return mySelectedHistory;
|
||||
}
|
||||
|
||||
static MySelectedAllergy generateMySelectedAllergy(
|
||||
{allergy,
|
||||
allergySeverity,
|
||||
isChecked = false,
|
||||
remark,
|
||||
isLocal = true,
|
||||
int createdBy,
|
||||
bool isExpanded = false}) {
|
||||
MySelectedAllergy mySelectedAllergy = MySelectedAllergy(
|
||||
selectedAllergy: allergy,
|
||||
selectedAllergySeverity: allergySeverity,
|
||||
isChecked: isChecked,
|
||||
remark: remark,
|
||||
isLocal: isLocal,
|
||||
createdBy: createdBy,
|
||||
isExpanded: isExpanded);
|
||||
return mySelectedAllergy;
|
||||
}
|
||||
|
||||
static MySelectedExamination generateMySelectedExamination(
|
||||
{examination,
|
||||
allergySeverity,
|
||||
isChecked = false,
|
||||
remark,
|
||||
isLocal = true,
|
||||
isNormal,
|
||||
createdBy,
|
||||
createdOn,
|
||||
editedOn,
|
||||
notExamined,
|
||||
isNew,
|
||||
isAbnormal}) {
|
||||
MySelectedExamination mySelectedExamination = MySelectedExamination(
|
||||
selectedExamination: examination,
|
||||
remark: remark,
|
||||
isNormal: isNormal,
|
||||
createdBy: createdBy,
|
||||
createdOn: createdOn,
|
||||
editedOn: editedOn,
|
||||
notExamined: notExamined,
|
||||
isNew: isNew,
|
||||
isLocal: isLocal,
|
||||
isAbnormal: isAbnormal,
|
||||
);
|
||||
return mySelectedExamination;
|
||||
}
|
||||
|
||||
static MySelectedAssessment generateMySelectedAssessment(
|
||||
{appointmentNo,
|
||||
remark,
|
||||
diagnosisType,
|
||||
diagnosisCondition,
|
||||
selectedICD,
|
||||
doctorID,
|
||||
doctorName,
|
||||
createdBy,
|
||||
createdOn,
|
||||
icdCode10ID}) {
|
||||
MySelectedAssessment mySelectedAssessment = MySelectedAssessment(
|
||||
appointmentId: appointmentNo,
|
||||
remark: remark,
|
||||
selectedDiagnosisType: diagnosisType,
|
||||
selectedDiagnosisCondition: diagnosisCondition,
|
||||
selectedICD: selectedICD,
|
||||
doctorID: doctorID,
|
||||
doctorName: doctorName,
|
||||
createdBy: createdBy,
|
||||
createdOn: createdOn,
|
||||
icdCode10ID: icdCode10ID);
|
||||
return mySelectedAssessment;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,3 @@
|
||||
abstract class SubjectiveCallBack{
|
||||
Function nextFunction(model);
|
||||
}
|
||||
Loading…
Reference in New Issue