Merge branch 'dashboard' into 'master'
Dashboard See merge request Cloud_Solution/diplomatic-quarter!40find_us
commit
137e16887c
@ -1,6 +1,6 @@
|
||||
#Fri Jun 23 08:50:38 CEST 2017
|
||||
#Thu Sep 03 16:26:30 EEST 2020
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip
|
||||
|
Binary file not shown.
After Width: | Height: | Size: 37 KiB |
@ -0,0 +1,88 @@
|
||||
class LabResult {
|
||||
String description;
|
||||
Null femaleInterpretativeData;
|
||||
int gender;
|
||||
int lineItemNo;
|
||||
Null maleInterpretativeData;
|
||||
String notes;
|
||||
String packageID;
|
||||
int patientID;
|
||||
String projectID;
|
||||
String referanceRange;
|
||||
String resultValue;
|
||||
String sampleCollectedOn;
|
||||
String sampleReceivedOn;
|
||||
String setupID;
|
||||
Null superVerifiedOn;
|
||||
String testCode;
|
||||
String uOM;
|
||||
String verifiedOn;
|
||||
Null verifiedOnDateTime;
|
||||
|
||||
LabResult(
|
||||
{this.description,
|
||||
this.femaleInterpretativeData,
|
||||
this.gender,
|
||||
this.lineItemNo,
|
||||
this.maleInterpretativeData,
|
||||
this.notes,
|
||||
this.packageID,
|
||||
this.patientID,
|
||||
this.projectID,
|
||||
this.referanceRange,
|
||||
this.resultValue,
|
||||
this.sampleCollectedOn,
|
||||
this.sampleReceivedOn,
|
||||
this.setupID,
|
||||
this.superVerifiedOn,
|
||||
this.testCode,
|
||||
this.uOM,
|
||||
this.verifiedOn,
|
||||
this.verifiedOnDateTime});
|
||||
|
||||
LabResult.fromJson(Map<String, dynamic> json) {
|
||||
description = json['Description'];
|
||||
femaleInterpretativeData = json['FemaleInterpretativeData'];
|
||||
gender = json['Gender'];
|
||||
lineItemNo = json['LineItemNo'];
|
||||
maleInterpretativeData = json['MaleInterpretativeData'];
|
||||
notes = json['Notes'];
|
||||
packageID = json['PackageID'];
|
||||
patientID = json['PatientID'];
|
||||
projectID = json['ProjectID'];
|
||||
referanceRange = json['ReferanceRange'];
|
||||
resultValue = json['ResultValue'];
|
||||
sampleCollectedOn = json['SampleCollectedOn'];
|
||||
sampleReceivedOn = json['SampleReceivedOn'];
|
||||
setupID = json['SetupID'];
|
||||
superVerifiedOn = json['SuperVerifiedOn'];
|
||||
testCode = json['TestCode'];
|
||||
uOM = json['UOM'];
|
||||
verifiedOn = json['VerifiedOn'];
|
||||
verifiedOnDateTime = json['VerifiedOnDateTime'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['Description'] = this.description;
|
||||
data['FemaleInterpretativeData'] = this.femaleInterpretativeData;
|
||||
data['Gender'] = this.gender;
|
||||
data['LineItemNo'] = this.lineItemNo;
|
||||
data['MaleInterpretativeData'] = this.maleInterpretativeData;
|
||||
data['Notes'] = this.notes;
|
||||
data['PackageID'] = this.packageID;
|
||||
data['PatientID'] = this.patientID;
|
||||
data['ProjectID'] = this.projectID;
|
||||
data['ReferanceRange'] = this.referanceRange;
|
||||
data['ResultValue'] = this.resultValue;
|
||||
data['SampleCollectedOn'] = this.sampleCollectedOn;
|
||||
data['SampleReceivedOn'] = this.sampleReceivedOn;
|
||||
data['SetupID'] = this.setupID;
|
||||
data['SuperVerifiedOn'] = this.superVerifiedOn;
|
||||
data['TestCode'] = this.testCode;
|
||||
data['UOM'] = this.uOM;
|
||||
data['VerifiedOn'] = this.verifiedOn;
|
||||
data['VerifiedOnDateTime'] = this.verifiedOnDateTime;
|
||||
return data;
|
||||
}
|
||||
}
|
@ -0,0 +1,91 @@
|
||||
class VaccineModel {
|
||||
String to;
|
||||
String from;
|
||||
double versionID;
|
||||
int channel;
|
||||
int languageID;
|
||||
String iPAdress;
|
||||
String generalid;
|
||||
int patientOutSA;
|
||||
String sessionID;
|
||||
bool isDentalAllowedBackend;
|
||||
int deviceTypeID;
|
||||
int patientID;
|
||||
String tokenID;
|
||||
int patientTypeID;
|
||||
int patientType;
|
||||
String invoiceDate;
|
||||
String doctorImageURL;
|
||||
String doctorName;
|
||||
String doctorTitle;
|
||||
String projectName;
|
||||
String vaccineName;
|
||||
|
||||
VaccineModel({
|
||||
this.to,
|
||||
this.from,
|
||||
this.versionID,
|
||||
this.channel,
|
||||
this.languageID,
|
||||
this.iPAdress,
|
||||
this.generalid,
|
||||
this.patientOutSA,
|
||||
this.sessionID,
|
||||
this.isDentalAllowedBackend,
|
||||
this.deviceTypeID,
|
||||
this.patientID,
|
||||
this.tokenID,
|
||||
this.patientTypeID,
|
||||
this.patientType,
|
||||
this.invoiceDate,
|
||||
this.doctorImageURL,
|
||||
this.doctorName,
|
||||
this.doctorTitle,
|
||||
this.projectName,
|
||||
this.vaccineName,
|
||||
});
|
||||
|
||||
VaccineModel.fromJson(Map<String, dynamic> json) {
|
||||
vaccineName = json['VaccineName'];
|
||||
projectName = json['ProjectName'];
|
||||
doctorTitle = json['DoctorTitle'];
|
||||
doctorName = json['DoctorName'];
|
||||
doctorImageURL = json['DoctorImageURL'];
|
||||
invoiceDate = json['InvoiceDate'];
|
||||
to = json['To'];
|
||||
from = json['From'];
|
||||
versionID = json['VersionID'];
|
||||
channel = json['Channel'];
|
||||
languageID = json['LanguageID'];
|
||||
iPAdress = json['IPAdress'];
|
||||
generalid = json['generalid'];
|
||||
patientOutSA = json['PatientOutSA'];
|
||||
sessionID = json['SessionID'];
|
||||
isDentalAllowedBackend = json['isDentalAllowedBackend'];
|
||||
deviceTypeID = json['DeviceTypeID'];
|
||||
patientID = json['PatientID'];
|
||||
tokenID = json['TokenID'];
|
||||
patientTypeID = json['PatientTypeID'];
|
||||
patientType = json['PatientType'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['To'] = this.to;
|
||||
data['From'] = this.from;
|
||||
data['VersionID'] = this.versionID;
|
||||
data['Channel'] = this.channel;
|
||||
data['LanguageID'] = this.languageID;
|
||||
data['IPAdress'] = this.iPAdress;
|
||||
data['generalid'] = this.generalid;
|
||||
data['PatientOutSA'] = this.patientOutSA;
|
||||
data['SessionID'] = this.sessionID;
|
||||
data['isDentalAllowedBackend'] = this.isDentalAllowedBackend;
|
||||
data['DeviceTypeID'] = this.deviceTypeID;
|
||||
data['PatientID'] = this.patientID;
|
||||
data['TokenID'] = this.tokenID;
|
||||
data['PatientTypeID'] = this.patientTypeID;
|
||||
data['PatientType'] = this.patientType;
|
||||
return data;
|
||||
}
|
||||
}
|
@ -0,0 +1,83 @@
|
||||
import 'package:diplomaticquarterapp/config/config.dart';
|
||||
import 'package:diplomaticquarterapp/core/model/reports/Reports.dart';
|
||||
import 'package:diplomaticquarterapp/core/model/reports/request_reports.dart';
|
||||
import 'package:diplomaticquarterapp/core/service/base_service.dart';
|
||||
import 'package:diplomaticquarterapp/pages/feedback/appointment_history.dart';
|
||||
|
||||
class ReportsMonthlyService extends BaseService {
|
||||
List<Reports> reportsList = List();
|
||||
List<AppointmentHistory> appointHistoryList = List();
|
||||
|
||||
RequestReports _requestReports = RequestReports(
|
||||
isReport: true,
|
||||
encounterType: 1,
|
||||
requestType: 1,
|
||||
versionID: 5.5,
|
||||
channel: 3,
|
||||
languageID: 2,
|
||||
iPAdress: "10.20.10.20",
|
||||
generalid: 'Cs2020@2016\$2958',
|
||||
patientOutSA: 0,
|
||||
sessionID: 'KIbLoqkytuKJEWECHQ',
|
||||
isDentalAllowedBackend: false,
|
||||
deviceTypeID: 2,
|
||||
patientID: 1231755,
|
||||
tokenID: '@dm!n',
|
||||
patientTypeID: 1,
|
||||
patientType: 1);
|
||||
|
||||
Future getReports() async {
|
||||
hasError = false;
|
||||
await baseAppClient.post(REPORTS,
|
||||
onSuccess: (dynamic response, int statusCode) {
|
||||
reportsList.clear();
|
||||
response['GetPatientMedicalStatus'].forEach((reports) {
|
||||
reportsList.add(Reports.fromJson(reports));
|
||||
});
|
||||
}, onFailure: (String error, int statusCode) {
|
||||
hasError = true;
|
||||
super.error = error;
|
||||
}, body: _requestReports.toJson());
|
||||
}
|
||||
|
||||
Future getPatentAppointmentHistory() async {
|
||||
hasError = false;
|
||||
Map<String, dynamic> body = new Map<String, dynamic>();
|
||||
body['IsForMedicalReport'] = true;
|
||||
await baseAppClient.post(GET_PATIENT_AppointmentHistory,
|
||||
onSuccess: (dynamic response, int statusCode) {
|
||||
appointHistoryList = [];
|
||||
response['AppoimentAllHistoryResultList'].forEach((appoint) {
|
||||
appointHistoryList.add(AppointmentHistory.fromJson(appoint));
|
||||
});
|
||||
}, onFailure: (String error, int statusCode) {
|
||||
hasError = true;
|
||||
super.error = error;
|
||||
}, body: body);
|
||||
}
|
||||
|
||||
Future insertRequestForMedicalReport(
|
||||
AppointmentHistory appointmentHistory) async {
|
||||
Map<String, dynamic> body = new Map<String, dynamic>();
|
||||
body['ClinicID'] = appointmentHistory.clinicID;
|
||||
body['DoctorID'] = appointmentHistory.doctorID;
|
||||
body['SetupID'] = appointmentHistory.setupID;
|
||||
body['EncounterNo'] = appointmentHistory.appointmentNo;
|
||||
body['EncounterType'] = 1;// appointmentHistory.appointmentType;
|
||||
body['IsActive'] = appointmentHistory.isActiveDoctor;
|
||||
body['ProjectID'] = appointmentHistory.projectID;
|
||||
body['Remarks'] = "";
|
||||
body['ProcedureId'] = "";
|
||||
body['RequestType'] = 1;
|
||||
body['Source'] = 2;
|
||||
body['Status'] = 1;
|
||||
body['CreatedBy'] = 102;
|
||||
hasError = false;
|
||||
await baseAppClient.post(INSERT_REQUEST_FOR_MEDICAL_REPORT,
|
||||
onSuccess: (dynamic response, int statusCode) {},
|
||||
onFailure: (String error, int statusCode) {
|
||||
hasError = true;
|
||||
super.error = error;
|
||||
}, body: body);
|
||||
}
|
||||
}
|
@ -0,0 +1,43 @@
|
||||
import 'package:diplomaticquarterapp/config/config.dart';
|
||||
import 'package:diplomaticquarterapp/core/service/base_service.dart';
|
||||
import 'package:diplomaticquarterapp/core/model/vaccine/my_vaccine.dart';
|
||||
|
||||
class VaccineService extends BaseService {
|
||||
List<VaccineModel> _vaccineList = List();
|
||||
|
||||
List<VaccineModel> get vaccineList => _vaccineList;
|
||||
|
||||
VaccineModel _vaccineModel = VaccineModel(
|
||||
to: "0",
|
||||
from: "0",
|
||||
channel: 3,
|
||||
deviceTypeID: 2,
|
||||
generalid: "Cs2020@2016\$2958",
|
||||
iPAdress: "10.20.10.20",
|
||||
isDentalAllowedBackend: false,
|
||||
languageID: 2,
|
||||
patientID: 1231755,
|
||||
patientOutSA: 0,
|
||||
patientType: 1,
|
||||
patientTypeID: 1,
|
||||
sessionID: "uoKFXSLUwEaHYPwKZNA",
|
||||
tokenID: "@dm!n",
|
||||
versionID: 5.5,
|
||||
);
|
||||
|
||||
Future getMyVaccine() async {
|
||||
hasError = false;
|
||||
_vaccineList.clear();
|
||||
await baseAppClient.post(GET_VACCINES,
|
||||
onSuccess: (dynamic response, int statusCode) {
|
||||
response['List_DoneVaccines'].forEach((item) {
|
||||
_vaccineList.add(VaccineModel.fromJson(item));
|
||||
});
|
||||
}, onFailure: (String error, int statusCode) {
|
||||
hasError = true;
|
||||
super.error = error;
|
||||
}, body: _vaccineModel.toJson());
|
||||
}
|
||||
|
||||
Future sendEmail() async {}
|
||||
}
|
@ -0,0 +1,84 @@
|
||||
import 'package:diplomaticquarterapp/pages/feedback/appointment_history.dart';
|
||||
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
|
||||
|
||||
import '../../../core/enum/reportfilter_type.dart';
|
||||
import '../../../core/enum/viewstate.dart';
|
||||
import '../../../core/model/reports/Reports.dart';
|
||||
import '../../../core/service/medical/reports_service.dart';
|
||||
import '../../../locator.dart';
|
||||
import '../base_view_model.dart';
|
||||
|
||||
class ReportsMonthlyViewModel extends BaseViewModel {
|
||||
ReportFilterType filterType = ReportFilterType.Requested;
|
||||
|
||||
ReportsService _reportsService = locator<ReportsService>();
|
||||
|
||||
List<Reports> reportsOrderRequestList = List();
|
||||
List<Reports> reportsOrderReadyList = List();
|
||||
List<Reports> reportsOrderCompletedList = List();
|
||||
List<Reports> reportsOrderCanceledList = List();
|
||||
|
||||
List<AppointmentHistory> get appointHistoryList =>
|
||||
_reportsService.appointHistoryList;
|
||||
|
||||
getReports() async {
|
||||
setState(ViewState.Busy);
|
||||
reportsOrderRequestList.clear();
|
||||
reportsOrderReadyList.clear();
|
||||
reportsOrderCompletedList.clear();
|
||||
reportsOrderCanceledList.clear();
|
||||
await _reportsService.getReports();
|
||||
if (_reportsService.hasError) {
|
||||
error = _reportsService.error;
|
||||
setState(ViewState.Error);
|
||||
} else {
|
||||
_filterList();
|
||||
setState(ViewState.Idle);
|
||||
}
|
||||
}
|
||||
|
||||
getPatentAppointmentHistory() async {
|
||||
setState(ViewState.Busy);
|
||||
await _reportsService.getPatentAppointmentHistory();
|
||||
if (_reportsService.hasError) {
|
||||
error = _reportsService.error;
|
||||
setState(ViewState.Error);
|
||||
} else {
|
||||
setState(ViewState.Idle);
|
||||
}
|
||||
}
|
||||
|
||||
void _filterList() {
|
||||
_reportsService.reportsList.forEach((report) {
|
||||
switch (report.status) {
|
||||
case 1:
|
||||
reportsOrderRequestList.add(report);
|
||||
break;
|
||||
case 2:
|
||||
reportsOrderReadyList.add(report);
|
||||
break;
|
||||
case 3:
|
||||
reportsOrderCompletedList.add(report);
|
||||
break;
|
||||
case 4:
|
||||
reportsOrderCanceledList.add(report);
|
||||
break;
|
||||
default:
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
insertRequestForMedicalReport(AppointmentHistory appointmentHistory)async{
|
||||
setState(ViewState.Busy);
|
||||
await _reportsService.insertRequestForMedicalReport(appointmentHistory);
|
||||
if (_reportsService.hasError) {
|
||||
error = _reportsService.error;
|
||||
AppToast.showErrorToast(message: error);
|
||||
setState(ViewState.ErrorLocal);
|
||||
} else {
|
||||
AppToast.showSuccessToast(message: 'The order was send ');
|
||||
setState(ViewState.Idle);
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,25 @@
|
||||
import 'base_view_model.dart';
|
||||
import '../../locator.dart';
|
||||
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
|
||||
import 'package:diplomaticquarterapp/core/model/vaccine/my_vaccine.dart';
|
||||
import 'package:diplomaticquarterapp/core/service/vaccine_service.dart';
|
||||
|
||||
class VaccineViewModel extends BaseViewModel {
|
||||
bool hasError = false;
|
||||
|
||||
VaccineService _vaccineService = locator<VaccineService>();
|
||||
|
||||
List<VaccineModel> get vaccineList => _vaccineService.vaccineList;
|
||||
|
||||
Future getVaccine() async {
|
||||
hasError = false;
|
||||
//_insuranceCardService.clearInsuranceCard();
|
||||
setState(ViewState.Busy);
|
||||
await _vaccineService.getMyVaccine();
|
||||
if (_vaccineService.hasError) {
|
||||
error = _vaccineService.error;
|
||||
setState(ViewState.ErrorLocal);
|
||||
} else
|
||||
setState(ViewState.Idle);
|
||||
}
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
import 'package:diplomaticquarterapp/core/viewModels/medical/reports_monthly_view_model.dart';
|
||||
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
|
||||
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
|
||||
class MonthlyReportsPage extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return BaseView<ReportsMonthlyViewModel>(
|
||||
builder: (_, model, w) => AppScaffold(
|
||||
isShowAppBar: true,
|
||||
appBarTitle: TranslationBase.of(context).monthlyReports,
|
||||
body: Container(),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
@ -0,0 +1,361 @@
|
||||
import 'dart:typed_data';
|
||||
import 'dart:convert';
|
||||
import 'package:diplomaticquarterapp/widgets/buttons/button.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:diplomaticquarterapp/config/size_config.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import '../base/base_view.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
|
||||
import 'package:diplomaticquarterapp/core/viewModels/vaccine_view_model.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/others/rounded_container.dart';
|
||||
import 'package:flutter_email_sender/flutter_email_sender.dart';
|
||||
import 'package:popup_box/popup_box.dart';
|
||||
|
||||
class MyVaccines extends StatefulWidget {
|
||||
@override
|
||||
_MyVaccinesState createState() => _MyVaccinesState();
|
||||
}
|
||||
|
||||
class _MyVaccinesState extends State<MyVaccines> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return BaseView<VaccineViewModel>(
|
||||
onModelReady: (model) => model.getVaccine(),
|
||||
builder: (BuildContext context, VaccineViewModel model, Widget child) =>
|
||||
AppScaffold(
|
||||
isShowAppBar: true,
|
||||
appBarTitle: 'My Vaccines',
|
||||
baseViewModel: model,
|
||||
body: Container(
|
||||
margin: EdgeInsets.only(
|
||||
left: SizeConfig.screenWidth * 0.004,
|
||||
right: SizeConfig.screenWidth * 0.004,
|
||||
top: SizeConfig.screenWidth * 0.04,
|
||||
),
|
||||
child: Column(
|
||||
children: <Widget>[
|
||||
RoundedContainer(
|
||||
backgroundColor: Colors.white,
|
||||
child: ExpansionTile(
|
||||
title: Container(
|
||||
height: 65.0,
|
||||
child: Text('2018'),
|
||||
),
|
||||
children: <Widget>[
|
||||
Container(
|
||||
child: ListView.builder(
|
||||
scrollDirection: Axis.vertical,
|
||||
shrinkWrap: true,
|
||||
itemCount: model.vaccineList == null
|
||||
? 0
|
||||
: model.vaccineList.length,
|
||||
itemBuilder: (BuildContext context, int index) {
|
||||
return Column(
|
||||
children: <Widget>[
|
||||
RoundedContainer(
|
||||
child: Column(
|
||||
children: <Widget>[
|
||||
Row(
|
||||
children: <Widget>[
|
||||
Column(
|
||||
children: <Widget>[
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(
|
||||
horizontal: 20.0,
|
||||
vertical: 20.0),
|
||||
child: Image.network(
|
||||
model.vaccineList[index]
|
||||
.doctorImageURL,
|
||||
height: SizeConfig
|
||||
.imageSizeMultiplier *
|
||||
23,
|
||||
width: SizeConfig
|
||||
.imageSizeMultiplier *
|
||||
20,
|
||||
fit: BoxFit.fill,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
Container(
|
||||
child: Column(
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
Text(
|
||||
model.vaccineList[index]
|
||||
.doctorTitle +
|
||||
model.vaccineList[index]
|
||||
.doctorName,
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.w900,
|
||||
fontSize: 16.6,
|
||||
),
|
||||
),
|
||||
SpaceBetweenTexts(space: 7.0),
|
||||
Text(
|
||||
model.vaccineList[index]
|
||||
.projectName,
|
||||
style: TextStyle(
|
||||
fontSize: 17.0,
|
||||
letterSpacing: 0.5,
|
||||
),
|
||||
),
|
||||
SpaceBetweenTexts(space: 7.0),
|
||||
Text(
|
||||
model.vaccineList[index]
|
||||
.vaccineName,
|
||||
style: TextStyle(
|
||||
fontSize: 17.0,
|
||||
),
|
||||
),
|
||||
SpaceBetweenTexts(space: 7.0),
|
||||
Text(
|
||||
'Date Taken ' +
|
||||
convertDateFormat(model
|
||||
.vaccineList[index]
|
||||
.invoiceDate),
|
||||
style:
|
||||
TextStyle(fontSize: 17.0),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
SpaceBetweenTexts(space: 165.0),
|
||||
Flexible(
|
||||
child: Container(
|
||||
width: 350.0,
|
||||
height: 80.0,
|
||||
child: Button(
|
||||
label: 'CHECK VACCINE AVAILABILITY',
|
||||
backgroundColor: Color(0xff9EA3A4),
|
||||
),
|
||||
),
|
||||
),
|
||||
Flexible(
|
||||
child: Container(
|
||||
width: 350.0,
|
||||
height: 80.0,
|
||||
child: Button(
|
||||
label: 'SEND EMAIL',
|
||||
backgroundColor: Color(0xffF62426),
|
||||
onTap: () async {
|
||||
await PopupBox.showPopupBox(
|
||||
context: context,
|
||||
button: MaterialButton(
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(20),
|
||||
),
|
||||
color: Colors.white,
|
||||
child: Text(
|
||||
'CANCEL',
|
||||
style: TextStyle(fontSize: 16.5),
|
||||
),
|
||||
onPressed: () {
|
||||
Navigator.of(context).pop();
|
||||
},
|
||||
),
|
||||
willDisplayWidget: Column(
|
||||
children: <Widget>[
|
||||
Text(
|
||||
'Conform \nSend a copy of this report to the email' +
|
||||
model.vaccineList[0].doctorName,
|
||||
style: TextStyle(
|
||||
fontSize: 20,
|
||||
color: Colors.black26,
|
||||
fontWeight: FontWeight.w900),
|
||||
),
|
||||
SizedBox(
|
||||
height: 30.0,
|
||||
),
|
||||
],
|
||||
));
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
// child: ListView.builder(
|
||||
// itemCount: model.vaccineList == null ? 0 : model.vaccineList.length,
|
||||
// itemBuilder: (BuildContext context, int index) {
|
||||
// return Column(
|
||||
// children: <Widget>[
|
||||
// RoundedContainer(
|
||||
// backgroundColor: Colors.white,
|
||||
// child: Column(
|
||||
// children: <Widget>[
|
||||
// ExpansionTile(
|
||||
// title: Container(
|
||||
// height: 60.0,
|
||||
// child: Column(
|
||||
// crossAxisAlignment: CrossAxisAlignment.start,
|
||||
// children: <Widget>[
|
||||
// Texts('2018'),
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
// children: <Widget>[
|
||||
// Column(
|
||||
// children: <Widget>[
|
||||
// Row(
|
||||
// children: <Widget>[
|
||||
// Column(
|
||||
// children: <Widget>[
|
||||
// Padding(
|
||||
// padding: EdgeInsets.symmetric(
|
||||
// horizontal: 20.0, vertical: 20.0),
|
||||
// child: Container(
|
||||
// child: Image.network(
|
||||
// model.vaccineList[index]
|
||||
// .doctorImageURL,
|
||||
// height: SizeConfig
|
||||
// .imageSizeMultiplier *
|
||||
// 23,
|
||||
// width: SizeConfig
|
||||
// .imageSizeMultiplier *
|
||||
// 20,
|
||||
// fit: BoxFit.fill,
|
||||
// colorBlendMode:
|
||||
// BlendMode.hardLight,
|
||||
// ),
|
||||
// ),
|
||||
// )
|
||||
// ],
|
||||
// ),
|
||||
// Container(
|
||||
// child: Column(
|
||||
// mainAxisAlignment:
|
||||
// MainAxisAlignment.start,
|
||||
// crossAxisAlignment:
|
||||
// CrossAxisAlignment.start,
|
||||
// children: <Widget>[
|
||||
// Text(
|
||||
// model.vaccineList[index]
|
||||
// .doctorTitle +
|
||||
// model.vaccineList[index]
|
||||
// .doctorName,
|
||||
// style: TextStyle(
|
||||
// fontWeight: FontWeight.w900,
|
||||
// fontSize: 17.5),
|
||||
// ),
|
||||
// Text(
|
||||
// model
|
||||
// .vaccineList[index].projectName,
|
||||
// style: TextStyle(
|
||||
// fontSize: 19.0,
|
||||
// letterSpacing: 0.3,
|
||||
// color: Colors.grey,
|
||||
// fontWeight: FontWeight.bold),
|
||||
// ),
|
||||
// Text(
|
||||
// model
|
||||
// .vaccineList[index].vaccineName,
|
||||
// style: TextStyle(
|
||||
// fontSize: 19.0,
|
||||
// color: Colors.grey,
|
||||
// fontWeight: FontWeight.bold),
|
||||
// ),
|
||||
// Text(
|
||||
// 'Date Taken ' +
|
||||
// convertDateFormat(model
|
||||
// .vaccineList[index]
|
||||
// .invoiceDate),
|
||||
// style: TextStyle(
|
||||
// fontSize: 19.0,
|
||||
// color: Colors.grey,
|
||||
// fontWeight: FontWeight.bold),
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
// Container(
|
||||
// width: 300,
|
||||
// child: Button(
|
||||
// label: 'CHECK VACCINE AVAILABILITY',
|
||||
// backgroundColor: Color(0xff9EA3A4),
|
||||
// ),
|
||||
// ),
|
||||
// Container(
|
||||
// width: 300,
|
||||
// child: Button(
|
||||
// label: 'SEND EMAIL',
|
||||
// backgroundColor: Color(0xff9EA3A4),
|
||||
// ),
|
||||
// ),
|
||||
// ],
|
||||
// );
|
||||
// },
|
||||
// ),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
convertDateFormat(String Date) {
|
||||
const start = "/Date(";
|
||||
const end = "+0300)";
|
||||
|
||||
final startIndex = Date.indexOf(start);
|
||||
final endIndex = Date.indexOf(end, startIndex + start.length);
|
||||
|
||||
var date = new DateTime.fromMillisecondsSinceEpoch(
|
||||
int.parse(Date.substring(startIndex + start.length, endIndex)));
|
||||
String newDate = date.year.toString() +
|
||||
"-" +
|
||||
date.month.toString().padLeft(2, '0') +
|
||||
"-" +
|
||||
date.day.toString().padLeft(2, '0');
|
||||
|
||||
return newDate.toString();
|
||||
}
|
||||
|
||||
emailSender() async {
|
||||
final Email email = Email(
|
||||
body: 'Email body',
|
||||
subject: 'Email subject',
|
||||
recipients: ['example@example.com'],
|
||||
cc: ['cc@example.com'],
|
||||
bcc: ['bcc@example.com'],
|
||||
attachmentPaths: ['/path/to/attachment.zip'],
|
||||
isHTML: false,
|
||||
);
|
||||
|
||||
await FlutterEmailSender.send(email);
|
||||
}
|
||||
}
|
||||
|
||||
class SpaceBetweenTexts extends StatelessWidget {
|
||||
final double space;
|
||||
SpaceBetweenTexts({this.space});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return SizedBox(
|
||||
height: space,
|
||||
);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue