First step from SOAP
parent
97a1a56f1f
commit
46cdd9482c
@ -0,0 +1,25 @@
|
||||
import 'package:doctor_app_flutter/config/config.dart';
|
||||
import 'package:doctor_app_flutter/core/service/base/base_service.dart';
|
||||
import 'package:doctor_app_flutter/models/SOAP/Allergy_model.dart';
|
||||
import 'package:doctor_app_flutter/models/SOAP/get_Allergies_request_model.dart';
|
||||
|
||||
class SOAPService extends BaseService {
|
||||
|
||||
List<AllergyModel> get listOfAllergies => _listOfAllergies;
|
||||
List<AllergyModel> _listOfAllergies = [];
|
||||
|
||||
|
||||
Future getAllergies(GetAllergiesRequestModel getAllergiesRequestModel) async {
|
||||
await baseAppClient.post(GET_ALLERGIES,
|
||||
onSuccess: (dynamic response, int statusCode) {
|
||||
_listOfAllergies.clear();
|
||||
response['List_Allergies']['entityList'].forEach((v) {
|
||||
_listOfAllergies
|
||||
.add(AllergyModel.fromJson(v));
|
||||
});
|
||||
}, onFailure: (String error, int statusCode) {
|
||||
hasError = true;
|
||||
super.error = error;
|
||||
}, body: getAllergiesRequestModel.toJson(),);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,23 @@
|
||||
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
|
||||
import 'package:doctor_app_flutter/core/service/SOAP_service.dart';
|
||||
import 'package:doctor_app_flutter/models/SOAP/Allergy_model.dart';
|
||||
import 'package:doctor_app_flutter/models/SOAP/get_Allergies_request_model.dart';
|
||||
|
||||
import '../../locator.dart';
|
||||
import 'base_view_model.dart';
|
||||
|
||||
class SOAPViewModel extends BaseViewModel {
|
||||
SOAPService _SOAPService = locator<SOAPService>();
|
||||
|
||||
List<AllergyModel> get listOfAllergies => _SOAPService.listOfAllergies;
|
||||
|
||||
Future getAllergies(GetAllergiesRequestModel getAllergiesRequestModel) async {
|
||||
setState(ViewState.Busy);
|
||||
await _SOAPService.getAllergies(getAllergiesRequestModel);
|
||||
if (_SOAPService.hasError) {
|
||||
error = _SOAPService.error;
|
||||
setState(ViewState.Error);
|
||||
} else
|
||||
setState(ViewState.Idle);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,60 @@
|
||||
class AllergyModel {
|
||||
int allergyDiseaseId;
|
||||
String allergyDiseaseName;
|
||||
int allergyDiseaseType;
|
||||
int appointmentNo;
|
||||
int createdBy;
|
||||
String createdByName;
|
||||
String createdOn;
|
||||
int episodeID;
|
||||
bool isChecked;
|
||||
bool isUpdatedByNurse;
|
||||
int severity;
|
||||
String severityName;
|
||||
|
||||
AllergyModel(
|
||||
{this.allergyDiseaseId,
|
||||
this.allergyDiseaseName,
|
||||
this.allergyDiseaseType,
|
||||
this.appointmentNo,
|
||||
this.createdBy,
|
||||
this.createdByName,
|
||||
this.createdOn,
|
||||
this.episodeID,
|
||||
this.isChecked,
|
||||
this.isUpdatedByNurse,
|
||||
this.severity,
|
||||
this.severityName});
|
||||
|
||||
AllergyModel.fromJson(Map<String, dynamic> json) {
|
||||
allergyDiseaseId = json['allergyDiseaseId'];
|
||||
allergyDiseaseName = json['allergyDiseaseName'];
|
||||
allergyDiseaseType = json['allergyDiseaseType'];
|
||||
appointmentNo = json['appointmentNo'];
|
||||
createdBy = json['createdBy'];
|
||||
createdByName = json['createdByName'];
|
||||
createdOn = json['createdOn'];
|
||||
episodeID = json['episodeID'];
|
||||
isChecked = json['isChecked'];
|
||||
isUpdatedByNurse = json['isUpdatedByNurse'];
|
||||
severity = json['severity'];
|
||||
severityName = json['severityName'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['allergyDiseaseId'] = this.allergyDiseaseId;
|
||||
data['allergyDiseaseName'] = this.allergyDiseaseName;
|
||||
data['allergyDiseaseType'] = this.allergyDiseaseType;
|
||||
data['appointmentNo'] = this.appointmentNo;
|
||||
data['createdBy'] = this.createdBy;
|
||||
data['createdByName'] = this.createdByName;
|
||||
data['createdOn'] = this.createdOn;
|
||||
data['episodeID'] = this.episodeID;
|
||||
data['isChecked'] = this.isChecked;
|
||||
data['isUpdatedByNurse'] = this.isUpdatedByNurse;
|
||||
data['severity'] = this.severity;
|
||||
data['severityName'] = this.severityName;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,32 @@
|
||||
class GetAllergiesRequestModel {
|
||||
String vidaAuthTokenID;
|
||||
int patientMRN;
|
||||
int appointmentNo;
|
||||
int episodeId;
|
||||
String doctorID;
|
||||
|
||||
GetAllergiesRequestModel(
|
||||
{this.vidaAuthTokenID,
|
||||
this.patientMRN,
|
||||
this.appointmentNo,
|
||||
this.episodeId,
|
||||
this.doctorID});
|
||||
|
||||
GetAllergiesRequestModel.fromJson(Map<String, dynamic> json) {
|
||||
vidaAuthTokenID = json['VidaAuthTokenID'];
|
||||
patientMRN = json['PatientMRN'];
|
||||
appointmentNo = json['AppointmentNo'];
|
||||
episodeId = json['EpisodeId'];
|
||||
doctorID = json['DoctorID'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['VidaAuthTokenID'] = this.vidaAuthTokenID;
|
||||
data['PatientMRN'] = this.patientMRN;
|
||||
data['AppointmentNo'] = this.appointmentNo;
|
||||
data['EpisodeId'] = this.episodeId;
|
||||
data['DoctorID'] = this.doctorID;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,171 @@
|
||||
import 'package:doctor_app_flutter/core/viewModel/doctor_replay_view_model.dart';
|
||||
import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart';
|
||||
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
|
||||
import 'package:doctor_app_flutter/screens/base/base_view.dart';
|
||||
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
|
||||
import 'package:doctor_app_flutter/widgets/patients/profile/SOAP/assessment_page.dart';
|
||||
import 'package:doctor_app_flutter/widgets/patients/profile/SOAP/objective_page.dart';
|
||||
import 'package:doctor_app_flutter/widgets/patients/profile/SOAP/plan_page.dart';
|
||||
import 'package:doctor_app_flutter/widgets/patients/profile/SOAP/subjective_page.dart';
|
||||
import 'package:doctor_app_flutter/widgets/shared/Text.dart';
|
||||
import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.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:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import '../patient_profile_widget.dart';
|
||||
import 'steps_widget.dart';
|
||||
|
||||
class AddSOAPIndex extends StatefulWidget {
|
||||
@override
|
||||
_AddSOAPIndexState createState() => _AddSOAPIndexState();
|
||||
}
|
||||
|
||||
class _AddSOAPIndexState extends State<AddSOAPIndex>
|
||||
with TickerProviderStateMixin {
|
||||
PageController _controller;
|
||||
int _currentIndex = 0;
|
||||
|
||||
changePageViewIndex(pageIndex) {
|
||||
_controller.jumpToPage(pageIndex);
|
||||
}
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
// TODO: implement initState
|
||||
_controller = new PageController();
|
||||
|
||||
super.initState();
|
||||
}
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final routeArgs = ModalRoute.of(context).settings.arguments as Map;
|
||||
PatiantInformtion patient = routeArgs['patient'];
|
||||
return BaseView<DoctorReplayViewModel>(
|
||||
builder: (_, model, w) => AppScaffold(
|
||||
baseViewModel: model,
|
||||
appBarTitle: TranslationBase.of(context).healthRecordInformation,
|
||||
body: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Container(
|
||||
decoration:
|
||||
BoxDecoration(boxShadow: <BoxShadow>[], color: Colors.white),
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
AvatarWidget(
|
||||
Icon(
|
||||
patient.genderDescription == "Male"
|
||||
? DoctorApp.male
|
||||
: DoctorApp.female_icon,
|
||||
size: 70,
|
||||
color: Colors.white,
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
width: 20,
|
||||
),
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
SizedBox(
|
||||
height: 5,
|
||||
),
|
||||
AppText(
|
||||
patient.firstName + ' ' + patient.lastName,
|
||||
color: Colors.black,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
AppText(
|
||||
TranslationBase.of(context).age,
|
||||
color: Colors.black,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
SizedBox(
|
||||
width: 20,
|
||||
),
|
||||
AppText(
|
||||
patient.age.toString(),
|
||||
color: Colors.black,
|
||||
fontWeight: FontWeight.normal,
|
||||
),
|
||||
],
|
||||
),
|
||||
AppText(
|
||||
"ALLERGIC TO: FOOD, ASPIRIN, EGG WHITE",
|
||||
color: Color(0xFFB9382C),
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
],
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
Container(
|
||||
width: double.infinity,
|
||||
height: 1,
|
||||
color: Color(0xffCCCCCC),
|
||||
),
|
||||
SizedBox(
|
||||
width: 20,
|
||||
),
|
||||
FractionallySizedBox(
|
||||
child: SingleChildScrollView(
|
||||
child: Container(
|
||||
height: MediaQuery.of(context).size.height * 0.75,
|
||||
child: Column(
|
||||
children: [
|
||||
Container(
|
||||
margin: EdgeInsets.only(
|
||||
left:
|
||||
MediaQuery.of(context).size.width * 0.05,
|
||||
right:
|
||||
MediaQuery.of(context).size.width * 0.05),
|
||||
child: StepsWidget(
|
||||
index: _currentIndex,
|
||||
changeCurrentTab: changePageViewIndex,
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: PageView(
|
||||
physics: NeverScrollableScrollPhysics(),
|
||||
controller: _controller,
|
||||
onPageChanged: (index) {
|
||||
setState(() {
|
||||
_currentIndex = index;
|
||||
});
|
||||
},
|
||||
scrollDirection: Axis.horizontal,
|
||||
children: <Widget>[
|
||||
SubjectivePage(changePageViewIndex: changePageViewIndex,),
|
||||
ObjectivePage(changePageViewIndex: changePageViewIndex,),
|
||||
AssessmentPage(changePageViewIndex: changePageViewIndex,),
|
||||
PlanPage(changePageViewIndex: changePageViewIndex,)
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,36 @@
|
||||
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
|
||||
import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart';
|
||||
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class AssessmentPage extends StatelessWidget {
|
||||
final Function changePageViewIndex;
|
||||
|
||||
AssessmentPage({Key key, this.changePageViewIndex});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return AppScaffold(
|
||||
isShowAppBar: false,
|
||||
// baseViewModel: widget.model,
|
||||
body: SingleChildScrollView(
|
||||
physics: ScrollPhysics(),
|
||||
child: Center(
|
||||
child: FractionallySizedBox(
|
||||
widthFactor: 0.9,
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
AppButton(
|
||||
title: TranslationBase.of(context).next,
|
||||
onPressed: () {
|
||||
changePageViewIndex(3);
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,36 @@
|
||||
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
|
||||
import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart';
|
||||
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class ObjectivePage extends StatelessWidget {
|
||||
final Function changePageViewIndex;
|
||||
|
||||
ObjectivePage({Key key, this.changePageViewIndex});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return AppScaffold(
|
||||
isShowAppBar: false,
|
||||
// baseViewModel: widget.model,
|
||||
body: SingleChildScrollView(
|
||||
physics: ScrollPhysics(),
|
||||
child: Center(
|
||||
child: FractionallySizedBox(
|
||||
widthFactor: 0.9,
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
AppButton(
|
||||
title: TranslationBase.of(context).next,
|
||||
onPressed: () {
|
||||
changePageViewIndex(2);
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,36 @@
|
||||
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
|
||||
import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart';
|
||||
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class PlanPage extends StatelessWidget {
|
||||
final Function changePageViewIndex;
|
||||
|
||||
PlanPage({Key key, this.changePageViewIndex});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return AppScaffold(
|
||||
isShowAppBar: false,
|
||||
// baseViewModel: widget.model,
|
||||
body: SingleChildScrollView(
|
||||
physics: ScrollPhysics(),
|
||||
child: Center(
|
||||
child: FractionallySizedBox(
|
||||
widthFactor: 0.9,
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
AppButton(
|
||||
title: TranslationBase.of(context).next,
|
||||
onPressed: () {
|
||||
changePageViewIndex(4);
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,447 @@
|
||||
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
|
||||
import 'package:doctor_app_flutter/widgets/shared/Text.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
class StepsWidget extends StatelessWidget {
|
||||
final int index;
|
||||
final Function changeCurrentTab;
|
||||
|
||||
StepsWidget({Key key, this.index, this.changeCurrentTab});
|
||||
|
||||
// TODO : Add translation to name
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
ProjectViewModel projectViewModel = Provider.of(context);
|
||||
return !projectViewModel.isArabic
|
||||
? Stack(
|
||||
children: [
|
||||
Container(
|
||||
height: 120,
|
||||
width: MediaQuery.of(context).size.width,
|
||||
color: Colors.transparent,
|
||||
child: Center(
|
||||
child: Divider(
|
||||
color: Colors.grey,
|
||||
height: 0.75,
|
||||
thickness: 0.75,
|
||||
),
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
top: index == 0 ? 15 : 30,
|
||||
left: 0,
|
||||
child: InkWell(
|
||||
onTap: () => changeCurrentTab(0),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Container(
|
||||
width: index == 0 ? 70 : 50,
|
||||
height: index == 0 ? 70 : 50,
|
||||
decoration: BoxDecoration(
|
||||
border: index == 0
|
||||
? Border.all(color: Color(0xFFB9382C), width: 2)
|
||||
: index > 0
|
||||
? null
|
||||
: Border.all(
|
||||
color: Colors.black, width: 0.75),
|
||||
shape: BoxShape.circle,
|
||||
color: index == 0
|
||||
? Colors.white
|
||||
: index > 0
|
||||
? Color(0xFFB9382C)
|
||||
: Color(0xFFCCCCCC),
|
||||
),
|
||||
child: Center(
|
||||
child: Texts(
|
||||
'1',
|
||||
variant: index == 0 ? "heading2" : "",
|
||||
bold: true,
|
||||
color: index == 0
|
||||
? Colors.black
|
||||
: index > 0
|
||||
? Colors.white
|
||||
: Colors.grey,
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
height: index == 0 ? 5 : 10,
|
||||
),
|
||||
Texts('SUBJECTIVE',
|
||||
variant: "bodyText",
|
||||
bold: true,
|
||||
color: Colors.black),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
top: index == 1 ? 15 : 30,
|
||||
left: MediaQuery.of(context).size.width * 0.28,
|
||||
child: InkWell(
|
||||
onTap: () => index >= 2 ? changeCurrentTab(1) : null,
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Container(
|
||||
width: index == 1 ? 70 : 50,
|
||||
height: index == 1 ? 70 : 50,
|
||||
decoration: BoxDecoration(
|
||||
border: index == 1
|
||||
? Border.all(color: Color(0xFFB9382C), width: 2)
|
||||
: index > 2
|
||||
? null
|
||||
: Border.all(
|
||||
color: Color(0xFFCCCCCC), width: 0.75),
|
||||
shape: BoxShape.circle,
|
||||
color: index == 1
|
||||
? Colors.white
|
||||
: index > 1
|
||||
? Color(0xFFB9382C)
|
||||
: Color(0xFFCCCCCC),
|
||||
),
|
||||
child: Center(
|
||||
child: Texts(
|
||||
'2',
|
||||
variant: index == 1 ? "heading2" : '',
|
||||
bold: true,
|
||||
color: index == 1
|
||||
? Colors.black
|
||||
: index > 1
|
||||
? Colors.white
|
||||
: Colors.grey,
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
height: index == 1 ? 5 : 10,
|
||||
),
|
||||
Texts('OBJECTIVE',
|
||||
variant: "bodyText",
|
||||
bold: true,
|
||||
color: Colors.black),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
top: index == 2 ? 15 : 30,
|
||||
left: MediaQuery.of(context).size.width * 0.52,
|
||||
child: InkWell(
|
||||
onTap: () => index >= 2 ? changeCurrentTab(3) : null,
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Container(
|
||||
width: index == 2 ? 70 : 50,
|
||||
height: index == 2 ? 70 : 50,
|
||||
decoration: BoxDecoration(
|
||||
border: index == 2
|
||||
? Border.all(color: Color(0xFFB9382C), width: 2)
|
||||
: index > 2
|
||||
? null
|
||||
: Border.all(
|
||||
color: Color(0xFFCCCCCC), width: 0.75),
|
||||
shape: BoxShape.circle,
|
||||
color: index == 2
|
||||
? Colors.white
|
||||
: index > 2
|
||||
? Color(0xFFB9382C)
|
||||
: Color(0xFFCCCCCC),
|
||||
),
|
||||
child: Center(
|
||||
child: Texts(
|
||||
'3',
|
||||
variant: index == 2 ? "heading2" : '',
|
||||
bold: true,
|
||||
color: index == 2
|
||||
? Colors.black
|
||||
: index > 2
|
||||
? Colors.white
|
||||
: Colors.grey,
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
height: index == 2 ? 5 : 10,
|
||||
),
|
||||
Texts('ASSESSMENT',
|
||||
variant: "bodyText",
|
||||
bold: true,
|
||||
color: Colors.black),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
top: index == 3 ? 15 : 30,
|
||||
right: 0,
|
||||
child: InkWell(
|
||||
onTap: () => index >= 3 ? changeCurrentTab(4) : null,
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Container(
|
||||
width: index == 3 ? 70 : 50,
|
||||
height: index == 3 ? 70 : 50,
|
||||
decoration: BoxDecoration(
|
||||
border: index == 3
|
||||
? Border.all(color: Color(0xFFB9382C), width: 2)
|
||||
: index > 3
|
||||
? null
|
||||
: Border.all(
|
||||
color: Color(0xFFCCCCCC), width: 0.75),
|
||||
shape: BoxShape.circle,
|
||||
color: index == 3
|
||||
? Colors.white
|
||||
: index > 3
|
||||
? Color(0xFFB9382C)
|
||||
: Color(0xFFCCCCCC),
|
||||
),
|
||||
child: Center(
|
||||
child: Texts(
|
||||
'4',
|
||||
variant: index == 3 ? "heading2" : '',
|
||||
bold: true,
|
||||
color: index == 3
|
||||
? Colors.black
|
||||
: index > 3
|
||||
? Colors.white
|
||||
: Colors.grey,
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
height: index == 3 ? 5 : 10,
|
||||
),
|
||||
Texts('PLAN',
|
||||
variant: "bodyText",
|
||||
bold: true,
|
||||
color: Colors.black),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
)
|
||||
: Stack(
|
||||
children: [
|
||||
Container(
|
||||
height: 120,
|
||||
width: MediaQuery.of(context).size.width,
|
||||
color: Colors.transparent,
|
||||
child: Center(
|
||||
child: Divider(
|
||||
color: Colors.grey,
|
||||
height: 0.75,
|
||||
thickness: 0.75,
|
||||
),
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
top: index == 0 ? 15 : 30,
|
||||
right: 0,
|
||||
child: InkWell(
|
||||
onTap: () => changeCurrentTab(0),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Container(
|
||||
width: index == 0 ? 70 : 50,
|
||||
height: index == 0 ? 70 : 50,
|
||||
decoration: BoxDecoration(
|
||||
border: index == 0
|
||||
? Border.all(color: Color(0xFFB9382C), width: 2)
|
||||
: index > 0
|
||||
? null
|
||||
: Border.all(
|
||||
color: Colors.black, width: 0.75),
|
||||
shape: BoxShape.circle,
|
||||
color: index == 0
|
||||
? Colors.white
|
||||
: index > 0
|
||||
? Color(0xFFB9382C)
|
||||
: Color(0xFFCCCCCC),
|
||||
),
|
||||
child: Center(
|
||||
child: Texts(
|
||||
'1',
|
||||
variant: index == 0 ? "heading2" : "",
|
||||
bold: true,
|
||||
color: index == 0
|
||||
? Colors.black
|
||||
: index > 0
|
||||
? Colors.white
|
||||
: Colors.grey,
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
height: index == 0 ? 5 : 10,
|
||||
),
|
||||
Texts('SUBJECTIVE',
|
||||
variant: "bodyText",
|
||||
bold: true,
|
||||
color: Colors.black),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
top: index == 1 ? 15 : 30,
|
||||
right: MediaQuery.of(context).size.width * 0.28,
|
||||
child: InkWell(
|
||||
onTap: () => index >= 2 ? changeCurrentTab(1) : null,
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Container(
|
||||
width: index == 1 ? 70 : 50,
|
||||
height: index == 1 ? 70 : 50,
|
||||
decoration: BoxDecoration(
|
||||
border: index == 1
|
||||
? Border.all(color: Color(0xFFB9382C), width: 2)
|
||||
: index > 2
|
||||
? null
|
||||
: Border.all(
|
||||
color: Color(0xFFCCCCCC), width: 0.75),
|
||||
shape: BoxShape.circle,
|
||||
color: index == 1
|
||||
? Colors.white
|
||||
: index > 1
|
||||
? Color(0xFFB9382C)
|
||||
: Color(0xFFCCCCCC),
|
||||
),
|
||||
child: Center(
|
||||
child: Texts(
|
||||
'2',
|
||||
variant: index == 1 ? "heading2" : '',
|
||||
bold: true,
|
||||
color: index == 1
|
||||
? Colors.black
|
||||
: index > 1
|
||||
? Colors.white
|
||||
: Colors.grey,
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
height: index == 1 ? 5 : 10,
|
||||
),
|
||||
Texts('OBJECTIVE',
|
||||
variant: "bodyText",
|
||||
bold: true,
|
||||
color: Colors.black),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
top: index == 2 ? 15 : 30,
|
||||
right: MediaQuery.of(context).size.width * 0.52,
|
||||
child: InkWell(
|
||||
onTap: () => index >= 2 ? changeCurrentTab(3) : null,
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Container(
|
||||
width: index == 2 ? 70 : 50,
|
||||
height: index == 2 ? 70 : 50,
|
||||
decoration: BoxDecoration(
|
||||
border: index == 2
|
||||
? Border.all(color: Color(0xFFB9382C), width: 2)
|
||||
: index > 2
|
||||
? null
|
||||
: Border.all(
|
||||
color: Color(0xFFCCCCCC), width: 0.75),
|
||||
shape: BoxShape.circle,
|
||||
color: index == 2
|
||||
? Colors.white
|
||||
: index > 2
|
||||
? Color(0xFFB9382C)
|
||||
: Color(0xFFCCCCCC),
|
||||
),
|
||||
child: Center(
|
||||
child: Texts(
|
||||
'3',
|
||||
variant: index == 2 ? "heading2" : '',
|
||||
bold: true,
|
||||
color: index == 2
|
||||
? Colors.black
|
||||
: index > 2
|
||||
? Colors.white
|
||||
: Colors.grey,
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
height: index == 2 ? 5 : 10,
|
||||
),
|
||||
Padding(
|
||||
|
||||
padding: const EdgeInsets.only(right: 2),
|
||||
child: Texts('ASSESSMENT',
|
||||
variant: "bodyText",
|
||||
bold: true,
|
||||
color: Colors.black),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
top: index == 3 ? 15 : 30,
|
||||
left: 0,
|
||||
child: InkWell(
|
||||
onTap: () => index >= 3 ? changeCurrentTab(4) : null,
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Container(
|
||||
width: index == 3 ? 70 : 50,
|
||||
height: index == 3 ? 70 : 50,
|
||||
decoration: BoxDecoration(
|
||||
border: index == 3
|
||||
? Border.all(color: Color(0xFFB9382C), width: 2)
|
||||
: index > 3
|
||||
? null
|
||||
: Border.all(
|
||||
color: Color(0xFFCCCCCC), width: 0.75),
|
||||
shape: BoxShape.circle,
|
||||
color: index == 3
|
||||
? Colors.white
|
||||
: index > 3
|
||||
? Color(0xFFB9382C)
|
||||
: Color(0xFFCCCCCC),
|
||||
),
|
||||
child: Center(
|
||||
child: Texts(
|
||||
'4',
|
||||
variant: index == 3 ? "heading2" : '',
|
||||
bold: true,
|
||||
color: index == 3
|
||||
? Colors.black
|
||||
: index > 3
|
||||
? Colors.white
|
||||
: Colors.grey,
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
height: index == 3 ? 5 : 10,
|
||||
),
|
||||
Texts('PLAN',
|
||||
variant: "bodyText",
|
||||
bold: true,
|
||||
color: Colors.black),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,36 @@
|
||||
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
|
||||
import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart';
|
||||
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class SubjectivePage extends StatelessWidget {
|
||||
final Function changePageViewIndex;
|
||||
|
||||
SubjectivePage({Key key, this.changePageViewIndex});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return AppScaffold(
|
||||
isShowAppBar: false,
|
||||
// baseViewModel: widget.model,
|
||||
body: SingleChildScrollView(
|
||||
physics: ScrollPhysics(),
|
||||
child: Center(
|
||||
child: FractionallySizedBox(
|
||||
widthFactor: 0.9,
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
AppButton(
|
||||
title: TranslationBase.of(context).next,
|
||||
onPressed: () {
|
||||
changePageViewIndex(1);
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
));
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue