|
|
|
|
@ -1,3 +1,4 @@
|
|
|
|
|
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/models/CovidDriveThru/CovidPaymentInfoResponse.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/models/CovidDriveThru/DriveThroughTestingCenterModel.dart';
|
|
|
|
|
@ -29,23 +30,33 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
|
|
|
|
|
|
|
|
|
|
ProjectViewModel projectViewModel;
|
|
|
|
|
|
|
|
|
|
List<ImagesInfo> imagesInfo = List();
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
void initState() {
|
|
|
|
|
WidgetsBinding.instance
|
|
|
|
|
.addPostFrameCallback((_) => getProjectsList(context));
|
|
|
|
|
WidgetsBinding.instance.addPostFrameCallback((_) {
|
|
|
|
|
if (projectViewModel.isLogin) getProjectsList(context);
|
|
|
|
|
});
|
|
|
|
|
super.initState();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
projectViewModel = Provider.of(context);
|
|
|
|
|
imagesInfo.add(ImagesInfo(
|
|
|
|
|
imageEn: 'https://hmgwebservices.com/Images/MobileApp/covid/en/0.png',
|
|
|
|
|
imageAr: 'https://hmgwebservices.com/Images/MobileApp/covid/ar/0.png'));
|
|
|
|
|
return AppScaffold(
|
|
|
|
|
appBarTitle: TranslationBase.of(context).covidTest,
|
|
|
|
|
isShowAppBar: true,
|
|
|
|
|
isShowDecPage: true,
|
|
|
|
|
description: TranslationBase.of(context).covidInfo,
|
|
|
|
|
imagesInfo: imagesInfo,
|
|
|
|
|
body: SingleChildScrollView(
|
|
|
|
|
child: Container(
|
|
|
|
|
margin: EdgeInsets.fromLTRB(15.0, 15.0, 15.0, 0.0),
|
|
|
|
|
child: Column(
|
|
|
|
|
mainAxisSize: MainAxisSize.max,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Container(
|
|
|
|
|
alignment: projectViewModel.isArabic
|
|
|
|
|
@ -136,96 +147,185 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
|
|
|
|
|
this.projectLong +
|
|
|
|
|
"&key=AIzaSyCyDbWUM9d_sBUGIE8PcuShzPaqO08NSC8"),
|
|
|
|
|
)
|
|
|
|
|
: Container(),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
bottomSheet: Container(
|
|
|
|
|
height: MediaQuery.of(context).size.height * 0.15,
|
|
|
|
|
width: double.infinity,
|
|
|
|
|
child: Column(
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.only(top: 10.0),
|
|
|
|
|
child: ButtonTheme(
|
|
|
|
|
shape: RoundedRectangleBorder(
|
|
|
|
|
borderRadius: BorderRadius.circular(10.0),
|
|
|
|
|
),
|
|
|
|
|
minWidth: MediaQuery.of(context).size.width * 0.91,
|
|
|
|
|
height: 45.0,
|
|
|
|
|
child: RaisedButton(
|
|
|
|
|
color: new Color(0xFFc5272d),
|
|
|
|
|
textColor: Colors.white,
|
|
|
|
|
disabledTextColor: Colors.white,
|
|
|
|
|
disabledColor: Colors.red[300],
|
|
|
|
|
onPressed: () {
|
|
|
|
|
getDirections();
|
|
|
|
|
},
|
|
|
|
|
child: Text(TranslationBase.of(context).getDirections,
|
|
|
|
|
style: TextStyle(fontSize: 18.0)),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.fromLTRB(10.0, 5.0, 10.0, 5.0),
|
|
|
|
|
child: Flex(
|
|
|
|
|
direction: Axis.horizontal,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Expanded(
|
|
|
|
|
flex: 1,
|
|
|
|
|
child: Container(
|
|
|
|
|
margin: EdgeInsets.fromLTRB(10.0, 0.0, 5.0, 0.0),
|
|
|
|
|
: SizedBox(
|
|
|
|
|
height: MediaQuery.of(context).size.height * 0.35,
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
height: MediaQuery.of(context).size.height * 0.15,
|
|
|
|
|
width: double.infinity,
|
|
|
|
|
child: Column(
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.only(top: 10.0),
|
|
|
|
|
child: ButtonTheme(
|
|
|
|
|
shape: RoundedRectangleBorder(
|
|
|
|
|
borderRadius: BorderRadius.circular(10.0),
|
|
|
|
|
),
|
|
|
|
|
minWidth: MediaQuery.of(context).size.width * 0.7,
|
|
|
|
|
minWidth: MediaQuery.of(context).size.width * 0.91,
|
|
|
|
|
height: 45.0,
|
|
|
|
|
child: RaisedButton(
|
|
|
|
|
color: new Color(0xFF60686b),
|
|
|
|
|
color: new Color(0xFFc5272d),
|
|
|
|
|
textColor: Colors.white,
|
|
|
|
|
disabledTextColor: Colors.white,
|
|
|
|
|
disabledColor: Colors.grey[500],
|
|
|
|
|
disabledColor: Colors.red[300],
|
|
|
|
|
onPressed: () {
|
|
|
|
|
back();
|
|
|
|
|
getDirections();
|
|
|
|
|
},
|
|
|
|
|
child: Text(TranslationBase.of(context).back,
|
|
|
|
|
child: Text(TranslationBase.of(context).getDirections,
|
|
|
|
|
style: TextStyle(fontSize: 18.0)),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Expanded(
|
|
|
|
|
flex: 1,
|
|
|
|
|
child: Container(
|
|
|
|
|
margin: EdgeInsets.fromLTRB(10.0, 0.0, 5.0, 0.0),
|
|
|
|
|
child: ButtonTheme(
|
|
|
|
|
shape: RoundedRectangleBorder(
|
|
|
|
|
borderRadius: BorderRadius.circular(10.0),
|
|
|
|
|
),
|
|
|
|
|
minWidth: MediaQuery.of(context).size.width * 0.7,
|
|
|
|
|
height: 45.0,
|
|
|
|
|
child: RaisedButton(
|
|
|
|
|
color: new Color(0xFF60686b),
|
|
|
|
|
textColor: Colors.white,
|
|
|
|
|
disabledTextColor: Colors.white,
|
|
|
|
|
disabledColor: Colors.grey[500],
|
|
|
|
|
onPressed: () {
|
|
|
|
|
next();
|
|
|
|
|
},
|
|
|
|
|
child: Text(TranslationBase.of(context).next,
|
|
|
|
|
style: TextStyle(fontSize: 18.0)),
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.fromLTRB(10.0, 5.0, 10.0, 5.0),
|
|
|
|
|
child: Flex(
|
|
|
|
|
direction: Axis.horizontal,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Expanded(
|
|
|
|
|
flex: 1,
|
|
|
|
|
child: Container(
|
|
|
|
|
margin: EdgeInsets.fromLTRB(10.0, 0.0, 5.0, 0.0),
|
|
|
|
|
child: ButtonTheme(
|
|
|
|
|
shape: RoundedRectangleBorder(
|
|
|
|
|
borderRadius: BorderRadius.circular(10.0),
|
|
|
|
|
),
|
|
|
|
|
minWidth:
|
|
|
|
|
MediaQuery.of(context).size.width * 0.7,
|
|
|
|
|
height: 45.0,
|
|
|
|
|
child: RaisedButton(
|
|
|
|
|
color: new Color(0xFF60686b),
|
|
|
|
|
textColor: Colors.white,
|
|
|
|
|
disabledTextColor: Colors.white,
|
|
|
|
|
disabledColor: Colors.grey[500],
|
|
|
|
|
onPressed: () {
|
|
|
|
|
back();
|
|
|
|
|
},
|
|
|
|
|
child: Text(TranslationBase.of(context).back,
|
|
|
|
|
style: TextStyle(fontSize: 18.0)),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Expanded(
|
|
|
|
|
flex: 1,
|
|
|
|
|
child: Container(
|
|
|
|
|
margin: EdgeInsets.fromLTRB(10.0, 0.0, 5.0, 0.0),
|
|
|
|
|
child: ButtonTheme(
|
|
|
|
|
shape: RoundedRectangleBorder(
|
|
|
|
|
borderRadius: BorderRadius.circular(10.0),
|
|
|
|
|
),
|
|
|
|
|
minWidth:
|
|
|
|
|
MediaQuery.of(context).size.width * 0.7,
|
|
|
|
|
height: 45.0,
|
|
|
|
|
child: RaisedButton(
|
|
|
|
|
color: new Color(0xFF60686b),
|
|
|
|
|
textColor: Colors.white,
|
|
|
|
|
disabledTextColor: Colors.white,
|
|
|
|
|
disabledColor: Colors.grey[500],
|
|
|
|
|
onPressed: () {
|
|
|
|
|
next();
|
|
|
|
|
},
|
|
|
|
|
child: Text(TranslationBase.of(context).next,
|
|
|
|
|
style: TextStyle(fontSize: 18.0)),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
// bottomSheet: Container(
|
|
|
|
|
// height: MediaQuery.of(context).size.height * 0.15,
|
|
|
|
|
// width: double.infinity,
|
|
|
|
|
// child: Column(
|
|
|
|
|
// children: <Widget>[
|
|
|
|
|
// Container(
|
|
|
|
|
// margin: EdgeInsets.only(top: 10.0),
|
|
|
|
|
// child: ButtonTheme(
|
|
|
|
|
// shape: RoundedRectangleBorder(
|
|
|
|
|
// borderRadius: BorderRadius.circular(10.0),
|
|
|
|
|
// ),
|
|
|
|
|
// minWidth: MediaQuery.of(context).size.width * 0.91,
|
|
|
|
|
// height: 45.0,
|
|
|
|
|
// child: RaisedButton(
|
|
|
|
|
// color: new Color(0xFFc5272d),
|
|
|
|
|
// textColor: Colors.white,
|
|
|
|
|
// disabledTextColor: Colors.white,
|
|
|
|
|
// disabledColor: Colors.red[300],
|
|
|
|
|
// onPressed: () {
|
|
|
|
|
// getDirections();
|
|
|
|
|
// },
|
|
|
|
|
// child: Text(TranslationBase.of(context).getDirections,
|
|
|
|
|
// style: TextStyle(fontSize: 18.0)),
|
|
|
|
|
// ),
|
|
|
|
|
// ),
|
|
|
|
|
// ),
|
|
|
|
|
// Container(
|
|
|
|
|
// margin: EdgeInsets.fromLTRB(10.0, 5.0, 10.0, 5.0),
|
|
|
|
|
// child: Flex(
|
|
|
|
|
// direction: Axis.horizontal,
|
|
|
|
|
// children: <Widget>[
|
|
|
|
|
// Expanded(
|
|
|
|
|
// flex: 1,
|
|
|
|
|
// child: Container(
|
|
|
|
|
// margin: EdgeInsets.fromLTRB(10.0, 0.0, 5.0, 0.0),
|
|
|
|
|
// child: ButtonTheme(
|
|
|
|
|
// shape: RoundedRectangleBorder(
|
|
|
|
|
// borderRadius: BorderRadius.circular(10.0),
|
|
|
|
|
// ),
|
|
|
|
|
// minWidth: MediaQuery.of(context).size.width * 0.7,
|
|
|
|
|
// height: 45.0,
|
|
|
|
|
// child: RaisedButton(
|
|
|
|
|
// color: new Color(0xFF60686b),
|
|
|
|
|
// textColor: Colors.white,
|
|
|
|
|
// disabledTextColor: Colors.white,
|
|
|
|
|
// disabledColor: Colors.grey[500],
|
|
|
|
|
// onPressed: () {
|
|
|
|
|
// back();
|
|
|
|
|
// },
|
|
|
|
|
// child: Text(TranslationBase.of(context).back,
|
|
|
|
|
// style: TextStyle(fontSize: 18.0)),
|
|
|
|
|
// ),
|
|
|
|
|
// ),
|
|
|
|
|
// ),
|
|
|
|
|
// ),
|
|
|
|
|
// Expanded(
|
|
|
|
|
// flex: 1,
|
|
|
|
|
// child: Container(
|
|
|
|
|
// margin: EdgeInsets.fromLTRB(10.0, 0.0, 5.0, 0.0),
|
|
|
|
|
// child: ButtonTheme(
|
|
|
|
|
// shape: RoundedRectangleBorder(
|
|
|
|
|
// borderRadius: BorderRadius.circular(10.0),
|
|
|
|
|
// ),
|
|
|
|
|
// minWidth: MediaQuery.of(context).size.width * 0.7,
|
|
|
|
|
// height: 45.0,
|
|
|
|
|
// child: RaisedButton(
|
|
|
|
|
// color: new Color(0xFF60686b),
|
|
|
|
|
// textColor: Colors.white,
|
|
|
|
|
// disabledTextColor: Colors.white,
|
|
|
|
|
// disabledColor: Colors.grey[500],
|
|
|
|
|
// onPressed: () {
|
|
|
|
|
// next();
|
|
|
|
|
// },
|
|
|
|
|
// child: Text(TranslationBase.of(context).next,
|
|
|
|
|
// style: TextStyle(fontSize: 18.0)),
|
|
|
|
|
// ),
|
|
|
|
|
// ),
|
|
|
|
|
// ),
|
|
|
|
|
// ),
|
|
|
|
|
// ],
|
|
|
|
|
// ),
|
|
|
|
|
// ),
|
|
|
|
|
// ],
|
|
|
|
|
// ),
|
|
|
|
|
// ),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -277,25 +377,24 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
|
|
|
|
|
service
|
|
|
|
|
.getCovidPaymentInformation(context, int.parse(projectID))
|
|
|
|
|
.then((res) {
|
|
|
|
|
GifLoaderDialogUtils.hideDialog(context);
|
|
|
|
|
if (res['MessageStatus'] == 1) {
|
|
|
|
|
setState(() {
|
|
|
|
|
covidPaymentInfoResponse = CovidPaymentInfoResponse.fromJson(
|
|
|
|
|
res['COVID19_PatientShare']);
|
|
|
|
|
print(covidPaymentInfoResponse.procedureNameField);
|
|
|
|
|
});
|
|
|
|
|
Navigator.push(
|
|
|
|
|
context,
|
|
|
|
|
FadePage(
|
|
|
|
|
page: CovidPaymentDetails(
|
|
|
|
|
covidPaymentInfoResponse: covidPaymentInfoResponse,
|
|
|
|
|
projectID: int.parse(projectID),
|
|
|
|
|
)));
|
|
|
|
|
} else {}
|
|
|
|
|
})
|
|
|
|
|
.catchError((err) {
|
|
|
|
|
print(err);
|
|
|
|
|
GifLoaderDialogUtils.hideDialog(context);
|
|
|
|
|
if (res['MessageStatus'] == 1) {
|
|
|
|
|
setState(() {
|
|
|
|
|
covidPaymentInfoResponse =
|
|
|
|
|
CovidPaymentInfoResponse.fromJson(res['COVID19_PatientShare']);
|
|
|
|
|
print(covidPaymentInfoResponse.procedureNameField);
|
|
|
|
|
});
|
|
|
|
|
Navigator.push(
|
|
|
|
|
context,
|
|
|
|
|
FadePage(
|
|
|
|
|
page: CovidPaymentDetails(
|
|
|
|
|
covidPaymentInfoResponse: covidPaymentInfoResponse,
|
|
|
|
|
projectID: int.parse(projectID),
|
|
|
|
|
)));
|
|
|
|
|
} else {}
|
|
|
|
|
}).catchError((err) {
|
|
|
|
|
print(err);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
getProjectsList(BuildContext context) {
|
|
|
|
|
|