merge-update-with-lab-changes
parent
5ec3935c68
commit
4ffbb80f3d
@ -0,0 +1,52 @@
|
|||||||
|
class ProjectAvgERWaitingTime {
|
||||||
|
int iD;
|
||||||
|
int projectID;
|
||||||
|
int avgTimeInMinutes;
|
||||||
|
String avgTimeInHHMM;
|
||||||
|
double distanceInKilometers;
|
||||||
|
String latitude;
|
||||||
|
String longitude;
|
||||||
|
String phoneNumber;
|
||||||
|
String projectImageURL;
|
||||||
|
String projectName;
|
||||||
|
|
||||||
|
ProjectAvgERWaitingTime(
|
||||||
|
{this.iD,
|
||||||
|
this.projectID,
|
||||||
|
this.avgTimeInMinutes,
|
||||||
|
this.avgTimeInHHMM,
|
||||||
|
this.distanceInKilometers,
|
||||||
|
this.latitude,
|
||||||
|
this.longitude,
|
||||||
|
this.phoneNumber,
|
||||||
|
this.projectImageURL,
|
||||||
|
this.projectName});
|
||||||
|
|
||||||
|
ProjectAvgERWaitingTime.fromJson(Map<String, dynamic> json) {
|
||||||
|
iD = json['ID'];
|
||||||
|
projectID = json['ProjectID'];
|
||||||
|
avgTimeInMinutes = json['AvgTimeInMinutes'];
|
||||||
|
avgTimeInHHMM = json['AvgTimeInHHMM'];
|
||||||
|
distanceInKilometers = json['DistanceInKilometers'];
|
||||||
|
latitude = json['Latitude'];
|
||||||
|
longitude = json['Longitude'];
|
||||||
|
phoneNumber = json['PhoneNumber'];
|
||||||
|
projectImageURL = json['ProjectImageURL'];
|
||||||
|
projectName = json['ProjectName'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['ID'] = this.iD;
|
||||||
|
data['ProjectID'] = this.projectID;
|
||||||
|
data['AvgTimeInMinutes'] = this.avgTimeInMinutes;
|
||||||
|
data['AvgTimeInHHMM'] = this.avgTimeInHHMM;
|
||||||
|
data['DistanceInKilometers'] = this.distanceInKilometers;
|
||||||
|
data['Latitude'] = this.latitude;
|
||||||
|
data['Longitude'] = this.longitude;
|
||||||
|
data['PhoneNumber'] = this.phoneNumber;
|
||||||
|
data['ProjectImageURL'] = this.projectImageURL;
|
||||||
|
data['ProjectName'] = this.projectName;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,76 @@
|
|||||||
|
import 'package:diplomaticquarterapp/uitl/location_util.dart';
|
||||||
|
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
|
||||||
|
//import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import '../../uitl/translations_delegate_base.dart';
|
||||||
|
import 'package:diplomaticquarterapp/pages/ErService/widgets/card_common.dart';
|
||||||
|
|
||||||
|
class ErOptions extends StatefulWidget {
|
||||||
|
final bool isAppbar;
|
||||||
|
|
||||||
|
const ErOptions({Key key, this.isAppbar}) : super(key: key);
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
_ErOptionsState createState() => _ErOptionsState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _ErOptionsState extends State<ErOptions> {
|
||||||
|
LocationUtils locationUtils;
|
||||||
|
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
locationUtils =
|
||||||
|
new LocationUtils(isShowConfirmDialog: true, context: context);
|
||||||
|
WidgetsBinding.instance
|
||||||
|
.addPostFrameCallback((_) => locationUtils.getCurrentLocation());
|
||||||
|
|
||||||
|
super.initState();
|
||||||
|
}
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return AppScaffold(
|
||||||
|
isShowAppBar: widget.isAppbar,
|
||||||
|
appBarTitle: TranslationBase.of(context).bookAppo,
|
||||||
|
body: Container(
|
||||||
|
margin: EdgeInsets.fromLTRB(10.0, 20.0, 10.0, 10.0),
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: <Widget>[
|
||||||
|
Text(TranslationBase.of(context).searchBy,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 24.0,
|
||||||
|
letterSpacing: 1.0,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
color: new Color(0xFF60686b))),
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.fromLTRB(0.0, 10.0, 0.0, 10.0),
|
||||||
|
child: Row(
|
||||||
|
mainAxisSize: MainAxisSize.max,
|
||||||
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
|
children: <Widget>[
|
||||||
|
Expanded(
|
||||||
|
child: CardCommonEr(
|
||||||
|
image: 'assets/images/new-design/AM.PNG',
|
||||||
|
text: TranslationBase.of(context).ambulancerequest,
|
||||||
|
subText: TranslationBase.of(context).requestA,
|
||||||
|
type: 0,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: CardCommonEr(
|
||||||
|
image: 'assets/images/new-design/emergency_icon.png',
|
||||||
|
text: TranslationBase.of(context).nearester,
|
||||||
|
subText: TranslationBase.of(context).locationa,
|
||||||
|
type: 1),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@ -0,0 +1,64 @@
|
|||||||
|
//import 'package:diplomaticquarterapp/pages/BookAppointment/Search.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
class CardCommonEr extends StatelessWidget {
|
||||||
|
final image;
|
||||||
|
final text;
|
||||||
|
final subText;
|
||||||
|
final type;
|
||||||
|
const CardCommonEr(
|
||||||
|
{@required this.image,
|
||||||
|
@required this.text,
|
||||||
|
@required this.subText,
|
||||||
|
@required this.type});
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
navigateToSearch(context, this.type);
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
margin: EdgeInsets.fromLTRB(9.0, 9.0, 9.0, 9.0),
|
||||||
|
decoration: BoxDecoration(boxShadow: [
|
||||||
|
BoxShadow(color: Colors.grey[400], blurRadius: 2.0, spreadRadius: 0.0)
|
||||||
|
], borderRadius: BorderRadius.circular(10), color: Colors.white),
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: <Widget>[
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.fromLTRB(10.0, 10.0, 10.0, 0.0),
|
||||||
|
child: Text(this.text,
|
||||||
|
overflow: TextOverflow.clip,
|
||||||
|
style: TextStyle(
|
||||||
|
color: new Color(0xFFc5272d),
|
||||||
|
letterSpacing: 1.0,
|
||||||
|
fontSize: 20.0)),
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.fromLTRB(10.0, 0.0, 10.0, 0.0),
|
||||||
|
child: Text(this.subText,
|
||||||
|
overflow: TextOverflow.clip,
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.black, letterSpacing: 1.0, fontSize: 15.0)),
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
alignment: Alignment.bottomRight,
|
||||||
|
margin: EdgeInsets.fromLTRB(0.0, 0.0, 10.0, 8.0),
|
||||||
|
child: Image.asset(this.image, width: 60.0, height: 60.0),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Future navigateToSearch(context, type) async {
|
||||||
|
// Navigator.push(
|
||||||
|
// context,
|
||||||
|
// MaterialPageRoute(
|
||||||
|
// builder: (context) => Search(
|
||||||
|
// type: type,
|
||||||
|
// )));
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue