diff --git a/assets/images/new/direction.svg b/assets/images/new/direction.svg
new file mode 100644
index 00000000..05d10bc2
--- /dev/null
+++ b/assets/images/new/direction.svg
@@ -0,0 +1,8 @@
+
diff --git a/assets/images/new/passport.svg b/assets/images/new/passport.svg
new file mode 100644
index 00000000..883287fb
--- /dev/null
+++ b/assets/images/new/passport.svg
@@ -0,0 +1,14 @@
+
diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart
index dc5c209a..f2d5fa0c 100644
--- a/lib/config/localized_values.dart
+++ b/lib/config/localized_values.dart
@@ -86,8 +86,10 @@ const Map localizedValues = {
'instruction': {'en': 'Instructions', 'ar': 'تعليمات'},
'livecare': {'en': 'LiveCare', 'ar': 'لايف كير'},
'livecareAppo': {'en': 'LiveCare Appointment', 'ar': 'الموعد لايف كير'},
+ 'agreeTo': {'en': 'I agree the', 'ar': 'أوافق على'},
+ 'termsConditoins': {'en': 'Terms and Conditions', 'ar': 'الأحكام والشروط'},
'cancelAppoMsg': {'en': 'Are you sure you want to cancel this appointment?', 'ar': 'هل أنت متأكد أنك تريد إلغاء هذا الموعد؟'},
-
+ 'changePayment': {'en': 'Change Payment Method', 'ar': 'قم بتغيير آلية الدفع'},
'upcoming-noAction': {'en': 'No Action Required', 'ar': 'لا يوجد إجراء مطلوب'},
'upcoming-confirm': {'en': 'Please confirm the appointment to avoid cancellation', 'ar': 'يرجى تأكيد الموعد لتفادي الإلغاء'},
"book-success-confirm-more-24-1-2": {"en": "The online payment process will be available 24 hours before the appointment.", "ar": "- عملية الدفع الالكتروني ستكون متاحة قبل الموعد ب 24 ساعة."},
diff --git a/lib/pages/Covid-DriveThru/covid-drivethru-location.dart b/lib/pages/Covid-DriveThru/covid-drivethru-location.dart
index 8f38290e..b397b228 100644
--- a/lib/pages/Covid-DriveThru/covid-drivethru-location.dart
+++ b/lib/pages/Covid-DriveThru/covid-drivethru-location.dart
@@ -67,7 +67,7 @@ class _CovidDrivethruLocationState extends State {
isShowDecPage: true,
showNewAppBarTitle: true,
showNewAppBar: true,
- backgroundColor: CustomColors.appBackgroudGreyColor,
+ backgroundColor: CustomColors.appBackgroudGrey2Color,
body: Column(
children: [
Expanded(
@@ -185,10 +185,13 @@ class _CovidDrivethruLocationState extends State {
padding: const EdgeInsets.only(left: 12, right: 12, top: 6, bottom: 6),
child: Row(
children: [
- SvgPicture.asset(
- "assets/images/new/blood_pressure.svg",
- width: 18,
- height: 18,
+ Padding(
+ padding: const EdgeInsets.all(3.0),
+ child: SvgPicture.asset(
+ "assets/images/new/direction.svg",
+ width: 13,
+ height: 13,
+ ),
),
mWidth(6),
Text(
@@ -218,33 +221,37 @@ class _CovidDrivethruLocationState extends State {
),
),
),
- Container(
- width: double.infinity,
- padding: EdgeInsets.only(left: 12, right: 12, top: 12, bottom: 12),
- child: ButtonTheme(
- shape: RoundedRectangleBorder(
- borderRadius: BorderRadius.circular(10.0),
- ),
- minWidth: MediaQuery.of(context).size.width * 0.7,
- height: 45.0,
- child: RaisedButton(
- color: CustomColors.accentColor,
- textColor: Colors.white,
- disabledTextColor: Colors.white,
- disabledColor: CustomColors.accentColor,
- onPressed: () {
- next();
- },
- child: Text(
- TranslationBase.of(context).next,
- style: TextStyle(
- fontSize: 16.0,
- fontWeight: FontWeight.bold,
- letterSpacing: -0.44,
+ Card(
+ elevation: 20,
+ margin: EdgeInsets.zero,
+ child: Container(
+ width: double.infinity,
+ padding: EdgeInsets.only(left: 12, right: 12, top: 12, bottom: 12),
+ child: ButtonTheme(
+ shape: RoundedRectangleBorder(
+ borderRadius: BorderRadius.circular(10.0),
+ ),
+ minWidth: MediaQuery.of(context).size.width * 0.7,
+ height: 45.0,
+ child: RaisedButton(
+ color: CustomColors.accentColor,
+ textColor: Colors.white,
+ disabledTextColor: Colors.white,
+ disabledColor: CustomColors.accentColor,
+ onPressed: () {
+ next();
+ },
+ child: Text(
+ TranslationBase.of(context).next,
+ style: TextStyle(
+ fontSize: 16.0,
+ fontWeight: FontWeight.bold,
+ letterSpacing: -0.44,
+ ),
),
),
- ),
- )),
+ )),
+ ),
],
),
);
diff --git a/lib/pages/ToDoList/payment_method_select.dart b/lib/pages/ToDoList/payment_method_select.dart
index 30b0dd47..b3ada181 100644
--- a/lib/pages/ToDoList/payment_method_select.dart
+++ b/lib/pages/ToDoList/payment_method_select.dart
@@ -33,7 +33,7 @@ class _PaymentMethodState extends State {
Container(
margin: EdgeInsets.fromLTRB(0.0, 15.0, 0.0, 0.0),
alignment: Alignment.center,
- child: Text(TranslationBase.of(context).selectPaymentOption, style: TextStyle(fontSize: 26.0, fontWeight: FontWeight.bold)),
+ child: Text(TranslationBase.of(context).selectPaymentOption, style: TextStyle(fontSize: 18.0, fontWeight: FontWeight.bold)),
),
Container(
margin: EdgeInsets.only(top: 25.0),
@@ -147,40 +147,42 @@ class _PaymentMethodState extends State {
],
),
),
- Platform.isIOS ? Container(
- margin: EdgeInsets.only(top: 25.0),
- child: Flex(
- direction: Axis.horizontal,
- children: [
- Expanded(
- child: Container(
- child: InkWell(
- onTap: () {
- updateSelectedPaymentMethod("ApplePay");
- },
- child: Card(
- elevation: 3.0,
- margin: EdgeInsets.fromLTRB(8.0, 16.0, 8.0, 8.0),
- color: Colors.white,
- shape: RoundedRectangleBorder(
- borderRadius: BorderRadius.circular(10),
- side: selectedPaymentMethod == "ApplePay" ? BorderSide(color: Colors.green, width: 5.0) : BorderSide(color: Colors.transparent, width: 0.0),
- ),
+ Platform.isIOS
+ ? Container(
+ margin: EdgeInsets.only(top: 25.0),
+ child: Flex(
+ direction: Axis.horizontal,
+ children: [
+ Expanded(
child: Container(
- height: 120.0,
- padding: EdgeInsets.all(20.0),
- child: SvgPicture.asset("assets/images/new-design/applepay.svg"),
+ child: InkWell(
+ onTap: () {
+ updateSelectedPaymentMethod("ApplePay");
+ },
+ child: Card(
+ elevation: 3.0,
+ margin: EdgeInsets.fromLTRB(8.0, 16.0, 8.0, 8.0),
+ color: Colors.white,
+ shape: RoundedRectangleBorder(
+ borderRadius: BorderRadius.circular(10),
+ side: selectedPaymentMethod == "ApplePay" ? BorderSide(color: Colors.green, width: 5.0) : BorderSide(color: Colors.transparent, width: 0.0),
+ ),
+ child: Container(
+ height: 120.0,
+ padding: EdgeInsets.all(20.0),
+ child: SvgPicture.asset("assets/images/new-design/applepay.svg"),
+ ),
+ ),
+ ),
),
),
- ),
+ Expanded(
+ child: Container(),
+ ),
+ ],
),
- ),
- Expanded(
- child: Container(),
- ),
- ],
- ),
- ) : Container(),
+ )
+ : Container(),
SizedBox(
height: 150.0,
),
diff --git a/lib/pages/medical/labs/passport_update_page.dart b/lib/pages/medical/labs/passport_update_page.dart
index ad77320f..06fdbd3a 100644
--- a/lib/pages/medical/labs/passport_update_page.dart
+++ b/lib/pages/medical/labs/passport_update_page.dart
@@ -1,11 +1,15 @@
import 'package:diplomaticquarterapp/core/service/medical/labs_service.dart';
+import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
+import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
+import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/input/text_field.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
+import 'package:provider/provider.dart';
class PassportUpdatePage extends StatefulWidget {
@override
@@ -15,6 +19,7 @@ class PassportUpdatePage extends StatefulWidget {
class _PassportUpdatePageState extends State {
TextEditingController passportNumber = new TextEditingController();
bool _isButtonDisabled;
+ ProjectViewModel projectViewModel;
@override
void initState() {
@@ -24,60 +29,223 @@ class _PassportUpdatePageState extends State {
@override
Widget build(BuildContext context) {
+ projectViewModel = Provider.of(context);
return AppScaffold(
appBarTitle: TranslationBase.of(context).passportNumber,
isShowAppBar: true,
isBottomBar: true,
showNewAppBar: true,
- showNewAppBarTitle: true,
+ showNewAppBarTitle: true,backgroundColor: CustomColors.appBackgroudGrey2Color,
body: Container(
- child: SingleChildScrollView(
- child: Column(
- crossAxisAlignment: CrossAxisAlignment.center,
- children: [
- Container(
- margin: EdgeInsets.all(45.0),
- child: Text(TranslationBase.of(context).enterPassportNumber, textAlign: TextAlign.center, style: TextStyle(fontSize: 22.0, fontWeight: FontWeight.bold, color: Colors.black)),
+ child: Column(
+ children: [
+ Expanded(
+ child: SingleChildScrollView(
+ child: Padding(
+ padding: const EdgeInsets.all(12.0),
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Container(
+ width: double.infinity,
+ child: Card(
+ shape: cardRadius(12),
+ margin: EdgeInsets.zero,
+ child: Padding(
+ padding: const EdgeInsets.all(12.0),
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Text(
+ "Booking appointment for:",
+ style: TextStyle(
+ fontWeight: FontWeight.bold,
+ fontSize: 16,
+ letterSpacing: -0.64,
+ ),
+ ),
+ mHeight(6),
+ Row(
+ children: [
+ Text(
+ TranslationBase.of(context).patientName + ":",
+ style: TextStyle(
+ fontWeight: FontWeight.w600,
+ fontSize: 10,
+ letterSpacing: -0.6,
+ color: CustomColors.grey,
+ ),
+ ),
+ mWidth(3),
+ Text(
+ projectViewModel.user.firstName + " " + projectViewModel.user.lastName,
+ style: TextStyle(
+ fontWeight: FontWeight.w600,
+ fontSize: 12,
+ letterSpacing: -0.48,
+ ),
+ ),
+ ],
+ ),
+ Row(
+ children: [
+ Text(
+ TranslationBase.of(context).fileNo + ":",
+ style: TextStyle(
+ fontWeight: FontWeight.w600,
+ fontSize: 10,
+ letterSpacing: -0.6,
+ color: CustomColors.grey,
+ ),
+ ),
+ mWidth(3),
+ Text(
+ projectViewModel.user.patientIdentificationNo,
+ style: TextStyle(
+ fontWeight: FontWeight.w600,
+ fontSize: 12,
+ letterSpacing: -0.48,
+ ),
+ ),
+ ],
+ ),
+ ],
+ ),
+ ),
+ ),
+ ),
+ mHeight(40),
+ SvgPicture.asset("assets/images/new/passport.svg", width: 40.0, fit: BoxFit.fill),
+ mHeight(12),
+ Text(
+ TranslationBase.of(context).enterPassportNumber,
+ textAlign: TextAlign.start,
+ style: TextStyle(
+ fontSize: 16.0,
+ fontWeight: FontWeight.bold,
+ color: Colors.black,
+ letterSpacing: -0.64,
+ ),
+ ),
+ mHeight(8),
+ inputWidget(TranslationBase.of(context).passportNumber, "", passportNumber),
+ ],
+ ),
+ ),
),
- Container(
- margin: EdgeInsets.only(top: 5.0, bottom: 5.0),
- child: SvgPicture.asset("assets/images/new-design/passport.svg", width: 250.0, fit: BoxFit.fill),
+ ),
+ Container(
+ margin: EdgeInsets.only(top: 12.0, left: 12.0, right: 12.0, bottom: 10.0),
+ child: ButtonTheme(
+ shape: RoundedRectangleBorder(
+ borderRadius: BorderRadius.circular(10.0),
+ ),
+ minWidth: MediaQuery.of(context).size.width,
+ height: 45.0,
+ child: RaisedButton(
+ color: new Color(0xFFc5272d),
+ textColor: Colors.white,
+ disabledTextColor: Colors.white,
+ disabledColor: Colors.red[300],
+ onPressed: () {
+ if (_isButtonDisabled == false)
+ updatePassportNumber();
+ else
+ AppToast.showErrorToast(message: TranslationBase.of(context).validPassportNumber);
+ },
+ child: Text(
+ TranslationBase.of(context).submit,
+ style: TextStyle(
+ fontSize: 16.0,
+ letterSpacing: -0.64,
+ ),
+ ),
+ ),
),
- Container(
- margin: EdgeInsets.only(left: 50.0, right: 50.0, top: 25.0),
- child: TextFields(
- keyboardType: TextInputType.text,
- fontWeight: FontWeight.normal,
- controller: passportNumber,
- onChanged: (value) => {_onPassportTextChanged(value)},
- padding: EdgeInsets.only(top: 20, bottom: 20, left: 10, right: 10),
- hintText: TranslationBase.of(context).passportNumber,
- )),
- Container(
- margin: EdgeInsets.only(top: 30.0, left: 45.0, right: 45.0, bottom: 10.0),
- child: ButtonTheme(
- shape: RoundedRectangleBorder(
- borderRadius: BorderRadius.circular(10.0),
+ ),
+ ],
+ ),
+ ),
+ );
+ }
+
+ Widget inputWidget(String _labelText, String _hintText, TextEditingController _controller, {String prefix, bool isEnable = true, bool hasSelection = false}) {
+ return Container(
+ padding: EdgeInsets.only(left: 16, right: 16, bottom: 15, top: 15),
+ alignment: Alignment.center,
+ decoration: BoxDecoration(
+ borderRadius: BorderRadius.circular(15),
+ color: Colors.white,
+ border: Border.all(
+ color: Color(0xffefefef),
+ width: 1,
+ ),
+ ),
+ child: InkWell(
+ onTap: hasSelection ? () {} : null,
+ child: Row(
+ children: [
+ Expanded(
+ child: Column(
+ mainAxisSize: MainAxisSize.min,
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Text(
+ _labelText,
+ style: TextStyle(
+ fontSize: 11,
+ fontWeight: FontWeight.w600,
+ color: Color(0xff2B353E),
+ letterSpacing: -0.44,
+ ),
),
- minWidth: MediaQuery.of(context).size.width,
- height: 45.0,
- child: RaisedButton(
- color: new Color(0xFFc5272d),
- textColor: Colors.white,
- disabledTextColor: Colors.white,
- disabledColor: Colors.red[300],
- onPressed: () {
- if (_isButtonDisabled == false)
- updatePassportNumber();
- else
- AppToast.showErrorToast(message: TranslationBase.of(context).validPassportNumber);
- },
- child: Text(TranslationBase.of(context).submit, style: TextStyle(fontSize: 18.0)),
+ TextField(
+ enabled: isEnable,
+ scrollPadding: EdgeInsets.zero,
+ keyboardType: TextInputType.number,
+ controller: _controller,
+ onChanged: (value) => {_onPassportTextChanged(value)},
+ style: TextStyle(
+ fontSize: 14,
+ height: 21 / 14,
+ fontWeight: FontWeight.w400,
+ color: Color(0xff2B353E),
+ letterSpacing: -0.44,
+ ),
+ decoration: InputDecoration(
+ isDense: true,
+ hintText: _hintText,
+ hintStyle: TextStyle(
+ fontSize: 14,
+ height: 21 / 14,
+ fontWeight: FontWeight.w400,
+ color: Color(0xff575757),
+ letterSpacing: -0.56,
+ ),
+ prefixIconConstraints: BoxConstraints(minWidth: 50),
+ prefixIcon: prefix == null
+ ? null
+ : Text(
+ "+" + prefix,
+ style: TextStyle(
+ fontSize: 14,
+ height: 21 / 14,
+ fontWeight: FontWeight.w500,
+ color: Color(0xff2E303A),
+ letterSpacing: -0.56,
+ ),
+ ),
+ contentPadding: EdgeInsets.zero,
+ border: InputBorder.none,
+ focusedBorder: InputBorder.none,
+ enabledBorder: InputBorder.none,
+ ),
),
- ),
+ ],
),
- ],
- ),
+ ),
+ if (hasSelection) Icon(Icons.keyboard_arrow_down_outlined),
+ ],
),
),
);
@@ -116,7 +284,7 @@ class _PassportUpdatePageState extends State {
GifLoaderDialogUtils.hideDialog(context);
print(res['Covid19_Certificate_GetPassportList'][0]['PassportNo']);
passportNumber.text = res['Covid19_Certificate_GetPassportList'][0]['PassportNo'];
- if(res['Covid19_Certificate_GetPassportList'][0]['PassportNo'] != "") {
+ if (res['Covid19_Certificate_GetPassportList'][0]['PassportNo'] != "") {
_isButtonDisabled = false;
}
}).catchError((err) {
diff --git a/lib/uitl/translations_delegate_base.dart b/lib/uitl/translations_delegate_base.dart
index 2de68720..b658ed8a 100644
--- a/lib/uitl/translations_delegate_base.dart
+++ b/lib/uitl/translations_delegate_base.dart
@@ -69,7 +69,9 @@ class TranslationBase {
String get enterDocName => localizedValues['enterDocName'][locale.languageCode];
String get search => localizedValues['search'][locale.languageCode];
+
String get noResultFound => localizedValues['noResultFound'][locale.languageCode];
+
String get pleaseEnterProductName => localizedValues['pleaseEnterProductName'][locale.languageCode];
String get bookNow => localizedValues['bookNow'][locale.languageCode];
@@ -415,7 +417,9 @@ class TranslationBase {
String get sendEmail => localizedValues['sendEmail'][locale.languageCode];
String get close => localizedValues['close'][locale.languageCode];
+
String get closeIt => localizedValues['closeIt'][locale.languageCode];
+
String get booked => localizedValues['booked'][locale.languageCode];
String get confirmed => localizedValues['confirmed'][locale.languageCode];
@@ -754,6 +758,10 @@ class TranslationBase {
String get save => localizedValues['Save'][locale.languageCode];
+ String get agreeTo => localizedValues['agreeTo'][locale.languageCode];
+
+ String get termsConditoins => localizedValues['termsConditoins'][locale.languageCode];
+
String get userAgreement => localizedValues['UserAgreement'][locale.languageCode];
String get updateSuccessfully => localizedValues['UpdateSuccessfully'][locale.languageCode];
@@ -810,6 +818,8 @@ class TranslationBase {
String get confirmThePayment => localizedValues['ConfirmThePayment'][locale.languageCode];
+ String get changePayment => localizedValues['changePayment'][locale.languageCode];
+
String get depositorName => localizedValues['DepositorName'][locale.languageCode];
String get mobileNumber => localizedValues['MobileNumber'][locale.languageCode];
@@ -907,16 +917,27 @@ class TranslationBase {
String get lakum => localizedValues['lakum'][locale.languageCode];
String get wishlist => localizedValues['wishlist'][locale.languageCode];
+
String get brands => localizedValues['brands'][locale.languageCode];
+
String get products => localizedValues['products'][locale.languageCode];
+
String get reviews => localizedValues['reviews'][locale.languageCode];
+
String get productDetails => localizedValues['productDetails'][locale.languageCode];
+
String get noReviewsAvailable => localizedValues['noReviewsAvailable'][locale.languageCode];
+
String get noLocationAvailable => localizedValues['noLocationAvailable'][locale.languageCode];
+
String get myPrescriptions => localizedValues['myPrescriptions'][locale.languageCode];
+
String get medicationRefill => localizedValues['medicationRefill'][locale.languageCode];
+
String get pillReminder => localizedValues['pillReminder'][locale.languageCode];
+
String get shippingAddresses => localizedValues['shippingAddresses'][locale.languageCode];
+
String get reachUs => localizedValues['reachUs'][locale.languageCode];
String get ourLocations => localizedValues['ourLocations'][locale.languageCode];
@@ -1133,10 +1154,15 @@ class TranslationBase {
String get yearOld => localizedValues['years-old'][locale.languageCode];
String get categorise => localizedValues['categorise'][locale.languageCode];
+
String get refine => localizedValues['refine'][locale.languageCode];
+
String get apply => localizedValues['apply'][locale.languageCode];
+
String get reset => localizedValues['reset'][locale.languageCode];
+
String get viewCategorise => localizedValues['viewCategorise'][locale.languageCode];
+
String get cart => localizedValues['cart'][locale.languageCode];
String get wishList => localizedValues['wishList'][locale.languageCode];
@@ -1744,10 +1770,15 @@ class TranslationBase {
String get quantitySize => localizedValues['quantitySize'][locale.languageCode];
String get addToCart => localizedValues['addToCart'][locale.languageCode];
+
String get addToWishlist => localizedValues['addToWishlist'][locale.languageCode];
+
String get buyNow => localizedValues['buyNow'][locale.languageCode];
+
String get quantityShortcut => localizedValues['quantityShortcut'][locale.languageCode];
+
String get noData => localizedValues['noData'][locale.languageCode];
+
String get no_data => localizedValues['no_data'][locale.languageCode];
String get year => localizedValues['Year'][locale.languageCode];
diff --git a/lib/widgets/dragable_sheet.dart b/lib/widgets/dragable_sheet.dart
new file mode 100644
index 00000000..4d91118b
--- /dev/null
+++ b/lib/widgets/dragable_sheet.dart
@@ -0,0 +1,26 @@
+import 'package:flutter/cupertino.dart';
+import 'package:flutter/material.dart';
+
+showDraggableDialog(BuildContext context, Widget child) {
+ showGeneralDialog(
+ barrierLabel: "Label",
+ barrierDismissible: false,
+ barrierColor: Colors.black.withOpacity(0.2),
+ transitionDuration: Duration(milliseconds: 200),
+ context: context,
+ pageBuilder: (context, anim1, anim2) {
+ return Dismissible(
+ direction: DismissDirection.vertical,
+ key: const Key('key'),
+ onDismissed: (_) => Navigator.of(context).pop(),
+ child: child,
+ );
+ },
+ transitionBuilder: (context, anim1, anim2, child) {
+ return SlideTransition(
+ position: Tween(begin: Offset(0, 1), end: Offset(0, 0)).animate(anim1),
+ child: child,
+ );
+ },
+ );
+}