|
|
@ -1,8 +1,6 @@
|
|
|
|
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
|
|
|
|
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
|
|
|
|
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
|
|
|
|
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
|
|
|
|
import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart';
|
|
|
|
|
|
|
|
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
|
|
|
|
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
|
|
|
|
import 'package:diplomaticquarterapp/locator.dart';
|
|
|
|
|
|
|
|
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
|
|
|
|
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
|
|
|
|
import 'package:diplomaticquarterapp/models/Appointments/PatientShareResposne.dart';
|
|
|
|
import 'package:diplomaticquarterapp/models/Appointments/PatientShareResposne.dart';
|
|
|
|
import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart';
|
|
|
|
import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart';
|
|
|
@ -20,7 +18,10 @@ import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
|
|
|
|
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
|
|
|
|
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
|
|
|
|
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
|
|
|
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
|
|
|
import 'package:diplomaticquarterapp/uitl/utils.dart';
|
|
|
|
import 'package:diplomaticquarterapp/uitl/utils.dart';
|
|
|
|
|
|
|
|
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
|
|
|
|
|
|
|
|
import 'package:diplomaticquarterapp/widgets/avatar/large_avatar.dart';
|
|
|
|
import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.dart';
|
|
|
|
import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.dart';
|
|
|
|
|
|
|
|
import 'package:diplomaticquarterapp/widgets/my_rich_text.dart';
|
|
|
|
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
|
|
|
|
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
|
|
|
|
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
|
|
|
|
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
@ -40,7 +41,7 @@ class ToDo extends StatefulWidget {
|
|
|
|
bool isShowAppBar = true;
|
|
|
|
bool isShowAppBar = true;
|
|
|
|
Function onBackClick;
|
|
|
|
Function onBackClick;
|
|
|
|
|
|
|
|
|
|
|
|
ToDo({@required this.isShowAppBar,this.onBackClick});
|
|
|
|
ToDo({@required this.isShowAppBar, this.onBackClick});
|
|
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
@override
|
|
|
|
_ToDoState createState() => _ToDoState();
|
|
|
|
_ToDoState createState() => _ToDoState();
|
|
|
@ -49,11 +50,7 @@ class ToDo extends StatefulWidget {
|
|
|
|
class _ToDoState extends State<ToDo> {
|
|
|
|
class _ToDoState extends State<ToDo> {
|
|
|
|
AppSharedPreferences sharedPref = AppSharedPreferences();
|
|
|
|
AppSharedPreferences sharedPref = AppSharedPreferences();
|
|
|
|
|
|
|
|
|
|
|
|
AuthenticatedUser authUser;
|
|
|
|
|
|
|
|
AuthenticatedUserObject authenticatedUserObject = locator<AuthenticatedUserObject>();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<ImagesInfo> imagesInfo = List();
|
|
|
|
List<ImagesInfo> imagesInfo = List();
|
|
|
|
|
|
|
|
|
|
|
|
ToDoCountProviderModel toDoProvider;
|
|
|
|
ToDoCountProviderModel toDoProvider;
|
|
|
|
CountdownTimerController controller;
|
|
|
|
CountdownTimerController controller;
|
|
|
|
|
|
|
|
|
|
|
@ -63,7 +60,7 @@ class _ToDoState extends State<ToDo> {
|
|
|
|
void initState() {
|
|
|
|
void initState() {
|
|
|
|
widget.patientShareResponse = new PatientShareResponse();
|
|
|
|
widget.patientShareResponse = new PatientShareResponse();
|
|
|
|
WidgetsBinding.instance.addPostFrameCallback((_) {
|
|
|
|
WidgetsBinding.instance.addPostFrameCallback((_) {
|
|
|
|
if (authenticatedUserObject.isLogin) getPatientData();
|
|
|
|
getPatientAppointmentHistory();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
super.initState();
|
|
|
|
super.initState();
|
|
|
|
imagesInfo
|
|
|
|
imagesInfo
|
|
|
@ -85,7 +82,7 @@ class _ToDoState extends State<ToDo> {
|
|
|
|
showNewAppBarTitle: true,
|
|
|
|
showNewAppBarTitle: true,
|
|
|
|
icon: "assets/images/new/bottom_nav/todo.svg",
|
|
|
|
icon: "assets/images/new/bottom_nav/todo.svg",
|
|
|
|
description: TranslationBase.of(context).infoTodo,
|
|
|
|
description: TranslationBase.of(context).infoTodo,
|
|
|
|
onTap:widget.onBackClick,
|
|
|
|
onTap: widget.onBackClick,
|
|
|
|
backgroundColor: CustomColors.appBackgroudGrey2Color,
|
|
|
|
backgroundColor: CustomColors.appBackgroudGrey2Color,
|
|
|
|
body: SingleChildScrollView(
|
|
|
|
body: SingleChildScrollView(
|
|
|
|
child: Column(
|
|
|
|
child: Column(
|
|
|
@ -98,207 +95,353 @@ class _ToDoState extends State<ToDo> {
|
|
|
|
padding: EdgeInsets.all(0.0),
|
|
|
|
padding: EdgeInsets.all(0.0),
|
|
|
|
itemCount: widget.appoList.length,
|
|
|
|
itemCount: widget.appoList.length,
|
|
|
|
itemBuilder: (context, index) {
|
|
|
|
itemBuilder: (context, index) {
|
|
|
|
print("ttt " + getNextActionImage(widget.appoList[index].nextAction));
|
|
|
|
|
|
|
|
print("ttt " + widget.appoList[index].nextAction.toString());
|
|
|
|
|
|
|
|
return Container(
|
|
|
|
return Container(
|
|
|
|
margin: EdgeInsets.all(10.0),
|
|
|
|
width: double.infinity,
|
|
|
|
|
|
|
|
margin: EdgeInsets.only(left: 12.0, right: 12.0, top: 12.0),
|
|
|
|
|
|
|
|
decoration: cardRadius(12),
|
|
|
|
|
|
|
|
padding: EdgeInsets.all(16),
|
|
|
|
child: Column(
|
|
|
|
child: Column(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
Container(
|
|
|
|
Row(
|
|
|
|
child: Card(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
margin: EdgeInsets.fromLTRB(8.0, 0.0, 8.0, 8.0),
|
|
|
|
children: [
|
|
|
|
color: Colors.white,
|
|
|
|
Row(
|
|
|
|
shape: RoundedRectangleBorder(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
borderRadius: BorderRadius.circular(10),
|
|
|
|
children: [
|
|
|
|
|
|
|
|
Padding(
|
|
|
|
|
|
|
|
padding: const EdgeInsets.only(top: 4.0),
|
|
|
|
|
|
|
|
child: widget.appoList[index].clinicID == 265
|
|
|
|
|
|
|
|
? Container(
|
|
|
|
|
|
|
|
margin: EdgeInsets.only(left: 5.0, right: 5.0),
|
|
|
|
|
|
|
|
child: SvgPicture.asset("assets/images/new/drive-thru.svg"),
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
: widget.appoList[index].isLiveCareAppointment
|
|
|
|
|
|
|
|
? SvgPicture.asset("assets/images/new/virtual.svg")
|
|
|
|
|
|
|
|
: SvgPicture.asset("assets/images/new/hospital-visit.svg"),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// SvgPicture.asset("assets/images/new/virtual.svg"),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
child: Container(
|
|
|
|
Column(
|
|
|
|
width: MediaQuery.of(context).size.width,
|
|
|
|
|
|
|
|
padding: EdgeInsets.all(10.0),
|
|
|
|
|
|
|
|
child: Column(
|
|
|
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
mainAxisSize: MainAxisSize.max,
|
|
|
|
children: [
|
|
|
|
children: <Widget>[
|
|
|
|
Padding(
|
|
|
|
Row(
|
|
|
|
padding: const EdgeInsets.only(left: 8.0, right: 8.0),
|
|
|
|
children: <Widget>[
|
|
|
|
|
|
|
|
Image.asset("assets/images/new-design/time_icon.png", width: 20.0, height: 20.0),
|
|
|
|
|
|
|
|
Container(
|
|
|
|
|
|
|
|
width: MediaQuery.of(context).size.width * 0.4,
|
|
|
|
|
|
|
|
margin: EdgeInsets.only(left: 10.0, right: 10.0),
|
|
|
|
|
|
|
|
child: Text(
|
|
|
|
child: Text(
|
|
|
|
DateUtil.getWeekDayMonthDayYearDateFormatted(
|
|
|
|
widget.appoList[index].clinicID == 265
|
|
|
|
DateUtil.convertStringToDate(widget.appoList[index].appointmentDate), projectViewModel.isArabic ? "ar" : "en") +
|
|
|
|
? TranslationBase.of(context).drivethruAppo
|
|
|
|
" " +
|
|
|
|
: widget.appoList[index].isLiveCareAppointment
|
|
|
|
widget.appoList[index].startTime.substring(0, 5),
|
|
|
|
? TranslationBase.of(context).liveCareAppo
|
|
|
|
overflow: TextOverflow.clip,
|
|
|
|
: TranslationBase.of(context).walkinAppo,
|
|
|
|
style: TextStyle(fontSize: 10.0)),
|
|
|
|
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48)),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
!widget.appoList[index].isLiveCareAppointment ? Image.asset("assets/images/new-design/hospital_address_icon.png", width: 20.0, height: 20.0) : Container(),
|
|
|
|
Padding(
|
|
|
|
Container(
|
|
|
|
padding: const EdgeInsets.only(left: 8.0, right: 8.0),
|
|
|
|
margin: EdgeInsets.only(left: 5.0, right: 5.0),
|
|
|
|
child: CountdownTimer(
|
|
|
|
child: widget.appoList[index].isLiveCareAppointment
|
|
|
|
controller: new CountdownTimerController(endTime: DateTime.now().millisecondsSinceEpoch + (widget.appoList[index].remaniningHoursTocanPay * 1000) * 60),
|
|
|
|
? Container()
|
|
|
|
widgetBuilder: (_, CurrentRemainingTime time) {
|
|
|
|
: Text(widget.appoList[index].projectName != null ? widget.appoList[index].projectName : "-",
|
|
|
|
return time != null
|
|
|
|
overflow: TextOverflow.clip, maxLines: 2, style: TextStyle(fontSize: 10.0)),
|
|
|
|
? Text(
|
|
|
|
|
|
|
|
'${time.days != null ? time.days : "0"}:${time.hours != null ? time.hours.toString().length == 1 ? "0" + time.hours.toString() : time.hours : "00"}:${time.min}:${time.sec} ' +
|
|
|
|
|
|
|
|
TranslationBase.of(context).upcomingTimeLeft,
|
|
|
|
|
|
|
|
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: CustomColors.accentColor, letterSpacing: -0.48))
|
|
|
|
|
|
|
|
: Container();
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Container(
|
|
|
|
Container(
|
|
|
|
margin: EdgeInsets.only(top: 5.0),
|
|
|
|
child: InkWell(
|
|
|
|
child: Divider(
|
|
|
|
onTap: () {
|
|
|
|
color: Colors.grey[500],
|
|
|
|
performNextAction(widget.appoList[index]);
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
child: Container(
|
|
|
|
|
|
|
|
padding: EdgeInsets.symmetric(vertical: 8, horizontal: 14),
|
|
|
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
|
|
|
color: getNextActionButtonColor(widget.appoList[index].nextAction),
|
|
|
|
|
|
|
|
border: Border.all(color: Colors.white, width: 1),
|
|
|
|
|
|
|
|
borderRadius: BorderRadius.circular(6),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
child: Text(
|
|
|
|
|
|
|
|
getNextActionText(widget.appoList[index].nextAction),
|
|
|
|
|
|
|
|
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Colors.white, letterSpacing: -0.4),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Flex(
|
|
|
|
|
|
|
|
direction: Axis.horizontal,
|
|
|
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
|
|
|
Expanded(
|
|
|
|
|
|
|
|
flex: 1,
|
|
|
|
|
|
|
|
child: Container(
|
|
|
|
|
|
|
|
height: MediaQuery.of(context).size.height * 0.1,
|
|
|
|
|
|
|
|
margin: EdgeInsets.only(top: 5.0),
|
|
|
|
|
|
|
|
child: ClipRRect(
|
|
|
|
|
|
|
|
borderRadius: BorderRadius.circular(100.0),
|
|
|
|
|
|
|
|
child: Image.network(widget.appoList[index].doctorImageURL, fit: BoxFit.fill),
|
|
|
|
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
Padding(
|
|
|
|
|
|
|
|
padding: const EdgeInsets.only(top: 8.0),
|
|
|
|
|
|
|
|
child: Text(
|
|
|
|
|
|
|
|
widget.appoList[index].doctorTitle + " " + widget.appoList[index].doctorNameObj,
|
|
|
|
|
|
|
|
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.64, height: 25 / 16),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
Row(
|
|
|
|
|
|
|
|
mainAxisSize: MainAxisSize.min,
|
|
|
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
|
|
|
LargeAvatar(
|
|
|
|
|
|
|
|
name: widget.appoList[index].doctorTitle + " " + widget.appoList[index].doctorNameObj,
|
|
|
|
|
|
|
|
url: widget.appoList[index].doctorImageURL,
|
|
|
|
|
|
|
|
width: 52,
|
|
|
|
|
|
|
|
height: 52,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
|
|
|
|
SizedBox(width: 11),
|
|
|
|
Expanded(
|
|
|
|
Expanded(
|
|
|
|
flex: 3,
|
|
|
|
|
|
|
|
child: Container(
|
|
|
|
|
|
|
|
margin: EdgeInsets.only(top: 10.0, left: 20.0, right: 20.0),
|
|
|
|
|
|
|
|
child: Column(
|
|
|
|
child: Column(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
|
|
|
mainAxisSize: MainAxisSize.min,
|
|
|
|
children: <Widget>[
|
|
|
|
children: <Widget>[
|
|
|
|
Text(widget.appoList[index].doctorTitle + " " + widget.appoList[index].doctorNameObj,
|
|
|
|
MyRichText(TranslationBase.of(context).clinic + ": ", widget.appoList[index].clinicName, projectViewModel.isArabic),
|
|
|
|
style: TextStyle(fontSize: 14.0, color: Colors.black, fontWeight: FontWeight.bold, letterSpacing: -0.64)),
|
|
|
|
MyRichText(TranslationBase.of(context).appointmentDate + ": ",
|
|
|
|
if (getDoctorSpeciality(widget.appoList[index].doctorSpeciality) != "null\n")
|
|
|
|
DateUtil.getDayMonthYearHourMinuteDateFormatted(DateUtil.convertStringToDate(widget.appoList[index].appointmentDate)), projectViewModel.isArabic),
|
|
|
|
Container(
|
|
|
|
MyRichText(TranslationBase.of(context).branch, widget.appoList[index].projectName, projectViewModel.isArabic),
|
|
|
|
margin: EdgeInsets.only(top: 3.0, bottom: 3.0),
|
|
|
|
|
|
|
|
child: Text(getDoctorSpeciality(widget.appoList[index].doctorSpeciality).trim(),
|
|
|
|
|
|
|
|
style: TextStyle(fontSize: 12.0, color: Colors.grey[600], letterSpacing: -0.64)),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
Row(
|
|
|
|
Row(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
mainAxisSize: MainAxisSize.max,
|
|
|
|
mainAxisSize: MainAxisSize.max,
|
|
|
|
children: <Widget>[
|
|
|
|
children: <Widget>[
|
|
|
|
RatingBar.readOnly(
|
|
|
|
RatingBar.readOnly(
|
|
|
|
initialRating: widget.appoList[index].actualDoctorRate.toDouble(),
|
|
|
|
initialRating: widget.appoList[index].actualDoctorRate.toDouble(),
|
|
|
|
size: 20.0,
|
|
|
|
size: 16.0,
|
|
|
|
filledColor: Colors.yellow[700],
|
|
|
|
filledColor: Color(0XFFD02127),
|
|
|
|
emptyColor: Colors.grey[500],
|
|
|
|
emptyColor: Color(0XFFD02127),
|
|
|
|
isHalfAllowed: true,
|
|
|
|
isHalfAllowed: true,
|
|
|
|
halfFilledIcon: Icons.star_half,
|
|
|
|
halfFilledIcon: Icons.star_half,
|
|
|
|
filledIcon: Icons.star,
|
|
|
|
filledIcon: Icons.star,
|
|
|
|
emptyIcon: Icons.star,
|
|
|
|
emptyIcon: Icons.star_border,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Container(
|
|
|
|
|
|
|
|
child: CountdownTimer(
|
|
|
|
|
|
|
|
controller:
|
|
|
|
|
|
|
|
new CountdownTimerController(endTime: DateTime.now().millisecondsSinceEpoch + (widget.appoList[index].remaniningHoursTocanPay * 1000) * 60),
|
|
|
|
|
|
|
|
widgetBuilder: (_, CurrentRemainingTime time) {
|
|
|
|
|
|
|
|
return time != null
|
|
|
|
|
|
|
|
? Text(
|
|
|
|
|
|
|
|
'${time.days != null ? time.days : "0"}:${time.hours != null ? time.hours.toString().length == 1 ? "0" + time.hours.toString() : time.hours : "00"}:${time.min}:${time.sec} ' +
|
|
|
|
|
|
|
|
TranslationBase.of(context).upcomingTimeLeft,
|
|
|
|
|
|
|
|
style: TextStyle(fontSize: 12.0, color: Color(0xffC5272D)))
|
|
|
|
|
|
|
|
: Container();
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
Expanded(
|
|
|
|
|
|
|
|
flex: 1,
|
|
|
|
|
|
|
|
child: InkWell(
|
|
|
|
|
|
|
|
onTap: () => performNextAction(widget.appoList[index]),
|
|
|
|
|
|
|
|
child: Container(
|
|
|
|
|
|
|
|
margin: EdgeInsets.only(top: 20.0),
|
|
|
|
|
|
|
|
child: Column(
|
|
|
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
|
|
|
Image.asset(getNextActionImage(widget.appoList[index].nextAction), width: 50.0, height: 50.0),
|
|
|
|
|
|
|
|
Container(
|
|
|
|
|
|
|
|
margin: EdgeInsets.only(top: 5.0),
|
|
|
|
|
|
|
|
child: Text(getNextActionText(widget.appoList[index].nextAction), textAlign: TextAlign.center, style: TextStyle(fontSize: 12.0)),
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Divider(
|
|
|
|
Padding(
|
|
|
|
color: Colors.grey[500],
|
|
|
|
padding: const EdgeInsets.only(top: 12.0),
|
|
|
|
),
|
|
|
|
child: Text(
|
|
|
|
Flex(
|
|
|
|
getNextActionDescription(widget.appoList[index].nextAction),
|
|
|
|
direction: Axis.horizontal,
|
|
|
|
style: TextStyle(fontSize: 10, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.48, height: 25 / 16),
|
|
|
|
children: <Widget>[
|
|
|
|
|
|
|
|
Expanded(
|
|
|
|
|
|
|
|
flex: 2,
|
|
|
|
|
|
|
|
child: Container(
|
|
|
|
|
|
|
|
child: Text(getNextActionDescription(widget.appoList[index].nextAction), style: TextStyle(fontSize: 11.0, color: Colors.grey[700])),
|
|
|
|
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Expanded(
|
|
|
|
InkWell(
|
|
|
|
flex: 1,
|
|
|
|
|
|
|
|
child: GestureDetector(
|
|
|
|
|
|
|
|
onTap: () {
|
|
|
|
onTap: () {
|
|
|
|
navigateToAppointmentDetails(context, widget.appoList[index]);
|
|
|
|
navigateToAppointmentDetails(context, widget.appoList[index]);
|
|
|
|
},
|
|
|
|
},
|
|
|
|
child: Container(
|
|
|
|
child: Padding(
|
|
|
|
child: Text(TranslationBase.of(context).upcomingDetails,
|
|
|
|
padding: const EdgeInsets.only(top: 0.0),
|
|
|
|
textAlign: TextAlign.end, style: TextStyle(fontSize: 11.0, color: new Color(0xffC5272D), decoration: TextDecoration.underline)),
|
|
|
|
child: Text(
|
|
|
|
),
|
|
|
|
TranslationBase.of(context).moreDetails,
|
|
|
|
),
|
|
|
|
style: TextStyle(fontSize: 10, fontWeight: FontWeight.w600, color: CustomColors.accentColor, letterSpacing: -0.48, height: 25 / 16, decoration: TextDecoration.underline),
|
|
|
|
)
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
Container(
|
|
|
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
|
|
|
borderRadius: BorderRadius.only(bottomLeft: Radius.circular(10.0), bottomRight: Radius.circular(10.0)),
|
|
|
|
|
|
|
|
color: Color(0xff20bc44),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
height: 30.0,
|
|
|
|
|
|
|
|
padding: EdgeInsets.only(right: 10, left: 10),
|
|
|
|
|
|
|
|
margin: EdgeInsets.symmetric(horizontal: 20),
|
|
|
|
|
|
|
|
transform: Matrix4.translationValues(0.0, -8.0, 0.0),
|
|
|
|
|
|
|
|
child: Row(
|
|
|
|
|
|
|
|
mainAxisSize: MainAxisSize.min,
|
|
|
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
|
|
|
|
|
|
children: [
|
|
|
|
|
|
|
|
widget.appoList[index].clinicID == 265
|
|
|
|
|
|
|
|
? Container(
|
|
|
|
|
|
|
|
margin: EdgeInsets.only(left: 5.0, right: 5.0),
|
|
|
|
|
|
|
|
child: SvgPicture.asset(
|
|
|
|
|
|
|
|
"assets/images/new/car_icon.svg",
|
|
|
|
|
|
|
|
height: 15,
|
|
|
|
|
|
|
|
width: 15,
|
|
|
|
|
|
|
|
),
|
|
|
|
),
|
|
|
|
)
|
|
|
|
|
|
|
|
: widget.appoList[index].isLiveCareAppointment
|
|
|
|
|
|
|
|
? Image.asset("assets/images/new-design/video.png")
|
|
|
|
|
|
|
|
: Image.asset("assets/images/new-design/walkin.png"),
|
|
|
|
|
|
|
|
widget.appoList[index].clinicID == 265
|
|
|
|
|
|
|
|
? Text(TranslationBase.of(context).drivethruAppo, style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold, fontSize: 11.0))
|
|
|
|
|
|
|
|
: widget.appoList[index].isLiveCareAppointment
|
|
|
|
|
|
|
|
? Text(TranslationBase.of(context).videoAppo, style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold, fontSize: 11.0))
|
|
|
|
|
|
|
|
: Text(TranslationBase.of(context).walkinAppo, style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold, fontSize: 11.0))
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
);
|
|
|
|
|
|
|
|
// return Container(
|
|
|
|
|
|
|
|
// margin: EdgeInsets.all(10.0),
|
|
|
|
|
|
|
|
// child: Column(
|
|
|
|
|
|
|
|
// crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
|
|
|
// children: [
|
|
|
|
|
|
|
|
// Container(
|
|
|
|
|
|
|
|
// child: Card(
|
|
|
|
|
|
|
|
// margin: EdgeInsets.fromLTRB(8.0, 0.0, 8.0, 8.0),
|
|
|
|
|
|
|
|
// color: Colors.white,
|
|
|
|
|
|
|
|
// shape: RoundedRectangleBorder(
|
|
|
|
|
|
|
|
// borderRadius: BorderRadius.circular(10),
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// child: Container(
|
|
|
|
|
|
|
|
// width: MediaQuery.of(context).size.width,
|
|
|
|
|
|
|
|
// padding: EdgeInsets.all(10.0),
|
|
|
|
|
|
|
|
// child: Column(
|
|
|
|
|
|
|
|
// crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
|
|
|
// mainAxisSize: MainAxisSize.max,
|
|
|
|
|
|
|
|
// children: <Widget>[
|
|
|
|
|
|
|
|
// Row(
|
|
|
|
|
|
|
|
// children: <Widget>[
|
|
|
|
|
|
|
|
// Image.asset("assets/images/new-design/time_icon.png", width: 20.0, height: 20.0),
|
|
|
|
|
|
|
|
// Container(
|
|
|
|
|
|
|
|
// width: MediaQuery.of(context).size.width * 0.4,
|
|
|
|
|
|
|
|
// margin: EdgeInsets.only(left: 10.0, right: 10.0),
|
|
|
|
|
|
|
|
// child: Text(
|
|
|
|
|
|
|
|
// DateUtil.getWeekDayMonthDayYearDateFormatted(
|
|
|
|
|
|
|
|
// DateUtil.convertStringToDate(widget.appoList[index].appointmentDate), projectViewModel.isArabic ? "ar" : "en") +
|
|
|
|
|
|
|
|
// " " +
|
|
|
|
|
|
|
|
// widget.appoList[index].startTime.substring(0, 5),
|
|
|
|
|
|
|
|
// overflow: TextOverflow.clip,
|
|
|
|
|
|
|
|
// style: TextStyle(fontSize: 10.0)),
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// !widget.appoList[index].isLiveCareAppointment ? Image.asset("assets/images/new-design/hospital_address_icon.png", width: 20.0, height: 20.0) : Container(),
|
|
|
|
|
|
|
|
// Container(
|
|
|
|
|
|
|
|
// margin: EdgeInsets.only(left: 5.0, right: 5.0),
|
|
|
|
|
|
|
|
// child: widget.appoList[index].isLiveCareAppointment
|
|
|
|
|
|
|
|
// ? Container()
|
|
|
|
|
|
|
|
// : Text(widget.appoList[index].projectName != null ? widget.appoList[index].projectName : "-",
|
|
|
|
|
|
|
|
// overflow: TextOverflow.clip, maxLines: 2, style: TextStyle(fontSize: 10.0)),
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// ],
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// Container(
|
|
|
|
|
|
|
|
// margin: EdgeInsets.only(top: 5.0),
|
|
|
|
|
|
|
|
// child: Divider(
|
|
|
|
|
|
|
|
// color: Colors.grey[500],
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// Flex(
|
|
|
|
|
|
|
|
// direction: Axis.horizontal,
|
|
|
|
|
|
|
|
// children: <Widget>[
|
|
|
|
|
|
|
|
// Expanded(
|
|
|
|
|
|
|
|
// flex: 1,
|
|
|
|
|
|
|
|
// child: Container(
|
|
|
|
|
|
|
|
// height: MediaQuery.of(context).size.height * 0.1,
|
|
|
|
|
|
|
|
// margin: EdgeInsets.only(top: 5.0),
|
|
|
|
|
|
|
|
// child: ClipRRect(
|
|
|
|
|
|
|
|
// borderRadius: BorderRadius.circular(100.0),
|
|
|
|
|
|
|
|
// child: Image.network(widget.appoList[index].doctorImageURL, fit: BoxFit.fill),
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// Expanded(
|
|
|
|
|
|
|
|
// flex: 3,
|
|
|
|
|
|
|
|
// child: Container(
|
|
|
|
|
|
|
|
// margin: EdgeInsets.only(top: 10.0, left: 20.0, right: 20.0),
|
|
|
|
|
|
|
|
// child: Column(
|
|
|
|
|
|
|
|
// crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
|
|
|
// children: <Widget>[
|
|
|
|
|
|
|
|
// Text(widget.appoList[index].doctorTitle + " " + widget.appoList[index].doctorNameObj,
|
|
|
|
|
|
|
|
// style: TextStyle(fontSize: 14.0, color: Colors.black, fontWeight: FontWeight.bold, letterSpacing: -0.64)),
|
|
|
|
|
|
|
|
// if (getDoctorSpeciality(widget.appoList[index].doctorSpeciality) != "null\n")
|
|
|
|
|
|
|
|
// Container(
|
|
|
|
|
|
|
|
// margin: EdgeInsets.only(top: 3.0, bottom: 3.0),
|
|
|
|
|
|
|
|
// child: Text(getDoctorSpeciality(widget.appoList[index].doctorSpeciality).trim(),
|
|
|
|
|
|
|
|
// style: TextStyle(fontSize: 12.0, color: Colors.grey[600], letterSpacing: -0.64)),
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// Row(
|
|
|
|
|
|
|
|
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
|
|
|
// mainAxisSize: MainAxisSize.max,
|
|
|
|
|
|
|
|
// children: <Widget>[
|
|
|
|
|
|
|
|
// RatingBar.readOnly(
|
|
|
|
|
|
|
|
// initialRating: widget.appoList[index].actualDoctorRate.toDouble(),
|
|
|
|
|
|
|
|
// size: 20.0,
|
|
|
|
|
|
|
|
// filledColor: Colors.yellow[700],
|
|
|
|
|
|
|
|
// emptyColor: Colors.grey[500],
|
|
|
|
|
|
|
|
// isHalfAllowed: true,
|
|
|
|
|
|
|
|
// halfFilledIcon: Icons.star_half,
|
|
|
|
|
|
|
|
// filledIcon: Icons.star,
|
|
|
|
|
|
|
|
// emptyIcon: Icons.star,
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// ],
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// Container(
|
|
|
|
|
|
|
|
// child: CountdownTimer(
|
|
|
|
|
|
|
|
// controller:
|
|
|
|
|
|
|
|
// new CountdownTimerController(endTime: DateTime.now().millisecondsSinceEpoch + (widget.appoList[index].remaniningHoursTocanPay * 1000) * 60),
|
|
|
|
|
|
|
|
// widgetBuilder: (_, CurrentRemainingTime time) {
|
|
|
|
|
|
|
|
// return time != null
|
|
|
|
|
|
|
|
// ? Text(
|
|
|
|
|
|
|
|
// '${time.days != null ? time.days : "0"}:${time.hours != null ? time.hours.toString().length == 1 ? "0" + time.hours.toString() : time.hours : "00"}:${time.min}:${time.sec} ' +
|
|
|
|
|
|
|
|
// TranslationBase.of(context).upcomingTimeLeft,
|
|
|
|
|
|
|
|
// style: TextStyle(fontSize: 12.0, color: Color(0xffC5272D)))
|
|
|
|
|
|
|
|
// : Container();
|
|
|
|
|
|
|
|
// },
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// ],
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// Expanded(
|
|
|
|
|
|
|
|
// flex: 1,
|
|
|
|
|
|
|
|
// child: InkWell(
|
|
|
|
|
|
|
|
// onTap: () => performNextAction(widget.appoList[index]),
|
|
|
|
|
|
|
|
// child: Container(
|
|
|
|
|
|
|
|
// margin: EdgeInsets.only(top: 20.0),
|
|
|
|
|
|
|
|
// child: Column(
|
|
|
|
|
|
|
|
// children: <Widget>[
|
|
|
|
|
|
|
|
// Image.asset(getNextActionImage(widget.appoList[index].nextAction), width: 50.0, height: 50.0),
|
|
|
|
|
|
|
|
// Container(
|
|
|
|
|
|
|
|
// margin: EdgeInsets.only(top: 5.0),
|
|
|
|
|
|
|
|
// child: Text(getNextActionText(widget.appoList[index].nextAction), textAlign: TextAlign.center, style: TextStyle(fontSize: 12.0)),
|
|
|
|
|
|
|
|
// )
|
|
|
|
|
|
|
|
// ],
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// )
|
|
|
|
|
|
|
|
// ],
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// Divider(
|
|
|
|
|
|
|
|
// color: Colors.grey[500],
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// Flex(
|
|
|
|
|
|
|
|
// direction: Axis.horizontal,
|
|
|
|
|
|
|
|
// children: <Widget>[
|
|
|
|
|
|
|
|
// Expanded(
|
|
|
|
|
|
|
|
// flex: 2,
|
|
|
|
|
|
|
|
// child: Container(
|
|
|
|
|
|
|
|
// child: Text(getNextActionDescription(widget.appoList[index].nextAction), style: TextStyle(fontSize: 11.0, color: Colors.grey[700])),
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// Expanded(
|
|
|
|
|
|
|
|
// flex: 1,
|
|
|
|
|
|
|
|
// child: GestureDetector(
|
|
|
|
|
|
|
|
// onTap: () {
|
|
|
|
|
|
|
|
// navigateToAppointmentDetails(context, widget.appoList[index]);
|
|
|
|
|
|
|
|
// },
|
|
|
|
|
|
|
|
// child: Container(
|
|
|
|
|
|
|
|
// child: Text(TranslationBase.of(context).upcomingDetails,
|
|
|
|
|
|
|
|
// textAlign: TextAlign.end, style: TextStyle(fontSize: 11.0, color: new Color(0xffC5272D), decoration: TextDecoration.underline)),
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// )
|
|
|
|
|
|
|
|
// ],
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// ],
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// Container(
|
|
|
|
|
|
|
|
// decoration: BoxDecoration(
|
|
|
|
|
|
|
|
// borderRadius: BorderRadius.only(bottomLeft: Radius.circular(10.0), bottomRight: Radius.circular(10.0)),
|
|
|
|
|
|
|
|
// color: Color(0xff20bc44),
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// height: 30.0,
|
|
|
|
|
|
|
|
// padding: EdgeInsets.only(right: 10, left: 10),
|
|
|
|
|
|
|
|
// margin: EdgeInsets.symmetric(horizontal: 20),
|
|
|
|
|
|
|
|
// transform: Matrix4.translationValues(0.0, -8.0, 0.0),
|
|
|
|
|
|
|
|
// child: Row(
|
|
|
|
|
|
|
|
// mainAxisSize: MainAxisSize.min,
|
|
|
|
|
|
|
|
// mainAxisAlignment: MainAxisAlignment.start,
|
|
|
|
|
|
|
|
// children: [
|
|
|
|
|
|
|
|
// widget.appoList[index].clinicID == 265
|
|
|
|
|
|
|
|
// ? Container(
|
|
|
|
|
|
|
|
// margin: EdgeInsets.only(left: 5.0, right: 5.0),
|
|
|
|
|
|
|
|
// child: SvgPicture.asset(
|
|
|
|
|
|
|
|
// "assets/images/new/car_icon.svg",
|
|
|
|
|
|
|
|
// height: 15,
|
|
|
|
|
|
|
|
// width: 15,
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// )
|
|
|
|
|
|
|
|
// : widget.appoList[index].isLiveCareAppointment
|
|
|
|
|
|
|
|
// ? Image.asset("assets/images/new-design/video.png")
|
|
|
|
|
|
|
|
// : Image.asset("assets/images/new-design/walkin.png"),
|
|
|
|
|
|
|
|
// widget.appoList[index].clinicID == 265
|
|
|
|
|
|
|
|
// ? Text(TranslationBase.of(context).drivethruAppo, style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold, fontSize: 11.0))
|
|
|
|
|
|
|
|
// : widget.appoList[index].isLiveCareAppointment
|
|
|
|
|
|
|
|
// ? Text(TranslationBase.of(context).videoAppo, style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold, fontSize: 11.0))
|
|
|
|
|
|
|
|
// : Text(TranslationBase.of(context).walkinAppo, style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold, fontSize: 11.0))
|
|
|
|
|
|
|
|
// ],
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// ],
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// );
|
|
|
|
},
|
|
|
|
},
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
@ -375,6 +518,48 @@ class _ToDoState extends State<ToDo> {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Color getNextActionButtonColor(nextAction) {
|
|
|
|
|
|
|
|
switch (nextAction) {
|
|
|
|
|
|
|
|
case 0:
|
|
|
|
|
|
|
|
return CustomColors.accentColor;
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 10:
|
|
|
|
|
|
|
|
return CustomColors.green;
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
case 15:
|
|
|
|
|
|
|
|
return CustomColors.grey2;
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
case 20:
|
|
|
|
|
|
|
|
return CustomColors.green;
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
case 30:
|
|
|
|
|
|
|
|
return CustomColors.accentColor;
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
case 40:
|
|
|
|
|
|
|
|
return CustomColors.green;
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
case 50:
|
|
|
|
|
|
|
|
return CustomColors.green;
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
case 60:
|
|
|
|
|
|
|
|
return CustomColors.orange;
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
case 90:
|
|
|
|
|
|
|
|
return CustomColors.accentColor;
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
default:
|
|
|
|
|
|
|
|
return CustomColors.green;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
String getNextActionText(nextAction) {
|
|
|
|
String getNextActionText(nextAction) {
|
|
|
|
switch (nextAction) {
|
|
|
|
switch (nextAction) {
|
|
|
|
case 0:
|
|
|
|
case 0:
|
|
|
@ -732,35 +917,34 @@ class _ToDoState extends State<ToDo> {
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
getPatientData() async {
|
|
|
|
// getPatientData() async {
|
|
|
|
AppSharedPreferences sharedPref = AppSharedPreferences();
|
|
|
|
// AppSharedPreferences sharedPref = AppSharedPreferences();
|
|
|
|
if (await sharedPref.getObject(USER_PROFILE) != null) {
|
|
|
|
// if (await sharedPref.getObject(USER_PROFILE) != null) {
|
|
|
|
var data = AuthenticatedUser.fromJson(await sharedPref.getObject(USER_PROFILE));
|
|
|
|
// var data = AuthenticatedUser.fromJson(await sharedPref.getObject(USER_PROFILE));
|
|
|
|
setState(() {
|
|
|
|
// setState(() {
|
|
|
|
print(data);
|
|
|
|
// print(data);
|
|
|
|
authUser = data;
|
|
|
|
// authUser = data;
|
|
|
|
});
|
|
|
|
// });
|
|
|
|
getPatientAppointmentHistory();
|
|
|
|
// getPatientAppointmentHistory();
|
|
|
|
}
|
|
|
|
// }
|
|
|
|
}
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
Future navigateToPaymentMethod(context, PatientShareResponse patientShareResponse, AppoitmentAllHistoryResultList appo) async {
|
|
|
|
Future navigateToPaymentMethod(context, PatientShareResponse patientShareResponse, AppoitmentAllHistoryResultList appo) async {
|
|
|
|
if (await this.sharedPref.getObject(USER_PROFILE) != null) {
|
|
|
|
// if (await this.sharedPref.getObject(USER_PROFILE) != null) {
|
|
|
|
var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE));
|
|
|
|
// var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE));
|
|
|
|
setState(() {
|
|
|
|
// setState(() {
|
|
|
|
authUser = data;
|
|
|
|
// authUser = data;
|
|
|
|
});
|
|
|
|
// });
|
|
|
|
}
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
Navigator.push(context, FadePage(page: PaymentMethod(
|
|
|
|
Navigator.push(context, FadePage(page: PaymentMethod(onSelectedMethod: (String metohd) {
|
|
|
|
onSelectedMethod: (String metohd) {
|
|
|
|
|
|
|
|
setState(() {});
|
|
|
|
setState(() {});
|
|
|
|
}))).then((value) {
|
|
|
|
}))).then((value) {
|
|
|
|
print(value);
|
|
|
|
print(value);
|
|
|
|
getPatientAppointmentHistory();
|
|
|
|
getPatientAppointmentHistory();
|
|
|
|
|
|
|
|
|
|
|
|
if (value != null) {
|
|
|
|
if (value != null) {
|
|
|
|
openPayment(value, authUser, double.parse(patientShareResponse.patientShareWithTax.toString()), patientShareResponse, appo);
|
|
|
|
openPayment(value, projectViewModel.user, double.parse(patientShareResponse.patientShareWithTax.toString()), patientShareResponse, appo);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|