Ereferral fixes, smartwatch health data integration
parent
97b8aeeff5
commit
0181043da8
@ -0,0 +1,76 @@
|
|||||||
|
class GetAllProjectsResponseModel {
|
||||||
|
String desciption;
|
||||||
|
Null desciptionN;
|
||||||
|
int iD;
|
||||||
|
String legalName;
|
||||||
|
String legalNameN;
|
||||||
|
String name;
|
||||||
|
Null nameN;
|
||||||
|
String phoneNumber;
|
||||||
|
String setupID;
|
||||||
|
int distanceInKilometers;
|
||||||
|
bool isActive;
|
||||||
|
String latitude;
|
||||||
|
String longitude;
|
||||||
|
int mainProjectID;
|
||||||
|
Null projectOutSA;
|
||||||
|
bool usingInDoctorApp;
|
||||||
|
|
||||||
|
GetAllProjectsResponseModel(
|
||||||
|
{this.desciption,
|
||||||
|
this.desciptionN,
|
||||||
|
this.iD,
|
||||||
|
this.legalName,
|
||||||
|
this.legalNameN,
|
||||||
|
this.name,
|
||||||
|
this.nameN,
|
||||||
|
this.phoneNumber,
|
||||||
|
this.setupID,
|
||||||
|
this.distanceInKilometers,
|
||||||
|
this.isActive,
|
||||||
|
this.latitude,
|
||||||
|
this.longitude,
|
||||||
|
this.mainProjectID,
|
||||||
|
this.projectOutSA,
|
||||||
|
this.usingInDoctorApp});
|
||||||
|
|
||||||
|
GetAllProjectsResponseModel.fromJson(Map<String, dynamic> json) {
|
||||||
|
desciption = json['Desciption'];
|
||||||
|
desciptionN = json['DesciptionN'];
|
||||||
|
iD = json['ID'];
|
||||||
|
legalName = json['LegalName'];
|
||||||
|
legalNameN = json['LegalNameN'];
|
||||||
|
name = json['Name'];
|
||||||
|
nameN = json['NameN'];
|
||||||
|
phoneNumber = json['PhoneNumber'];
|
||||||
|
setupID = json['SetupID'];
|
||||||
|
distanceInKilometers = json['DistanceInKilometers'];
|
||||||
|
isActive = json['IsActive'];
|
||||||
|
latitude = json['Latitude'];
|
||||||
|
longitude = json['Longitude'];
|
||||||
|
mainProjectID = json['MainProjectID'];
|
||||||
|
projectOutSA = json['ProjectOutSA'];
|
||||||
|
usingInDoctorApp = json['UsingInDoctorApp'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['Desciption'] = this.desciption;
|
||||||
|
data['DesciptionN'] = this.desciptionN;
|
||||||
|
data['ID'] = this.iD;
|
||||||
|
data['LegalName'] = this.legalName;
|
||||||
|
data['LegalNameN'] = this.legalNameN;
|
||||||
|
data['Name'] = this.name;
|
||||||
|
data['NameN'] = this.nameN;
|
||||||
|
data['PhoneNumber'] = this.phoneNumber;
|
||||||
|
data['SetupID'] = this.setupID;
|
||||||
|
data['DistanceInKilometers'] = this.distanceInKilometers;
|
||||||
|
data['IsActive'] = this.isActive;
|
||||||
|
data['Latitude'] = this.latitude;
|
||||||
|
data['Longitude'] = this.longitude;
|
||||||
|
data['MainProjectID'] = this.mainProjectID;
|
||||||
|
data['ProjectOutSA'] = this.projectOutSA;
|
||||||
|
data['UsingInDoctorApp'] = this.usingInDoctorApp;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,129 @@
|
|||||||
|
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/EReferral/get_all_projects_response_model.dart';
|
||||||
|
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
||||||
|
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
class SelectHospitalDialog extends StatefulWidget {
|
||||||
|
|
||||||
|
final List<GetAllProjectsResponseModel> hospitals;
|
||||||
|
final Function(GetAllProjectsResponseModel) onValueSelected;
|
||||||
|
GetAllProjectsResponseModel selectedHospital;
|
||||||
|
|
||||||
|
SelectHospitalDialog(
|
||||||
|
{Key key, this.hospitals, this.onValueSelected, this.selectedHospital});
|
||||||
|
|
||||||
|
@override
|
||||||
|
_SelectHospitalDialogState createState() => _SelectHospitalDialogState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _SelectHospitalDialogState extends State<SelectHospitalDialog> {
|
||||||
|
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
super.initState();
|
||||||
|
widget.selectedHospital = widget.selectedHospital ?? widget.hospitals[0];
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return SimpleDialog(
|
||||||
|
children: [
|
||||||
|
Column(
|
||||||
|
children: [
|
||||||
|
Divider(),
|
||||||
|
...List.generate(
|
||||||
|
widget.hospitals.length,
|
||||||
|
(index) => Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
SizedBox(
|
||||||
|
height: 2,
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
children: <Widget>[
|
||||||
|
Expanded(
|
||||||
|
flex: 1,
|
||||||
|
child: InkWell(
|
||||||
|
onTap: () {
|
||||||
|
setState(() {
|
||||||
|
widget.selectedHospital = widget.hospitals[index];
|
||||||
|
});
|
||||||
|
},
|
||||||
|
child: ListTile(
|
||||||
|
title: Text(widget.hospitals[index].desciption),
|
||||||
|
leading: Radio(
|
||||||
|
value: widget.hospitals[index],
|
||||||
|
groupValue: widget.selectedHospital,
|
||||||
|
activeColor: Colors.red[800],
|
||||||
|
onChanged: (value) {
|
||||||
|
setState(() {
|
||||||
|
widget.selectedHospital = value;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 5.0,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 5.0,
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: <Widget>[
|
||||||
|
Expanded(
|
||||||
|
flex: 1,
|
||||||
|
child: InkWell(
|
||||||
|
onTap: () {
|
||||||
|
Navigator.pop(context);
|
||||||
|
},
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.all(8.0),
|
||||||
|
child: Container(
|
||||||
|
child: Center(
|
||||||
|
child: Texts(
|
||||||
|
TranslationBase.of(context).cancel.toUpperCase(),
|
||||||
|
color: Colors.red,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
width: 1,
|
||||||
|
height: 30,
|
||||||
|
color: Colors.grey[500],
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
flex: 1,
|
||||||
|
child: InkWell(
|
||||||
|
onTap: () {
|
||||||
|
widget.onValueSelected(widget.selectedHospital);
|
||||||
|
Navigator.pop(context);
|
||||||
|
},
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.all(8.0),
|
||||||
|
child: Center(
|
||||||
|
child: Texts(
|
||||||
|
TranslationBase.of(context).ok,
|
||||||
|
fontWeight: FontWeight.w400,
|
||||||
|
)),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
)
|
||||||
|
],
|
||||||
|
)
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue