merge-update-with-lab-changes
Mohammad Aljammal 5 years ago
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,
// )));
}
}

@ -2,6 +2,7 @@ import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:diplomaticquarterapp/core/viewModels/dashboard_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/all_habib_medical_service_page.dart';
import 'package:diplomaticquarterapp/pages/ErService/ErOptions.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
@ -512,27 +513,31 @@ class _HomePageState extends State<HomePage> {
)),
Container(
width: MediaQuery.of(context).size.width * 0.29,
child: Center(
child: Padding(
padding: const EdgeInsets.all(15.0),
child: Column(
children: <Widget>[
Image.asset(
'assets/images/Dr_Schedule_report.png',
width: 50,
height: 50,
),
SizedBox(
height: 15,
),
Texts(
TranslationBase.of(context).emergencyServices,
textAlign: TextAlign.center,
color: Colors.black87,
bold: false,
fontSize: SizeConfig.textMultiplier * 2.0,
)
],
child: InkWell(
onTap: ()=>Navigator.push(context,
FadePage(page: ErOptions(isAppbar: true,))),
child: Center(
child: Padding(
padding: const EdgeInsets.all(15.0),
child: Column(
children: <Widget>[
Image.asset(
'assets/images/Dr_Schedule_report.png',
width: 50,
height: 50,
),
SizedBox(
height: 15,
),
Texts(
TranslationBase.of(context).emergencyServices,
textAlign: TextAlign.center,
color: Colors.black87,
bold: false,
fontSize: SizeConfig.textMultiplier * 2.0,
)
],
),
),
),
),

@ -444,6 +444,14 @@ class TranslationBase {
String get branch =>localizedValues['branch'][locale.languageCode];
String get emergencyServices =>localizedValues['emergencyServices'][locale.languageCode];
String get nearester=> localizedValues['nearester'][locale.languageCode];
String get locationa=> localizedValues['locationa'][locale.languageCode];
String get ambulancerequest=> localizedValues['ambulancerequest'][locale.languageCode];
String get requestA=> localizedValues['requestA'][locale.languageCode];
String get consultation =>
localizedValues['consultation'][locale.languageCode];

Loading…
Cancel
Save