Covid New Design

merge-update-with-lab-changes
Mirza.Shafique 4 years ago
parent e24eaa791b
commit 5b330b2a25

@ -0,0 +1,8 @@
<svg xmlns="http://www.w3.org/2000/svg" width="12.05" height="12.054" viewBox="0 0 12.05 12.054">
<g id="Page-1" transform="translate(-0.006 0.002)">
<g id="_029---Lane-Split" data-name="029---Lane-Split" transform="translate(0.006 -0.002)">
<path id="Shape" d="M2.532,1.083.044,4.622a.205.205,0,0,0,.168.324H1.46V5.57A5.366,5.366,0,0,0,3.293,9.61l.511.447a2.876,2.876,0,0,1,.981,2.163v.623a.208.208,0,0,0,.208.208H7.07a.208.208,0,0,0,.208-.208V12.22A5.4,5.4,0,0,0,5.445,8.18l-.511-.447A2.876,2.876,0,0,1,3.953,5.57V4.946H5.2a.205.205,0,0,0,.168-.324l-2.5-3.539a.208.208,0,0,0-.337,0Z" transform="translate(-0.006 -0.998)" fill="#2e303a"/>
<path id="Shape-2" data-name="Shape" d="M30.693,4.741a.207.207,0,0,0,.208.206h1.247V5.57a2.876,2.876,0,0,1-.981,2.163l-.511.447c-.106.094-.208.191-.305.291.012.017.027.031.039.048A5.758,5.758,0,0,1,31.6,10.983a2.842,2.842,0,0,1,.7-.927l.511-.447a5.366,5.366,0,0,0,1.833-4.04V4.946h1.247a.205.205,0,0,0,.168-.324l-2.5-3.539a.208.208,0,0,0-.337,0L30.732,4.622a.2.2,0,0,0-.039.118Z" transform="translate(-24.044 -0.998)" fill="#2e303a"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

@ -0,0 +1,14 @@
<svg xmlns="http://www.w3.org/2000/svg" width="40.337" height="48.98" viewBox="0 0 40.337 48.98">
<g id="passport" transform="translate(-45)">
<path id="Path_4990" data-name="Path 4990" d="M417.4.094a7.655,7.655,0,0,1,1.69,4.8V44.253a7.655,7.655,0,0,1-1.69,4.8,4.858,4.858,0,0,0,4.571-4.839V4.933A4.858,4.858,0,0,0,417.4.094Z" transform="translate(-336.636 -0.085)" fill="#2e303a"/>
<g id="Group_8308" data-name="Group 8308" transform="translate(45 0)">
<path id="Path_4991" data-name="Path 4991" d="M200.443,195a18.068,18.068,0,0,0,.988,5.177c.589,1.546,1.21,2.026,1.37,2.026s.781-.48,1.37-2.026A18.065,18.065,0,0,0,205.16,195Z" transform="translate(-185.514 -176.272)" fill="#2e303a"/>
<path id="Path_4992" data-name="Path 4992" d="M202.8,90c-.16,0-.781.48-1.37,2.026a18.064,18.064,0,0,0-.988,5.177h4.717a18.069,18.069,0,0,0-.988-5.177C203.583,90.48,202.961,90,202.8,90Z" transform="translate(-185.514 -81.356)" fill="#2e303a"/>
<path id="Path_4993" data-name="Path 4993" d="M268.551,106.8h3.279a8.668,8.668,0,0,0-4.453-6.183A20.911,20.911,0,0,1,268.551,106.8Z" transform="translate(-246.02 -90.957)" fill="#2e303a"/>
<path id="Path_4994" data-name="Path 4994" d="M139.536,106.8a20.91,20.91,0,0,1,1.174-6.183,8.668,8.668,0,0,0-4.453,6.183Z" transform="translate(-127.493 -90.957)" fill="#2e303a"/>
<path id="Path_4995" data-name="Path 4995" d="M74.661,0H45V48.98H74.661a4.887,4.887,0,0,0,4.914-4.848V4.848A4.887,4.887,0,0,0,74.661,0ZM66.609,41.777H57.965V38.9h8.644Zm2.881-5.762H55.084V33.134H69.49Zm-7.2-7.2A11.525,11.525,0,1,1,73.812,17.287,11.538,11.538,0,0,1,62.287,28.812Z" transform="translate(-45 0)" fill="#2e303a"/>
<path id="Path_4996" data-name="Path 4996" d="M268.551,195a20.911,20.911,0,0,1-1.174,6.183A8.668,8.668,0,0,0,271.83,195Z" transform="translate(-246.02 -176.272)" fill="#2e303a"/>
<path id="Path_4997" data-name="Path 4997" d="M139.536,195h-3.279a8.668,8.668,0,0,0,4.453,6.183A20.91,20.91,0,0,1,139.536,195Z" transform="translate(-127.493 -176.272)" fill="#2e303a"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.0 KiB

@ -12,8 +12,8 @@ const PACKAGES_PRODUCTS = '/api/products';
const PACKAGES_CUSTOMER = '/api/customers'; const PACKAGES_CUSTOMER = '/api/customers';
const PACKAGES_SHOPPING_CART = '/api/shopping_cart_items'; const PACKAGES_SHOPPING_CART = '/api/shopping_cart_items';
const PACKAGES_ORDERS = '/api/orders'; const PACKAGES_ORDERS = '/api/orders';
const BASE_URL = 'https://uat.hmgwebservices.com/'; // const BASE_URL = 'https://uat.hmgwebservices.com/';
// const BASE_URL = 'https://hmgwebservices.com/'; const BASE_URL = 'https://hmgwebservices.com/';
// Pharmacy UAT URLs // Pharmacy UAT URLs
const BASE_PHARMACY_URL = 'https://uat.hmgwebservices.com/epharmacy/api/'; const BASE_PHARMACY_URL = 'https://uat.hmgwebservices.com/epharmacy/api/';

@ -86,8 +86,10 @@ const Map localizedValues = {
'instruction': {'en': 'Instructions', 'ar': 'تعليمات'}, 'instruction': {'en': 'Instructions', 'ar': 'تعليمات'},
'livecare': {'en': 'LiveCare', 'ar': 'لايف كير'}, 'livecare': {'en': 'LiveCare', 'ar': 'لايف كير'},
'livecareAppo': {'en': 'LiveCare Appointment', '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': 'هل أنت متأكد أنك تريد إلغاء هذا الموعد؟'}, '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-noAction': {'en': 'No Action Required', 'ar': 'لا يوجد إجراء مطلوب'},
'upcoming-confirm': {'en': 'Please confirm the appointment to avoid cancellation', '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 ساعة."}, "book-success-confirm-more-24-1-2": {"en": "The online payment process will be available 24 hours before the appointment.", "ar": "- عملية الدفع الالكتروني ستكون متاحة قبل الموعد ب 24 ساعة."},

@ -8,11 +8,13 @@ import 'package:diplomaticquarterapp/models/CovidDriveThru/CovidTestProceduresRe
import 'package:diplomaticquarterapp/pages/Covid-DriveThru/covid-payment-alert.dart'; import 'package:diplomaticquarterapp/pages/Covid-DriveThru/covid-payment-alert.dart';
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart'; import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
import 'package:diplomaticquarterapp/services/covid-drivethru/covid-drivethru.dart'; import 'package:diplomaticquarterapp/services/covid-drivethru/covid-drivethru.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart'; import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
@ -43,8 +45,7 @@ class CovidTimeSlots extends StatefulWidget {
_CovidTimeSlotsState createState() => _CovidTimeSlotsState(); _CovidTimeSlotsState createState() => _CovidTimeSlotsState();
} }
class _CovidTimeSlotsState extends State<CovidTimeSlots> class _CovidTimeSlotsState extends State<CovidTimeSlots> with TickerProviderStateMixin {
with TickerProviderStateMixin {
Map<DateTime, List> _events; Map<DateTime, List> _events;
AnimationController _animationController; AnimationController _animationController;
CalendarController _calendarController; CalendarController _calendarController;
@ -76,8 +77,7 @@ class _CovidTimeSlotsState extends State<CovidTimeSlots>
_selectedDay: ['Event A0'] _selectedDay: ['Event A0']
}; };
WidgetsBinding.instance.addPostFrameCallback( WidgetsBinding.instance.addPostFrameCallback((_) => getCovidFreeSlots(context, widget.projectID));
(_) => getCovidFreeSlots(context, widget.projectID));
_calendarController = CalendarController(); _calendarController = CalendarController();
_animationController = AnimationController( _animationController = AnimationController(
@ -96,25 +96,21 @@ class _CovidTimeSlotsState extends State<CovidTimeSlots>
super.dispose(); super.dispose();
} }
void _onDaySelected( void _onDaySelected(DateTime day, List events, ProjectViewModel projectViewModel) {
DateTime day, List events, ProjectViewModel projectViewModel) {
final DateFormat formatter = DateFormat('yyyy-MM-dd'); final DateFormat formatter = DateFormat('yyyy-MM-dd');
setState(() { setState(() {
this.selectedDate = DateUtil.getWeekDayMonthDayYearDateFormatted( this.selectedDate = DateUtil.getWeekDayMonthDayYearDateFormatted(day, projectViewModel.isArabic ? "ar" : "en");
day, projectViewModel.isArabic ? "ar" : "en");
openTimeSlotsPickerForDate(day, docFreeSlots); openTimeSlotsPickerForDate(day, docFreeSlots);
CovidTimeSlots.selectedDate = formatter.format(day); CovidTimeSlots.selectedDate = formatter.format(day);
print(CovidTimeSlots.selectedDate); print(CovidTimeSlots.selectedDate);
}); });
} }
void _onVisibleDaysChanged( void _onVisibleDaysChanged(DateTime first, DateTime last, CalendarFormat format) {
DateTime first, DateTime last, CalendarFormat format) {
print('CALLBACK: _onVisibleDaysChanged'); print('CALLBACK: _onVisibleDaysChanged');
} }
void _onCalendarCreated( void _onCalendarCreated(DateTime first, DateTime last, CalendarFormat format) {
DateTime first, DateTime last, CalendarFormat format) {
print('CALLBACK: _onCalendarCreated'); print('CALLBACK: _onCalendarCreated');
} }
@ -124,154 +120,114 @@ class _CovidTimeSlotsState extends State<CovidTimeSlots>
return AppScaffold( return AppScaffold(
appBarTitle: TranslationBase.of(context).covidTest, appBarTitle: TranslationBase.of(context).covidTest,
isShowAppBar: true, isShowAppBar: true,
body: SingleChildScrollView( showNewAppBar: true,
child: Container( showNewAppBarTitle: true,
margin: EdgeInsets.fromLTRB(15.0, 15.0, 15.0, 0.0), backgroundColor: CustomColors.appBackgroudGrey2Color,
child: Column( body: Column(
crossAxisAlignment: CrossAxisAlignment.start, children: [
children: <Widget>[ Expanded(
Container( child: SingleChildScrollView(
height: 150.0, child: Container(
decoration: BoxDecoration( margin: EdgeInsets.fromLTRB(15.0, 15.0, 15.0, 0.0),
image: DecorationImage(
image: AssetImage(
"assets/images/new-design/covid-19-big-banner-bg.png"),
fit: BoxFit.fill,
),
color: Colors.white.withOpacity(0.3),
borderRadius: BorderRadius.all(Radius.circular(10))),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Container(
margin:
EdgeInsets.only(left: 15.0, right: 15.0, top: 30.0),
child: SvgPicture.asset(
'assets/images/new-design/covid-19-car.svg',
width: 90.0,
height: 90.0),
),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Container(
margin: EdgeInsets.only(
left: 20.0, right: 20.0, top: 20.0),
child: Text(TranslationBase.of(context).covidTest,
style: TextStyle(
color: Colors.white,
fontWeight: FontWeight.bold,
fontSize: 24.0)),
),
Container(
margin: EdgeInsets.only(
left: 20.0, right: 20.0, top: 10.0),
child: Text(TranslationBase.of(context).driveThru,
style: TextStyle(
color: Colors.white, fontSize: 24.0)),
),
],
),
],
),
),
Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10.0),
color: Colors.white),
margin: EdgeInsets.fromLTRB(0.0, 20.0, 0.0, 5.0),
padding: EdgeInsets.fromLTRB(10.0, 0.0, 10.0, 20.0),
width: MediaQuery.of(context).size.width,
// height: MediaQuery.of(context).size.height * 0.65,
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.max,
children: <Widget>[ children: <Widget>[
Container( Container(
margin: EdgeInsets.all(10.0), child: Column(
child: Text(TranslationBase.of(context).selectAppo, crossAxisAlignment: CrossAxisAlignment.start,
style: mainAxisSize: MainAxisSize.max,
TextStyle(color: Colors.black, fontSize: 16.0)), children: <Widget>[
), Text(
Container( TranslationBase.of(context).selectAppo,
margin: EdgeInsets.only(top: 10.0), style: TextStyle(
alignment: Alignment.center, color: Colors.black,
child: Text(selectedDate, fontSize: 16.0,
style: TextStyle( letterSpacing: -0.64,
fontSize: 18.0, fontWeight: FontWeight.bold)), fontWeight: FontWeight.w600,
), ),
Container( ),
height: 50, Card(
margin: EdgeInsets.all(20.0), shape: cardRadius(12),
child: ListView.builder( child: _buildTableCalendarWithBuilders(projectViewModel),
controller: _scrollController, ),
scrollDirection: Axis.horizontal, mHeight(12),
itemCount: dayEvents.length, Text(
itemBuilder: (context, index) { selectedDate,
return Container( style: TextStyle(
margin: EdgeInsets.only(right: 10.0), fontSize: 16.0,
child: ButtonTheme( fontWeight: FontWeight.bold,
shape: RoundedRectangleBorder( letterSpacing: -0.64,
borderRadius: BorderRadius.circular(5.0), ),
side: BorderSide( ),
color: Colors.blue[400], mHeight(8),
//Color of the border Container(
style: BorderStyle.solid, height: 40,
//Style of the border child: ListView.builder(
width: 1.5, //width of the border controller: _scrollController,
), scrollDirection: Axis.horizontal,
), itemCount: dayEvents.length,
minWidth: itemBuilder: (context, index) {
MediaQuery.of(context).size.width * 0.2, return Container(
child: index == selectedButtonIndex margin: EdgeInsets.only(right: (index == dayEvents.length - 1) ? 0 : 5.0, left: index == 0 ? 0 : 5),
? getSelectedButton(index) child: ButtonTheme(
: getNormalButton(index)), shape: RoundedRectangleBorder(
); borderRadius: BorderRadius.circular(5.0),
}, side: BorderSide(
color: index == selectedButtonIndex ? CustomColors.green : Colors.black, //Color of the border
style: BorderStyle.solid, //Style of the border
width: 1.5, //width of the border
),
),
minWidth: MediaQuery.of(context).size.width * 0.2,
child: index == selectedButtonIndex ? getSelectedButton(index) : getNormalButton(index)),
);
},
),
),
],
), ),
), ),
_buildTableCalendarWithBuilders(projectViewModel), SizedBox(
height: 100.0,
),
], ],
), ),
), ),
SizedBox( ),
height: 100.0,
),
],
), ),
), Card(
), elevation: 20,
bottomSheet: Container( margin: EdgeInsets.zero,
margin: EdgeInsets.all(10.0), shape: cardRadius(0),
child: Flex( child: Container(
direction: Axis.horizontal, width: double.infinity,
children: <Widget>[ padding: EdgeInsets.all(12),
Expanded( child: ButtonTheme(
flex: 1, shape: RoundedRectangleBorder(
child: Container( borderRadius: BorderRadius.circular(10.0),
margin: EdgeInsets.fromLTRB(10.0, 0.0, 5.0, 0.0), ),
child: ButtonTheme( minWidth: MediaQuery.of(context).size.width * 0.7,
shape: RoundedRectangleBorder( height: 45.0,
borderRadius: BorderRadius.circular(10.0), child: RaisedButton(
), color: CustomColors.green,
minWidth: MediaQuery.of(context).size.width * 0.7, textColor: Colors.white,
height: 45.0, disabledTextColor: Colors.white,
child: RaisedButton( disabledColor: Colors.grey[500],
color: new Color(0xFF60686b), onPressed: () {
textColor: Colors.white, bookCovidTestAppointment();
disabledTextColor: Colors.white, },
disabledColor: Colors.grey[500], child: Text(
onPressed: () { TranslationBase.of(context).bookAppo,
bookCovidTestAppointment(); style: TextStyle(
}, fontSize: 16.0,
child: Text(TranslationBase.of(context).bookNow, letterSpacing: -0.64,
style: TextStyle(fontSize: 18.0)), ),
), ),
), ),
), ),
), ),
], )
), ],
), ),
); );
} }
@ -297,12 +253,10 @@ class _CovidTimeSlotsState extends State<CovidTimeSlots>
holidayStyle: TextStyle().copyWith(color: Colors.blue[800]), holidayStyle: TextStyle().copyWith(color: Colors.blue[800]),
), ),
daysOfWeekStyle: DaysOfWeekStyle( daysOfWeekStyle: DaysOfWeekStyle(
weekendStyle: TextStyle().copyWith(color: Colors.blue[600]), weekendStyle: TextStyle().copyWith(color: Colors.black, fontSize: 11.0, fontWeight: FontWeight.w600),
), weekdayStyle: TextStyle().copyWith(color: Colors.black, fontSize: 11.0, fontWeight: FontWeight.w600),
headerStyle: HeaderStyle(
centerHeaderTitle: true,
formatButtonVisible: false,
), ),
headerStyle: HeaderStyle(centerHeaderTitle: true, formatButtonVisible: false, titleTextStyle: TextStyle(fontSize: 16, letterSpacing: -0.64, fontWeight: FontWeight.w600)),
builders: CalendarBuilders( builders: CalendarBuilders(
selectedDayBuilder: (context, date, _) { selectedDayBuilder: (context, date, _) {
return FadeTransition( return FadeTransition(
@ -315,7 +269,7 @@ class _CovidTimeSlotsState extends State<CovidTimeSlots>
height: 0, height: 0,
child: Text( child: Text(
'${date.day}', '${date.day}',
style: TextStyle().copyWith(fontSize: 16.0), style: TextStyle().copyWith(fontSize: 14.0),
), ),
), ),
); );
@ -327,8 +281,8 @@ class _CovidTimeSlotsState extends State<CovidTimeSlots>
color: _calendarController.isSelected(date) color: _calendarController.isSelected(date)
? Colors.green[400] ? Colors.green[400]
: _calendarController.isToday(date) : _calendarController.isToday(date)
? Colors.brown[300] ? Colors.transparent
: Colors.blue[400], : Color(0xff76cfb7),
), ),
width: 40.0, width: 40.0,
height: 40.0, height: 40.0,
@ -370,8 +324,7 @@ class _CovidTimeSlotsState extends State<CovidTimeSlots>
openTimeSlotsPickerForDate(DateTime dateStart, List<TimeSlot> freeSlots) { openTimeSlotsPickerForDate(DateTime dateStart, List<TimeSlot> freeSlots) {
dayEvents.clear(); dayEvents.clear();
DateTime dateStartObj = new DateTime( DateTime dateStartObj = new DateTime(dateStart.year, dateStart.month, dateStart.day, 0, 0, 0, 0, 0);
dateStart.year, dateStart.month, dateStart.day, 0, 0, 0, 0, 0);
freeSlots.forEach((v) { freeSlots.forEach((v) {
if (v.start == dateStartObj) dayEvents.add(v); if (v.start == dateStartObj) dayEvents.add(v);
@ -396,48 +349,49 @@ class _CovidTimeSlotsState extends State<CovidTimeSlots>
final DateFormat formatter = DateFormat('HH:mm'); final DateFormat formatter = DateFormat('HH:mm');
final DateFormat dateFormatter = DateFormat('yyyy-MM-dd'); final DateFormat dateFormatter = DateFormat('yyyy-MM-dd');
for (var i = 0; i < freeSlotsResponse.length; i++) { for (var i = 0; i < freeSlotsResponse.length; i++) {
date = date = DateUtil.convertStringToDate(freeSlotsResponse[i]['FreeTimeSlots']);
DateUtil.convertStringToDate(freeSlotsResponse[i]['FreeTimeSlots']);
slotsList.add(FreeSlot(date, ['slot'])); slotsList.add(FreeSlot(date, ['slot']));
docFreeSlots.add(TimeSlot( docFreeSlots.add(TimeSlot(isoTime: formatter.format(date), start: new DateTime(date.year, date.month, date.day, 0, 0, 0, 0), end: date));
isoTime: formatter.format(date),
start: new DateTime(date.year, date.month, date.day, 0, 0, 0, 0),
end: date));
} }
_eventsParsed = _eventsParsed = Map.fromIterable(slotsList, key: (e) => e.slot, value: (e) => e.event);
Map.fromIterable(slotsList, key: (e) => e.slot, value: (e) => e.event);
setState(() { setState(() {
CovidTimeSlots.selectedDate = dateFormatter.format( CovidTimeSlots.selectedDate = dateFormatter.format(DateUtil.convertStringToDate(freeSlotsResponse[0]['FreeTimeSlots']));
DateUtil.convertStringToDate(freeSlotsResponse[0]['FreeTimeSlots'])); selectedDate = DateUtil.getMonthDayYearDateFormatted(DateUtil.convertStringToDate(freeSlotsResponse[0]['FreeTimeSlots']));
selectedDate = DateUtil.getMonthDayYearDateFormatted(
DateUtil.convertStringToDate(freeSlotsResponse[0]['FreeTimeSlots']));
selectedDateJSON = freeSlotsResponse[0]['FreeTimeSlots']; selectedDateJSON = freeSlotsResponse[0]['FreeTimeSlots'];
}); });
openTimeSlotsPickerForDate( openTimeSlotsPickerForDate(DateUtil.convertStringToDate(selectedDateJSON), docFreeSlots);
DateUtil.convertStringToDate(selectedDateJSON), docFreeSlots); _calendarController.setFocusedDay(DateUtil.convertStringToDate(selectedDateJSON));
_calendarController
.setFocusedDay(DateUtil.convertStringToDate(selectedDateJSON));
return _eventsParsed; return _eventsParsed;
} }
Widget _buildEventsMarker(DateTime date, List events) { Widget _buildEventsMarker(DateTime date, List events) {
return Container( return Container(
decoration: BoxDecoration( // decoration: BoxDecoration(
shape: BoxShape.circle, // shape: BoxShape.circle,
color: _calendarController.isSelected(date) // color: _calendarController.isSelected(date)
? Colors.green[400] // ? Colors.green[400]
: _calendarController.isToday(date) // : _calendarController.isToday(date)
? Colors.brown[300] // ? Colors.brown[300]
: Colors.blue[400], // : Colors.blue[400],
), // ),
decoration: containerColorRadiusBorderWidth(
_calendarController.isSelected(date)
? CustomColors.green
: _calendarController.isToday(date)
? CustomColors.green.withOpacity(0.5)
: Colors.white,
200,
_calendarController.isSelected(date) ? CustomColors.green : Colors.black,
2),
width: 40.0, width: 40.0,
height: 40.0, height: 40.0,
child: Center( child: Center(
child: Text( child: Text(
'${date.day}', '${date.day}',
style: TextStyle().copyWith( style: TextStyle().copyWith(
color: Colors.white, color: _calendarController.isSelected(date) ? Colors.white : Colors.black,
fontSize: 14.0, fontSize: 13.0,
), ),
), ),
), ),
@ -447,6 +401,7 @@ class _CovidTimeSlotsState extends State<CovidTimeSlots>
Widget getNormalButton(int index) { Widget getNormalButton(int index) {
return RaisedButton( return RaisedButton(
color: Colors.white, color: Colors.white,
elevation: 0,
textColor: new Color(0xFF60686b), textColor: new Color(0xFF60686b),
onPressed: () { onPressed: () {
setState(() { setState(() {
@ -455,14 +410,13 @@ class _CovidTimeSlotsState extends State<CovidTimeSlots>
print(CovidTimeSlots.selectedTime); print(CovidTimeSlots.selectedTime);
}); });
}, },
child: Text(dayEvents[index].isoTime, child: Text(dayEvents[index].isoTime, style: TextStyle(fontSize: 12.0, fontWeight: FontWeight.bold)),
style: TextStyle(fontSize: 16.0, fontWeight: FontWeight.bold)),
); );
} }
Widget getSelectedButton(int index) { Widget getSelectedButton(int index) {
return RaisedButton( return RaisedButton(
color: Colors.blue[400], color: CustomColors.green, //Color of the border
textColor: Colors.white, textColor: Colors.white,
onPressed: () { onPressed: () {
setState(() { setState(() {
@ -471,8 +425,7 @@ class _CovidTimeSlotsState extends State<CovidTimeSlots>
print(CovidTimeSlots.selectedTime); print(CovidTimeSlots.selectedTime);
}); });
}, },
child: Text(dayEvents[index].isoTime, child: Text(dayEvents[index].isoTime, style: TextStyle(fontSize: 12.0, fontWeight: FontWeight.bold)),
style: TextStyle(fontSize: 16.0, fontWeight: FontWeight.bold)),
); );
} }
@ -489,19 +442,11 @@ class _CovidTimeSlotsState extends State<CovidTimeSlots>
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();
AppoitmentAllHistoryResultList appo; AppoitmentAllHistoryResultList appo;
service service
.insertAppointment( .insertAppointment(docObject.doctorID, docObject.clinicID, docObject.projectID, CovidTimeSlots.selectedTime, CovidTimeSlots.selectedDate, context, widget.selectedProcedure.procedureID)
docObject.doctorID,
docObject.clinicID,
docObject.projectID,
CovidTimeSlots.selectedTime,
CovidTimeSlots.selectedDate,
context,
widget.selectedProcedure.procedureID)
.then((res) { .then((res) {
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
AppToast.showSuccessToast(message: "Appointment Booked Successfully"); AppToast.showSuccessToast(message: "Appointment Booked Successfully");
getPatientShare(context, res['AppointmentNo'], docObject.clinicID, getPatientShare(context, res['AppointmentNo'], docObject.clinicID, docObject.projectID, docObject);
docObject.projectID, docObject);
} else { } else {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
appo = new AppoitmentAllHistoryResultList(); appo = new AppoitmentAllHistoryResultList();
@ -532,8 +477,7 @@ class _CovidTimeSlotsState extends State<CovidTimeSlots>
}); });
} }
cancelAppointment(DoctorList docObject, AppoitmentAllHistoryResultList appo, cancelAppointment(DoctorList docObject, AppoitmentAllHistoryResultList appo, BuildContext context) {
BuildContext context) {
ConfirmDialog.closeAlertDialog(context); ConfirmDialog.closeAlertDialog(context);
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();
@ -551,12 +495,9 @@ class _CovidTimeSlotsState extends State<CovidTimeSlots>
}); });
} }
getPatientShare(context, String appointmentNo, int clinicID, int projectID, getPatientShare(context, String appointmentNo, int clinicID, int projectID, DoctorList docObject) {
DoctorList docObject) {
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();
service service.getPatientShare(appointmentNo, clinicID, projectID, context).then((res) {
.getPatientShare(appointmentNo, clinicID, projectID, context)
.then((res) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
print(res); print(res);
widget.patientShareResponse = new PatientShareResponse.fromJson(res); widget.patientShareResponse = new PatientShareResponse.fromJson(res);
@ -571,8 +512,7 @@ class _CovidTimeSlotsState extends State<CovidTimeSlots>
Navigator.push( Navigator.push(
context, context,
FadePage( FadePage(
page: CovidPaymentAlert( page: CovidPaymentAlert(patientShareResponse: widget.patientShareResponse),
patientShareResponse: widget.patientShareResponse),
), ),
); );
} }
@ -586,14 +526,7 @@ class _CovidTimeSlotsState extends State<CovidTimeSlots>
if (res['COVID19_FreeTimeSlots'].length != 0) { if (res['COVID19_FreeTimeSlots'].length != 0) {
freeSlotsResponse = res['COVID19_FreeTimeSlots']; freeSlotsResponse = res['COVID19_FreeTimeSlots'];
_getJSONSlots().then((value) => { _getJSONSlots().then((value) => {
setState(() => { setState(() => {widget.selectedClinicID = freeSlotsResponse[0]['ClinicID'], widget.selectedDoctorID = freeSlotsResponse[0]['DoctorID'], _events.clear(), _events = value})
widget.selectedClinicID =
freeSlotsResponse[0]['ClinicID'],
widget.selectedDoctorID =
freeSlotsResponse[0]['DoctorID'],
_events.clear(),
_events = value
})
}); });
} else {} } else {}
} else { } else {

@ -1,16 +1,20 @@
import 'dart:convert'; import 'dart:convert';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/CovidDriveThru/CovidPaymentInfoResponse.dart'; import 'package:diplomaticquarterapp/models/CovidDriveThru/CovidPaymentInfoResponse.dart';
import 'package:diplomaticquarterapp/models/CovidDriveThru/CovidTestProceduresResponse.dart'; import 'package:diplomaticquarterapp/models/CovidDriveThru/CovidTestProceduresResponse.dart';
import 'package:diplomaticquarterapp/pages/medical/labs/passport_update_page.dart'; import 'package:diplomaticquarterapp/pages/medical/labs/passport_update_page.dart';
import 'package:diplomaticquarterapp/services/covid-drivethru/covid-drivethru.dart'; import 'package:diplomaticquarterapp/services/covid-drivethru/covid-drivethru.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'covid-payment-details.dart'; import 'covid-payment-details.dart';
@ -34,81 +38,209 @@ class CovidDirveThruQuestionsState extends State<CovidDirveThruQuestions> {
} }
TranslationBase localize; TranslationBase localize;
ProjectViewModel projectViewModel;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
localize = TranslationBase.of(context); localize = TranslationBase.of(context);
var isArabic = localize.isArabic(); var isArabic = localize.isArabic();
projectViewModel = Provider.of(context);
return AppScaffold( return AppScaffold(
appBarTitle: TranslationBase.of(context).covidTest, appBarTitle: TranslationBase.of(context).covidTest,
isShowAppBar: true, isShowAppBar: true,
showNewAppBar: true,
showNewAppBarTitle: true,
backgroundColor: CustomColors.appBackgroudGrey2Color,
body: Column( body: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Padding(
padding: const EdgeInsets.all(20),
child: Text(localize.covidSelectProcedure, style: TextStyle(fontSize: 17, letterSpacing: 1, fontWeight: FontWeight.bold)),
),
Expanded( Expanded(
child: ListView.separated( child: SingleChildScrollView(
padding: EdgeInsets.symmetric(horizontal: 20), child: Padding(
itemCount: qa.length, padding: const EdgeInsets.all(16.0),
itemBuilder: (ctx, idx) {
var obj = qa[idx];
var qtext = isArabic ? obj["questionAR"] : obj["questionEN"];
return Padding(
padding: const EdgeInsets.symmetric(vertical: 10),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Text(qtext, style: TextStyle(fontSize: 15, letterSpacing: 1.5)), Container(
Row( width: double.infinity,
children: [ child: Card(
Radio<int>( shape: cardRadius(12),
value: 1, margin: EdgeInsets.zero,
groupValue: obj["ans"], child: Padding(
onChanged: (newValue) { padding: const EdgeInsets.all(12.0),
setState(() { child: Column(
obj["ans"] = newValue; crossAxisAlignment: CrossAxisAlignment.start,
}); children: [
}), Text(
Text(localize.yes), "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(12),
Text(
"Please answer below questionnaire",
style: TextStyle(
fontSize: 16,
letterSpacing: -0.64,
fontWeight: FontWeight.bold,
),
),
mHeight(12),
ListView.separated(
itemCount: qa.length,
physics: NeverScrollableScrollPhysics(),
shrinkWrap: true,
itemBuilder: (ctx, idx) {
var obj = qa[idx];
var qtext = isArabic ? obj["questionAR"] : obj["questionEN"];
return Padding(
padding: const EdgeInsets.symmetric(vertical: 10),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
qtext,
style: TextStyle(
fontSize: 12,
letterSpacing: -0.48,
fontWeight: FontWeight.w600,
),
),
Row(
children: [
Expanded(
child: Row(
children: [
Radio<int>(
value: 1,
groupValue: obj["ans"],
onChanged: (newValue) {
setState(() {
obj["ans"] = newValue;
});
}),
Text(
localize.yes,
style: TextStyle(
fontSize: 12,
letterSpacing: -0.48,
fontWeight: FontWeight.w600,
),
),
],
),
),
Expanded(
child: Row(
children: [
Radio<int>(
value: 0,
groupValue: obj["ans"],
onChanged: (newValue) {
setState(() {
obj["ans"] = newValue;
});
}),
Text(
localize.no,
style: TextStyle(
fontSize: 12,
letterSpacing: -0.48,
fontWeight: FontWeight.w600,
),
),
],
),
)
],
),
],
),
);
},
separatorBuilder: (ctx, idx) => Container(),
), ),
Row(
children: [
Radio<int>(
value: 0,
groupValue: obj["ans"],
onChanged: (newValue) {
setState(() {
obj["ans"] = newValue;
});
}),
Text(localize.no),
],
)
], ],
), ),
); ),
}, ),
separatorBuilder: (ctx, idx) => Divider(height: 0.25, color: Colors.grey.withOpacity(0.5)), ),
)), Card(
Padding( margin: EdgeInsets.zero,
padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 10), elevation: 20,
child: FractionallySizedBox( child: Container(
widthFactor: 1, padding: EdgeInsets.all(12),
child: MaterialButton( child: FractionallySizedBox(
height: 50, widthFactor: 1,
color: Theme.of(context).appBarTheme.color, child: MaterialButton(
disabledColor: Theme.of(context).appBarTheme.color.withOpacity(0.25), height: 50,
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(10)), color: CustomColors.accentColor,
child: Text( disabledColor: Theme.of(context).appBarTheme.color.withOpacity(0.25),
localize.next, shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(10)),
style: TextStyle(color: Colors.white, fontSize: 13, letterSpacing: 1), child: Text(
), localize.next,
onPressed: next), style: TextStyle(
fontSize: 16.0,
fontWeight: FontWeight.bold,
letterSpacing: -0.44,
color: Colors.white,
),
),
onPressed: next),
),
), ),
), ),
], ],
@ -132,7 +264,7 @@ class CovidDirveThruQuestionsState extends State<CovidDirveThruQuestions> {
openPassportUpdatePage() { openPassportUpdatePage() {
Navigator.push(context, FadePage(page: PassportUpdatePage())).then((value) { Navigator.push(context, FadePage(page: PassportUpdatePage())).then((value) {
print(value); print(value);
if(value != null && value == true) { if (value != null && value == true) {
getPaymentInfo(context, widget.projectId); getPaymentInfo(context, widget.projectId);
} }
}); });

@ -67,7 +67,7 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
isShowDecPage: true, isShowDecPage: true,
showNewAppBarTitle: true, showNewAppBarTitle: true,
showNewAppBar: true, showNewAppBar: true,
backgroundColor: CustomColors.appBackgroudGreyColor, backgroundColor: CustomColors.appBackgroudGrey2Color,
body: Column( body: Column(
children: [ children: [
Expanded( Expanded(
@ -185,10 +185,13 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
padding: const EdgeInsets.only(left: 12, right: 12, top: 6, bottom: 6), padding: const EdgeInsets.only(left: 12, right: 12, top: 6, bottom: 6),
child: Row( child: Row(
children: [ children: [
SvgPicture.asset( Padding(
"assets/images/new/blood_pressure.svg", padding: const EdgeInsets.all(3.0),
width: 18, child: SvgPicture.asset(
height: 18, "assets/images/new/direction.svg",
width: 13,
height: 13,
),
), ),
mWidth(6), mWidth(6),
Text( Text(
@ -218,33 +221,37 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
), ),
), ),
), ),
Container( Card(
width: double.infinity, elevation: 20,
padding: EdgeInsets.only(left: 12, right: 12, top: 12, bottom: 12), margin: EdgeInsets.zero,
child: ButtonTheme( child: Container(
shape: RoundedRectangleBorder( width: double.infinity,
borderRadius: BorderRadius.circular(10.0), padding: EdgeInsets.only(left: 12, right: 12, top: 12, bottom: 12),
), child: ButtonTheme(
minWidth: MediaQuery.of(context).size.width * 0.7, shape: RoundedRectangleBorder(
height: 45.0, borderRadius: BorderRadius.circular(10.0),
child: RaisedButton( ),
color: CustomColors.accentColor, minWidth: MediaQuery.of(context).size.width * 0.7,
textColor: Colors.white, height: 45.0,
disabledTextColor: Colors.white, child: RaisedButton(
disabledColor: CustomColors.accentColor, color: CustomColors.accentColor,
onPressed: () { textColor: Colors.white,
next(); disabledTextColor: Colors.white,
}, disabledColor: CustomColors.accentColor,
child: Text( onPressed: () {
TranslationBase.of(context).next, next();
style: TextStyle( },
fontSize: 16.0, child: Text(
fontWeight: FontWeight.bold, TranslationBase.of(context).next,
letterSpacing: -0.44, style: TextStyle(
fontSize: 16.0,
fontWeight: FontWeight.bold,
letterSpacing: -0.44,
),
), ),
), ),
), )),
)), ),
], ],
), ),
); );

@ -3,9 +3,11 @@ import 'package:diplomaticquarterapp/models/Appointments/PatientShareResposne.da
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
import 'package:diplomaticquarterapp/pages/Covid-DriveThru/covid-payment-summary.dart'; import 'package:diplomaticquarterapp/pages/Covid-DriveThru/covid-payment-summary.dart';
import 'package:diplomaticquarterapp/pages/ToDoList/payment_method_select.dart'; import 'package:diplomaticquarterapp/pages/ToDoList/payment_method_select.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -29,213 +31,135 @@ class _CovidPaymentAlertState extends State<CovidPaymentAlert> {
return AppScaffold( return AppScaffold(
appBarTitle: TranslationBase.of(context).covidTest, appBarTitle: TranslationBase.of(context).covidTest,
isShowAppBar: true, isShowAppBar: true,
body: SingleChildScrollView( showNewAppBarTitle: true,
child: Column( showNewAppBar: true,
crossAxisAlignment: CrossAxisAlignment.start, backgroundColor: CustomColors.appBackgroudGrey2Color,
children: <Widget>[ body: Column(
Container( children: [
height: 200.0, Expanded(
color: new Color(0xFFc5272d), child: SingleChildScrollView(
child: Row( child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Container( Container(
margin: EdgeInsets.only(left: 50.0), color: new Color(0xFFc5272d),
child: SvgPicture.asset( padding: EdgeInsets.all(20),
'assets/images/new-design/alert_icon.svg', child: Row(
width: 80.0,
height: 80.0),
),
Container(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[ children: <Widget>[
Container( Icon(
margin: EdgeInsets.only(left: 30.0, right: 20.0), Icons.warning_outlined,
child: Text(TranslationBase.of(context).covidAlert, color: Colors.white,
style: TextStyle(
color: Colors.white,
fontWeight: FontWeight.bold,
fontSize: 24.0)),
), ),
Container( mWidth(12),
width: MediaQuery.of(context).size.width * 0.55, Expanded(
margin: EdgeInsets.only(
left: 30.0, right: 20.0, top: 5.0),
child: Text( child: Text(
TranslationBase.of(context).covidAlertHeader, TranslationBase.of(context).covidAlertHeader,
// "Pay With-in 15 mins to confirm the appointment", style: TextStyle(
overflow: TextOverflow.clip, color: Colors.white,
style: TextStyle( fontWeight: FontWeight.w600,
color: Colors.white, fontSize: 20.0)), fontSize: 16.0,
), letterSpacing: -0.64,
),
),
)
], ],
), ),
), ),
],
),
),
Container(
margin: EdgeInsets.only(left: 20.0, right: 20.0, top: 30.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Container(
alignment: Alignment.center,
child: Text(TranslationBase.of(context).covidAlertMins,
overflow: TextOverflow.clip,
style: TextStyle(
color: new Color(0xFFc5272d),
fontSize: 24.0,
fontWeight: FontWeight.bold)),
),
Container(
alignment: Alignment.center,
margin: EdgeInsets.only(top: 15.0),
child: Text(
TranslationBase.of(context).covidAlertInfo,
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.grey[700],
fontSize: 18.0,
letterSpacing: 0.8)),
),
Container( Container(
margin: EdgeInsets.only( margin: EdgeInsets.only(left: 20.0, right: 20.0, top: 30.0),
top: 40.0, bottom: 10.0, left: 0.0, right: 20.0),
child: Text(TranslationBase.of(context).appoInfo,
style: TextStyle(
fontSize: 18.0,
color: Colors.grey[700],
fontWeight: FontWeight.bold)),
),
Container(
margin: EdgeInsets.only(left: 0.0, bottom: 20.0),
width: MediaQuery.of(context).size.width,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10),
color: Colors.grey[200],
boxShadow: [
BoxShadow(color: Colors.grey, spreadRadius: 2),
],
),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Container( Text(
margin: EdgeInsets.only( TranslationBase.of(context).covidAlertMins,
top: 15.0, bottom: 10.0, left: 20.0, right: 20.0), style: TextStyle(
child: Text(TranslationBase.of(context).covidTest, fontSize: 19.0,
style: TextStyle( letterSpacing: -1.6,
fontSize: 18.0, fontWeight: FontWeight.bold,
color: Colors.black,
fontWeight: FontWeight.bold)),
),
Container(
margin: EdgeInsets.only(bottom: 10.0),
child: Row(
children: <Widget>[
Container(
margin:
EdgeInsets.only(left: 20.0, right: 20.0),
child: Icon(
Icons.local_hospital,
size: 24,
color: Colors.grey[700],
)),
Container(
child: Text(
widget.patientShareResponse.projectName !=
null
? widget
.patientShareResponse.projectName
: "NULL",
style: TextStyle(
fontSize: 18.0,
color: Colors.grey[700])),
),
],
),
),
Container(
margin: EdgeInsets.only(bottom: 10.0),
child: Row(
children: <Widget>[
Container(
margin:
EdgeInsets.only(left: 20.0, right: 20.0),
child: Icon(
Icons.date_range,
size: 24,
color: Colors.grey[700],
)),
Container(
child: Text(
widget.patientShareResponse
.appointmentDate !=
null
? getDate(widget.patientShareResponse
.appointmentDate)
.split(" ")[0]
: "NULL",
style: TextStyle(
fontSize: 18.0,
color: Colors.grey[700])),
),
],
), ),
), ),
Container( Text(
margin: EdgeInsets.only(bottom: 10.0), TranslationBase.of(context).covidAlertInfo,
child: Row( style: TextStyle(
children: <Widget>[ color: Colors.grey[700],
Container( fontSize: 14.0,
margin: letterSpacing: -0.56,
EdgeInsets.only(left: 20.0, right: 20.0),
child: Icon(
Icons.access_time,
size: 24,
color: Colors.grey[700],
)),
Container(
child: Text(
widget.patientShareResponse
.appointmentDate !=
null
? getDate(widget.patientShareResponse
.appointmentDate)
.split(" ")[1]
: "NULL",
style: TextStyle(
fontSize: 18.0,
color: Colors.grey[700])),
),
],
), ),
), ),
mHeight(20),
Container( Container(
margin: EdgeInsets.only(bottom: 10.0), width: double.infinity,
child: Row( child: Card(
children: <Widget>[ margin: EdgeInsets.zero,
Container( shape: cardRadius(12),
margin: child: Padding(
EdgeInsets.only(left: 20.0, right: 20.0), padding: const EdgeInsets.all(12.0),
child: SvgPicture.asset( child: Column(
"assets/images/new-design/track_icon.svg", crossAxisAlignment: CrossAxisAlignment.start,
width: 20.0, children: [
height: 20.0)), Text(
Container( TranslationBase.of(context).appoInfo,
child: Text(
widget.patientShareResponse.doctorNameObj !=
null
? widget
.patientShareResponse.doctorNameObj
: "NULL",
style: TextStyle( style: TextStyle(
fontSize: 18.0, fontSize: 16.0,
color: Colors.grey[700])), letterSpacing: -0.64,
fontWeight: FontWeight.bold,
),
),
mHeight(16),
Row(
children: [
_getNormalText(
TranslationBase.of(context).hospital + ":",
),
mWidth(6),
_getNormalText(
widget.patientShareResponse.projectName != null ? widget.patientShareResponse.projectName : "NULL",
isBold: true,
),
],
),
mHeight(4),
Row(
children: [
_getNormalText(
TranslationBase.of(context).date + ":",
),
mWidth(6),
_getNormalText(
widget.patientShareResponse.appointmentDate != null ? getDate(widget.patientShareResponse.appointmentDate).split(" ")[0] : "NULL",
isBold: true,
),
],
),
mHeight(4),
Row(
children: [
_getNormalText(
TranslationBase.of(context).time + ":",
),
mWidth(6),
_getNormalText(
widget.patientShareResponse.appointmentDate != null ? getDate(widget.patientShareResponse.appointmentDate).split(" ")[1] : "NULL",
isBold: true,
),
],
),
mHeight(4),
Row(
children: [
_getNormalText(
TranslationBase.of(context).route + ":",
),
mWidth(6),
_getNormalText(
widget.patientShareResponse.doctorNameObj != null ? widget.patientShareResponse.doctorNameObj : "NULL",
isBold: true,
),
],
),
],
), ),
], ),
), ),
), ),
], ],
@ -244,39 +168,51 @@ class _CovidPaymentAlertState extends State<CovidPaymentAlert> {
], ],
), ),
), ),
], ),
), Card(
), margin: EdgeInsets.zero,
bottomSheet: Container( elevation: 20,
margin: EdgeInsets.all(10.0), child: Container(
child: Flex( margin: EdgeInsets.all(12),
direction: Axis.horizontal, width: double.infinity,
children: <Widget>[ child: ButtonTheme(
Expanded( shape: RoundedRectangleBorder(
flex: 1, borderRadius: BorderRadius.circular(10.0),
child: Container( ),
margin: EdgeInsets.fromLTRB(10.0, 0.0, 5.0, 0.0), minWidth: MediaQuery.of(context).size.width * 0.7,
child: ButtonTheme( height: 45.0,
shape: RoundedRectangleBorder( child: RaisedButton(
borderRadius: BorderRadius.circular(10.0), color: CustomColors.accentColor,
), textColor: Colors.white,
minWidth: MediaQuery.of(context).size.width * 0.7, disabledTextColor: Colors.white,
height: 45.0, disabledColor: Colors.grey[500],
child: RaisedButton( onPressed: () {
color: new Color(0xFF60686b), startPaymentProcess();
textColor: Colors.white, },
disabledTextColor: Colors.white, child: Text(
disabledColor: Colors.grey[500], TranslationBase.of(context).next,
onPressed: () { style: TextStyle(
startPaymentProcess(); fontSize: 16.0,
}, letterSpacing: -0.48,
child: Text(TranslationBase.of(context).next, style: TextStyle(fontSize: 18.0)), ),
), ),
), ),
), ),
), ),
], ),
), ],
),
);
}
_getNormalText(text, {bool isBold = false}) {
return Text(
text,
style: TextStyle(
fontSize: isBold ? 12 : 10,
letterSpacing: -0.5,
color: isBold ? Colors.black : Colors.grey[700],
fontWeight: FontWeight.w600,
), ),
); );
} }
@ -285,31 +221,32 @@ class _CovidPaymentAlertState extends State<CovidPaymentAlert> {
navigateToPaymentMethod(context, widget.patientShareResponse); navigateToPaymentMethod(context, widget.patientShareResponse);
} }
Future navigateToPaymentMethod( Future navigateToPaymentMethod(context, PatientShareResponse patientShareResponse) async {
context, PatientShareResponse patientShareResponse) async {
if (await this.sharedPref.getObject(USER_PROFILE) != null) { if (await this.sharedPref.getObject(USER_PROFILE) != null) {
var data = AuthenticatedUser.fromJson( var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE));
await this.sharedPref.getObject(USER_PROFILE));
setState(() { setState(() {
authUser = data; authUser = data;
}); });
} }
Navigator.push( Navigator.push(
context, FadePage(page: PaymentMethod())) context,
.then((value) { FadePage(
print(value); page: CovidPaymentSummary(patientShareResponse: widget.patientShareResponse, selectedPaymentMethod: "MADA"),
if (value != null) { ),
Navigator.push( );
context, // Navigator.push(context, FadePage(page: PaymentMethod())).then((value) {
FadePage( // print(value);
page: CovidPaymentSummary( // if (value != null) {
patientShareResponse: widget.patientShareResponse, // Navigator.push(
selectedPaymentMethod: value.toString()), // context,
), // FadePage(
); // page: CovidPaymentSummary(patientShareResponse: widget.patientShareResponse, selectedPaymentMethod: value.toString()),
} // ),
}); // );
// }
// });
} }
String getDate(String appoDate) { String getDate(String appoDate) {

@ -2,8 +2,10 @@ import 'package:diplomaticquarterapp/models/CovidDriveThru/CovidPaymentInfoRespo
import 'package:diplomaticquarterapp/models/CovidDriveThru/CovidTestProceduresResponse.dart'; import 'package:diplomaticquarterapp/models/CovidDriveThru/CovidTestProceduresResponse.dart';
import 'package:diplomaticquarterapp/pages/Covid-DriveThru/Covid-TimeSlots.dart'; import 'package:diplomaticquarterapp/pages/Covid-DriveThru/Covid-TimeSlots.dart';
import 'package:diplomaticquarterapp/services/covid-drivethru/covid-drivethru.dart'; import 'package:diplomaticquarterapp/services/covid-drivethru/covid-drivethru.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
@ -16,10 +18,7 @@ class CovidPaymentDetails extends StatefulWidget {
List<CovidTestProceduresResponse> proceduresList; List<CovidTestProceduresResponse> proceduresList;
CovidTestProceduresResponse selectedProcedure; CovidTestProceduresResponse selectedProcedure;
CovidPaymentDetails( CovidPaymentDetails({@required this.covidPaymentInfoResponse, @required this.projectID, @required this.proceduresList});
{@required this.covidPaymentInfoResponse,
@required this.projectID,
@required this.proceduresList});
@override @override
_CovidPaymentDetailsState createState() => _CovidPaymentDetailsState(); _CovidPaymentDetailsState createState() => _CovidPaymentDetailsState();
@ -39,76 +38,66 @@ class _CovidPaymentDetailsState extends State<CovidPaymentDetails> {
return AppScaffold( return AppScaffold(
appBarTitle: TranslationBase.of(context).covidTest, appBarTitle: TranslationBase.of(context).covidTest,
isShowAppBar: true, isShowAppBar: true,
body: SingleChildScrollView( showNewAppBarTitle: true,
child: Container( showNewAppBar: true,
margin: EdgeInsets.fromLTRB(15.0, 15.0, 15.0, 100.0), backgroundColor: CustomColors.appBackgroudGrey2Color,
child: Column( body: Container(
crossAxisAlignment: CrossAxisAlignment.start, // margin: EdgeInsets.fromLTRB(15.0, 15.0, 15.0, 100.0),
children: <Widget>[
Container( child: Column(
height: 150.0, children: [
decoration: BoxDecoration( Expanded(
image: DecorationImage( child: Padding(
image: AssetImage( padding: EdgeInsets.all(16),
"assets/images/new-design/covid-19-big-banner-bg.png"),
fit: BoxFit.fill,
),
color: Colors.white.withOpacity(0.3),
borderRadius: BorderRadius.all(Radius.circular(10))),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Container(
margin:
EdgeInsets.only(left: 15.0, right: 15.0, top: 30.0),
child: SvgPicture.asset(
'assets/images/new-design/covid-19-car.svg',
width: 90.0,
height: 90.0),
),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Container(
margin: EdgeInsets.only(
left: 20.0, right: 20.0, top: 20.0),
child: Text(TranslationBase.of(context).covidTest,
style: TextStyle(
color: Colors.white,
fontWeight: FontWeight.bold,
fontSize: 24.0)),
),
Container(
margin: EdgeInsets.only(
left: 20.0, right: 20.0, top: 10.0),
child: Text(TranslationBase.of(context).driveThru,
style: TextStyle(
color: Colors.white, fontSize: 24.0)),
),
],
),
],
),
),
Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10.0),
color: Colors.white),
margin: EdgeInsets.fromLTRB(0.0, 30.0, 0.0, 5.0),
padding: EdgeInsets.fromLTRB(10.0, 0.0, 10.0, 20.0),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Container( // Container(
alignment: Alignment.center, // height: 150.0,
margin: // decoration: BoxDecoration(
EdgeInsets.only(left: 0.0, right: 20.0, top: 10.0), // image: DecorationImage(
child: Text( // image: AssetImage(
TranslationBase.of(context).covidSelectProcedure, // "assets/images/new-design/covid-19-big-banner-bg.png"),
style: TextStyle( // fit: BoxFit.fill,
color: Colors.black, // ),
fontSize: 20.0, // color: Colors.white.withOpacity(0.3),
fontWeight: FontWeight.bold)), // borderRadius: BorderRadius.all(Radius.circular(10))),
), // child: Row(
// crossAxisAlignment: CrossAxisAlignment.start,
// children: <Widget>[
// Container(
// margin:
// EdgeInsets.only(left: 15.0, right: 15.0, top: 30.0),
// child: SvgPicture.asset(
// 'assets/images/new-design/covid-19-car.svg',
// width: 90.0,
// height: 90.0),
// ),
// Column(
// crossAxisAlignment: CrossAxisAlignment.start,
// children: <Widget>[
// Container(
// margin: EdgeInsets.only(
// left: 20.0, right: 20.0, top: 20.0),
// child: Text(TranslationBase.of(context).covidTest,
// style: TextStyle(
// color: Colors.white,
// fontWeight: FontWeight.bold,
// fontSize: 24.0)),
// ),
// Container(
// margin: EdgeInsets.only(
// left: 20.0, right: 20.0, top: 10.0),
// child: Text(TranslationBase.of(context).driveThru,
// style: TextStyle(
// color: Colors.white, fontSize: 24.0)),
// ),
// ],
// ),
// ],
// ),
// ),
Text(TranslationBase.of(context).covidSelectProcedure, style: TextStyle(color: Colors.black, fontSize: 16.0, letterSpacing: -0.64, fontWeight: FontWeight.bold)),
...List.generate( ...List.generate(
widget.proceduresList.length, widget.proceduresList.length,
(index) => Column( (index) => Column(
@ -124,15 +113,18 @@ class _CovidPaymentDetailsState extends State<CovidPaymentDetails> {
child: InkWell( child: InkWell(
onTap: () { onTap: () {
setState(() { setState(() {
widget.selectedProcedure = widget.selectedProcedure = widget.proceduresList[index];
widget.proceduresList[index];
}); });
}, },
child: ListTile( child: ListTile(
title: Text( title: Text(
widget.proceduresList[index] widget.proceduresList[index].procedureName,
.procedureName, style: TextStyle(
style: TextStyle(fontSize: 14.0)), fontSize: 12.0,
letterSpacing: -0.48,
fontWeight: FontWeight.w600,
),
),
leading: Radio( leading: Radio(
value: widget.proceduresList[index], value: widget.proceduresList[index],
groupValue: widget.selectedProcedure, groupValue: widget.selectedProcedure,
@ -141,13 +133,8 @@ class _CovidPaymentDetailsState extends State<CovidPaymentDetails> {
onChanged: (value) { onChanged: (value) {
setState(() { setState(() {
widget.selectedProcedure = value; widget.selectedProcedure = value;
print(widget print(widget.selectedProcedure.procedureName);
.selectedProcedure.procedureName); getPaymentInfo(context, widget.projectID.toString(), widget.selectedProcedure.procedureID);
getPaymentInfo(
context,
widget.projectID.toString(),
widget.selectedProcedure
.procedureID);
}); });
}, },
), ),
@ -159,148 +146,197 @@ class _CovidPaymentDetailsState extends State<CovidPaymentDetails> {
], ],
), ),
), ),
Divider(),
Card(
shape: cardRadius(12),
child: Padding(
padding: const EdgeInsets.all(12.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(TranslationBase.of(context).testFee,
style: TextStyle(
color: Colors.black,
fontSize: 16.0,
fontWeight: FontWeight.w600,
letterSpacing: -0.64,
)),
Container(
width: double.infinity,
padding: EdgeInsets.only(top: 10, bottom: 3),
child: Row(
children: [
Expanded(
child: _getNormalText(TranslationBase.of(context).patientShareToDo),
),
Expanded(
child: _getNormalText(widget.covidPaymentInfoResponse.patientShareField.toString(), isBold: true),
)
],
),
),
mDivider(Colors.grey[100]),
Container(
width: double.infinity,
padding: EdgeInsets.only(top: 3, bottom: 3),
child: Row(
children: [
Expanded(
child: _getNormalText(TranslationBase.of(context).patientTaxToDo),
),
Expanded(
child: _getNormalText(widget.covidPaymentInfoResponse.patientTaxAmountField.toString(), isBold: true),
)
],
),
),
mDivider(Colors.grey[100]),
Container(
width: double.infinity,
padding: EdgeInsets.only(top: 3, bottom: 3),
child: Row(
children: [
Expanded(
child: _getNormalText(TranslationBase.of(context).patientShareTotalToDo),
),
Expanded(
child: _getNormalText(widget.covidPaymentInfoResponse.patientShareWithTaxField.toString(), isBold: true),
)
],
),
),
],
),
),
),
Container( Container(
alignment: Alignment.center, margin: EdgeInsets.fromLTRB(0.0, 0.0, 0.0, 0.0),
margin: child: Row(
EdgeInsets.only(left: 0.0, right: 20.0, top: 10.0), crossAxisAlignment: CrossAxisAlignment.center,
child: Text(TranslationBase.of(context).testFee, mainAxisAlignment: MainAxisAlignment.start,
style: TextStyle( children: [
color: Colors.black, Checkbox(
fontSize: 22.0, value: isAgree,
fontWeight: FontWeight.bold)), onChanged: (value) {
setState(() {
isAgree = !isAgree;
});
},
activeColor: Color(0xffB8382C),
),
Text(
TranslationBase.of(context).agreeTo,
style: TextStyle(
fontSize: 12,
letterSpacing: -0.48,
fontWeight: FontWeight.w600,
),
),
mWidth(3),
Text(
TranslationBase.of(context).termsConditoins,
style: TextStyle(
fontSize: 12,
letterSpacing: -0.48,
color: CustomColors.accentColor,
fontWeight: FontWeight.w600,
decoration: TextDecoration.underline,
),
),
],
),
), ),
Table( mFlex(1),
children: [
TableRow(children: [ Text(
TableCell( TranslationBase.of(context).payOptions,
child: _getNormalText(TranslationBase.of(context) textAlign: TextAlign.center,
.patientShareToDo)), style: TextStyle(
TableCell( fontSize: 12.0,
child: _getNormalText(widget fontWeight: FontWeight.w600,
.covidPaymentInfoResponse.patientShareField letterSpacing: -0.46,
.toString())), ),
]),
TableRow(children: [
TableCell(
child: _getNormalText(
TranslationBase.of(context).patientTaxToDo)),
TableCell(
child: _getNormalText(widget
.covidPaymentInfoResponse
.patientTaxAmountField
.toString())),
]),
TableRow(children: [
TableCell(
child: _getNormalText(TranslationBase.of(context)
.patientShareTotalToDo)),
TableCell(
child: _getNormalText(widget
.covidPaymentInfoResponse
.patientShareWithTaxField
.toString())),
]),
],
), ),
], Container(
), margin: EdgeInsets.only(top: 12, bottom: 12),
), child: Image.asset("assets/images/new-design/payment_options_invoice_confirmation.png", width: 300),
Container(
margin: EdgeInsets.fromLTRB(0.0, 15.0, 0.0, 5.0),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.start,
children: [
Checkbox(
value: isAgree,
onChanged: (value) {
setState(() {
isAgree = !isAgree;
});
},
activeColor: Color(0xffB8382C),
), ),
Texts(TranslationBase.of(context)
.iAgreeToTheTermsAndConditions),
], ],
), ),
), ),
Divider(
color: Colors.grey,
),
Container(
alignment: Alignment.center,
margin: EdgeInsets.fromLTRB(20.0, 15.0, 20.0, 5.0),
child: Text(TranslationBase.of(context).payOptions,
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 16.0,
fontWeight: FontWeight.bold,
fontFamily: "Open-Sans")),
),
Container(
alignment: Alignment.center,
margin: EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 5.0),
child: Image.asset(
"assets/images/new-design/payment_options_invoice_confirmation.png",
width: 300),
),
],
),
),
),
bottomSheet: Container(
margin: EdgeInsets.fromLTRB(10.0, 5.0, 10.0, 20.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: () {
cancel();
},
child: Text(TranslationBase.of(context).cancel,
style: TextStyle(fontSize: 18.0)),
),
),
),
), ),
Expanded( Container(
flex: 1, width: double.infinity,
child: Container( child: Card(
margin: EdgeInsets.fromLTRB(10.0, 0.0, 5.0, 0.0), elevation: 20,
child: ButtonTheme( margin: EdgeInsets.zero,
shape: RoundedRectangleBorder( child: Padding(
borderRadius: BorderRadius.circular(10.0), padding: const EdgeInsets.only(top: 12, bottom: 12, left: 12, right: 12),
), child: Row(
minWidth: MediaQuery.of(context).size.width * 0.7, children: [
height: 45.0, Expanded(
child: RaisedButton( flex: 1,
color: new Color(0xFF60686b), child: Container(
textColor: Colors.white, child: ButtonTheme(
disabledTextColor: Colors.white, shape: RoundedRectangleBorder(
disabledColor: Colors.grey[500], borderRadius: BorderRadius.circular(10.0),
onPressed: isAgree ? next : null, ),
child: Text(TranslationBase.of(context).next, minWidth: MediaQuery.of(context).size.width * 0.7,
style: TextStyle(fontSize: 18.0)), height: 45.0,
child: RaisedButton(
color: new Color(0xFF60686b),
textColor: Colors.white,
disabledTextColor: Colors.white,
disabledColor: Colors.grey[500],
onPressed: () {
cancel();
},
child: Text(
TranslationBase.of(context).cancel,
style: TextStyle(
fontSize: 16.0,
letterSpacing: -0.48,
fontWeight: FontWeight.w600,
),
),
),
),
),
),
mWidth(12),
Expanded(
flex: 1,
child: Container(
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: Colors.grey[500],
onPressed: isAgree ? next : null,
child: Text(
TranslationBase.of(context).next,
style: TextStyle(
fontSize: 16.0,
letterSpacing: -0.48,
fontWeight: FontWeight.w600,
),
),
),
),
),
),
],
), ),
), ),
), ),
), )
], ],
), ),
), ),
@ -321,19 +357,14 @@ class _CovidPaymentDetailsState extends State<CovidPaymentDetails> {
Navigator.pop(context); Navigator.pop(context);
} }
getPaymentInfo( getPaymentInfo(BuildContext context, String projectID, String selectedProcedureID) {
BuildContext context, String projectID, String selectedProcedureID) {
CovidDriveThruService service = new CovidDriveThruService(); CovidDriveThruService service = new CovidDriveThruService();
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
service service.getCovidPaymentInformation(context, int.parse(projectID), selectedProcedureID).then((res) {
.getCovidPaymentInformation(
context, int.parse(projectID), selectedProcedureID)
.then((res) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
setState(() { setState(() {
widget.covidPaymentInfoResponse = widget.covidPaymentInfoResponse = CovidPaymentInfoResponse.fromJson(res['COVID19_PatientShare']);
CovidPaymentInfoResponse.fromJson(res['COVID19_PatientShare']);
}); });
} else {} } else {}
}).catchError((err) { }).catchError((err) {
@ -341,16 +372,15 @@ class _CovidPaymentDetailsState extends State<CovidPaymentDetails> {
}); });
} }
_getNormalText(text) { _getNormalText(text, {bool isBold = false}) {
return Container( return Text(
margin: EdgeInsets.only(top: 20.0, right: 10.0), text,
child: Text(text, style: TextStyle(
textAlign: TextAlign.end, fontSize: isBold ? 12 : 10,
style: TextStyle( letterSpacing: -0.5,
fontSize: 15, color: isBold ? Colors.black : Colors.grey[700],
fontFamily: 'Open-Sans', fontWeight: FontWeight.w600,
letterSpacing: 0.5, ),
color: Colors.grey[700])),
); );
} }
} }

@ -4,14 +4,18 @@ import 'package:diplomaticquarterapp/models/Appointments/PatientShareResposne.da
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
import 'package:diplomaticquarterapp/pages/Blood/new_text_Field.dart'; import 'package:diplomaticquarterapp/pages/Blood/new_text_Field.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/QRCode.dart'; import 'package:diplomaticquarterapp/pages/BookAppointment/QRCode.dart';
import 'package:diplomaticquarterapp/pages/ToDoList/payment_method_select.dart';
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart'; import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/dragable_sheet.dart';
import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.dart'; import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
@ -41,6 +45,9 @@ class _CovidPaymentSummaryState extends State<CovidPaymentSummary> {
return AppScaffold( return AppScaffold(
appBarTitle: TranslationBase.of(context).covidTest, appBarTitle: TranslationBase.of(context).covidTest,
isShowAppBar: true, isShowAppBar: true,
showNewAppBar: true,
showNewAppBarTitle: true,
backgroundColor: CustomColors.appBackgroudGrey2Color,
body: SingleChildScrollView( body: SingleChildScrollView(
physics: ScrollPhysics(), physics: ScrollPhysics(),
child: Container( child: Container(
@ -48,11 +55,13 @@ class _CovidPaymentSummaryState extends State<CovidPaymentSummary> {
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Texts( Text(
TranslationBase.of(context).confirmThePayment, TranslationBase.of(context).confirmThePayment,
textAlign: TextAlign.center, style: TextStyle(
fontWeight: FontWeight.w500, fontSize: 19,
fontSize: 24, fontWeight: FontWeight.bold,
letterSpacing: -1.46,
),
), ),
SizedBox( SizedBox(
height: 12, height: 12,
@ -61,14 +70,14 @@ class _CovidPaymentSummaryState extends State<CovidPaymentSummary> {
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
Container( Container(
height: 100.0, height: 80.0,
padding: EdgeInsets.all(7.0), padding: EdgeInsets.all(7.0),
width: MediaQuery.of(context).size.width * 0.45, width: MediaQuery.of(context).size.width * 0.45,
child: widget.selectedPaymentMethod == "ApplePay" ? SvgPicture.asset(getImagePath(widget.selectedPaymentMethod)) : Image.asset(getImagePath(widget.selectedPaymentMethod)), child: widget.selectedPaymentMethod == "ApplePay" ? SvgPicture.asset(getImagePath(widget.selectedPaymentMethod)) : Image.asset(getImagePath(widget.selectedPaymentMethod)),
), ),
Texts( Texts(
'${widget.patientShareResponse.patientShareWithTax} ' + TranslationBase.of(context).sar, '${widget.patientShareResponse.patientShareWithTax} ' + TranslationBase.of(context).sar,
fontSize: 26, fontSize: 20,
bold: true, bold: true,
) )
], ],
@ -76,57 +85,70 @@ class _CovidPaymentSummaryState extends State<CovidPaymentSummary> {
SizedBox( SizedBox(
height: 12, height: 12,
), ),
Row(
children: [
Container(
width: 14,
height: 14,
decoration: containerRadius(CustomColors.accentColor, 200),
),
mFlex(1),
InkWell(
onTap: () {
showDraggableDialog(context, PaymentMethod());
},
child: Text(
TranslationBase.of(context).changePayment,
style: TextStyle(fontWeight: FontWeight.w600, fontSize: 12, letterSpacing: -0.48, decoration: TextDecoration.underline, color: CustomColors.accentColor),
),
)
],
),
SizedBox(
height: 12,
),
Row( Row(
children: [ children: [
Expanded( Expanded(
child: Container( flex: 1,
margin: EdgeInsets.all(3), child: showDetail(
child: NewTextFields( TranslationBase.of(context).fileNumber,
hintText: TranslationBase.of(context).fileNumber, projectViewModel.user.patientID.toString(),
initialValue: projectViewModel.user.patientID.toString(),
isEnabled: false,
),
), ),
), ),
mWidth(6),
Expanded( Expanded(
child: Container( flex: 1,
margin: EdgeInsets.all(3), child: showDetail(
child: NewTextFields( TranslationBase.of(context).name,
hintText: TranslationBase.of(context).name, projectViewModel.user.firstName.toString(),
initialValue: projectViewModel.user.firstName,
isEnabled: false,
),
), ),
), ),
], ],
), ),
SizedBox( SizedBox(
height: 12, height: 6,
),
NewTextFields(
hintText: TranslationBase.of(context).mobileNumber,
initialValue: projectViewModel.user.mobileNumber,
isEnabled: false,
), ),
showDetail(TranslationBase.of(context).mobileNumber, projectViewModel.user.mobileNumber),
SizedBox( SizedBox(
height: 12, height: 6,
),
NewTextFields(
hintText: TranslationBase.of(context).depositorName,
initialValue: projectViewModel.user.firstName + " " + projectViewModel.user.middleName + " " + projectViewModel.user.lastName,
isEnabled: false,
), ),
showDetail(
TranslationBase.of(context).depositorName,
projectViewModel.user.firstName + " " + projectViewModel.user.middleName + " " + projectViewModel.user.lastName,
)
], ],
), ),
), ),
), ),
bottomSheet: Container( bottomSheet: Container(
color: Colors.white,
height: MediaQuery.of(context).size.height * 0.1, height: MediaQuery.of(context).size.height * 0.1,
width: double.infinity, width: double.infinity,
padding: EdgeInsets.all(12), padding: EdgeInsets.all(12),
child: SecondaryButton( child: SecondaryButton(
textColor: Colors.white, textColor: Colors.white,
color: Theme.of(context).primaryColor, color: CustomColors.green,
label: TranslationBase.of(context).confirm.toUpperCase(), label: TranslationBase.of(context).confirm.toUpperCase(),
onTap: () { onTap: () {
startPaymentProcess(projectViewModel.user); startPaymentProcess(projectViewModel.user);
@ -136,6 +158,32 @@ class _CovidPaymentSummaryState extends State<CovidPaymentSummary> {
); );
} }
Widget showDetail(String title, String value) {
return 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(
title,
style: TextStyle(fontSize: 11, fontWeight: FontWeight.w600, letterSpacing: -0.64),
),
Text(
value,
style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, letterSpacing: -0.64, color: Colors.grey),
),
],
),
),
),
);
}
startPaymentProcess(AuthenticatedUser authenticatedUser) { startPaymentProcess(AuthenticatedUser authenticatedUser) {
AppoitmentAllHistoryResultList appo = new AppoitmentAllHistoryResultList(); AppoitmentAllHistoryResultList appo = new AppoitmentAllHistoryResultList();
appo.projectID = widget.patientShareResponse.projectID; appo.projectID = widget.patientShareResponse.projectID;

@ -33,7 +33,7 @@ class _PaymentMethodState extends State<PaymentMethod> {
Container( Container(
margin: EdgeInsets.fromLTRB(0.0, 15.0, 0.0, 0.0), margin: EdgeInsets.fromLTRB(0.0, 15.0, 0.0, 0.0),
alignment: Alignment.center, 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( Container(
margin: EdgeInsets.only(top: 25.0), margin: EdgeInsets.only(top: 25.0),
@ -147,40 +147,42 @@ class _PaymentMethodState extends State<PaymentMethod> {
], ],
), ),
), ),
Platform.isIOS ? Container( Platform.isIOS
margin: EdgeInsets.only(top: 25.0), ? Container(
child: Flex( margin: EdgeInsets.only(top: 25.0),
direction: Axis.horizontal, child: Flex(
children: <Widget>[ direction: Axis.horizontal,
Expanded( children: <Widget>[
child: Container( Expanded(
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( child: Container(
height: 120.0, child: InkWell(
padding: EdgeInsets.all(20.0), onTap: () {
child: SvgPicture.asset("assets/images/new-design/applepay.svg"), 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( : Container(),
child: Container(),
),
],
),
) : Container(),
SizedBox( SizedBox(
height: 150.0, height: 150.0,
), ),

@ -1,11 +1,15 @@
import 'package:diplomaticquarterapp/core/service/medical/labs_service.dart'; 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/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.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/input/text_field.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 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart'; import 'package:flutter_svg/flutter_svg.dart';
import 'package:provider/provider.dart';
class PassportUpdatePage extends StatefulWidget { class PassportUpdatePage extends StatefulWidget {
@override @override
@ -15,6 +19,7 @@ class PassportUpdatePage extends StatefulWidget {
class _PassportUpdatePageState extends State<PassportUpdatePage> { class _PassportUpdatePageState extends State<PassportUpdatePage> {
TextEditingController passportNumber = new TextEditingController(); TextEditingController passportNumber = new TextEditingController();
bool _isButtonDisabled; bool _isButtonDisabled;
ProjectViewModel projectViewModel;
@override @override
void initState() { void initState() {
@ -24,60 +29,223 @@ class _PassportUpdatePageState extends State<PassportUpdatePage> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
projectViewModel = Provider.of(context);
return AppScaffold( return AppScaffold(
appBarTitle: TranslationBase.of(context).passportNumber, appBarTitle: TranslationBase.of(context).passportNumber,
isShowAppBar: true, isShowAppBar: true,
isBottomBar: true, isBottomBar: true,
showNewAppBar: true, showNewAppBar: true,
showNewAppBarTitle: true, showNewAppBarTitle: true,backgroundColor: CustomColors.appBackgroudGrey2Color,
body: Container( body: Container(
child: SingleChildScrollView( child: Column(
child: Column( children: [
crossAxisAlignment: CrossAxisAlignment.center, Expanded(
children: [ child: SingleChildScrollView(
Container( child: Padding(
margin: EdgeInsets.all(45.0), padding: const EdgeInsets.all(12.0),
child: Text(TranslationBase.of(context).enterPassportNumber, textAlign: TextAlign.center, style: TextStyle(fontSize: 22.0, fontWeight: FontWeight.bold, color: Colors.black)), 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), Container(
child: SvgPicture.asset("assets/images/new-design/passport.svg", width: 250.0, fit: BoxFit.fill), 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), Widget inputWidget(String _labelText, String _hintText, TextEditingController _controller, {String prefix, bool isEnable = true, bool hasSelection = false}) {
hintText: TranslationBase.of(context).passportNumber, return Container(
)), padding: EdgeInsets.only(left: 16, right: 16, bottom: 15, top: 15),
Container( alignment: Alignment.center,
margin: EdgeInsets.only(top: 30.0, left: 45.0, right: 45.0, bottom: 10.0), decoration: BoxDecoration(
child: ButtonTheme( borderRadius: BorderRadius.circular(15),
shape: RoundedRectangleBorder( color: Colors.white,
borderRadius: BorderRadius.circular(10.0), 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, TextField(
height: 45.0, enabled: isEnable,
child: RaisedButton( scrollPadding: EdgeInsets.zero,
color: new Color(0xFFc5272d), keyboardType: TextInputType.number,
textColor: Colors.white, controller: _controller,
disabledTextColor: Colors.white, onChanged: (value) => {_onPassportTextChanged(value)},
disabledColor: Colors.red[300], style: TextStyle(
onPressed: () { fontSize: 14,
if (_isButtonDisabled == false) height: 21 / 14,
updatePassportNumber(); fontWeight: FontWeight.w400,
else color: Color(0xff2B353E),
AppToast.showErrorToast(message: TranslationBase.of(context).validPassportNumber); letterSpacing: -0.44,
}, ),
child: Text(TranslationBase.of(context).submit, style: TextStyle(fontSize: 18.0)), 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<PassportUpdatePage> {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
print(res['Covid19_Certificate_GetPassportList'][0]['PassportNo']); print(res['Covid19_Certificate_GetPassportList'][0]['PassportNo']);
passportNumber.text = 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; _isButtonDisabled = false;
} }
}).catchError((err) { }).catchError((err) {

@ -69,7 +69,9 @@ class TranslationBase {
String get enterDocName => localizedValues['enterDocName'][locale.languageCode]; String get enterDocName => localizedValues['enterDocName'][locale.languageCode];
String get search => localizedValues['search'][locale.languageCode]; String get search => localizedValues['search'][locale.languageCode];
String get noResultFound => localizedValues['noResultFound'][locale.languageCode]; String get noResultFound => localizedValues['noResultFound'][locale.languageCode];
String get pleaseEnterProductName => localizedValues['pleaseEnterProductName'][locale.languageCode]; String get pleaseEnterProductName => localizedValues['pleaseEnterProductName'][locale.languageCode];
String get bookNow => localizedValues['bookNow'][locale.languageCode]; String get bookNow => localizedValues['bookNow'][locale.languageCode];
@ -415,7 +417,9 @@ class TranslationBase {
String get sendEmail => localizedValues['sendEmail'][locale.languageCode]; String get sendEmail => localizedValues['sendEmail'][locale.languageCode];
String get close => localizedValues['close'][locale.languageCode]; String get close => localizedValues['close'][locale.languageCode];
String get closeIt => localizedValues['closeIt'][locale.languageCode]; String get closeIt => localizedValues['closeIt'][locale.languageCode];
String get booked => localizedValues['booked'][locale.languageCode]; String get booked => localizedValues['booked'][locale.languageCode];
String get confirmed => localizedValues['confirmed'][locale.languageCode]; String get confirmed => localizedValues['confirmed'][locale.languageCode];
@ -754,6 +758,10 @@ class TranslationBase {
String get save => localizedValues['Save'][locale.languageCode]; 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 userAgreement => localizedValues['UserAgreement'][locale.languageCode];
String get updateSuccessfully => localizedValues['UpdateSuccessfully'][locale.languageCode]; String get updateSuccessfully => localizedValues['UpdateSuccessfully'][locale.languageCode];
@ -810,6 +818,8 @@ class TranslationBase {
String get confirmThePayment => localizedValues['ConfirmThePayment'][locale.languageCode]; String get confirmThePayment => localizedValues['ConfirmThePayment'][locale.languageCode];
String get changePayment => localizedValues['changePayment'][locale.languageCode];
String get depositorName => localizedValues['DepositorName'][locale.languageCode]; String get depositorName => localizedValues['DepositorName'][locale.languageCode];
String get mobileNumber => localizedValues['MobileNumber'][locale.languageCode]; String get mobileNumber => localizedValues['MobileNumber'][locale.languageCode];
@ -907,16 +917,27 @@ class TranslationBase {
String get lakum => localizedValues['lakum'][locale.languageCode]; String get lakum => localizedValues['lakum'][locale.languageCode];
String get wishlist => localizedValues['wishlist'][locale.languageCode]; String get wishlist => localizedValues['wishlist'][locale.languageCode];
String get brands => localizedValues['brands'][locale.languageCode]; String get brands => localizedValues['brands'][locale.languageCode];
String get products => localizedValues['products'][locale.languageCode]; String get products => localizedValues['products'][locale.languageCode];
String get reviews => localizedValues['reviews'][locale.languageCode]; String get reviews => localizedValues['reviews'][locale.languageCode];
String get productDetails => localizedValues['productDetails'][locale.languageCode]; String get productDetails => localizedValues['productDetails'][locale.languageCode];
String get noReviewsAvailable => localizedValues['noReviewsAvailable'][locale.languageCode]; String get noReviewsAvailable => localizedValues['noReviewsAvailable'][locale.languageCode];
String get noLocationAvailable => localizedValues['noLocationAvailable'][locale.languageCode]; String get noLocationAvailable => localizedValues['noLocationAvailable'][locale.languageCode];
String get myPrescriptions => localizedValues['myPrescriptions'][locale.languageCode]; String get myPrescriptions => localizedValues['myPrescriptions'][locale.languageCode];
String get medicationRefill => localizedValues['medicationRefill'][locale.languageCode]; String get medicationRefill => localizedValues['medicationRefill'][locale.languageCode];
String get pillReminder => localizedValues['pillReminder'][locale.languageCode]; String get pillReminder => localizedValues['pillReminder'][locale.languageCode];
String get shippingAddresses => localizedValues['shippingAddresses'][locale.languageCode]; String get shippingAddresses => localizedValues['shippingAddresses'][locale.languageCode];
String get reachUs => localizedValues['reachUs'][locale.languageCode]; String get reachUs => localizedValues['reachUs'][locale.languageCode];
String get ourLocations => localizedValues['ourLocations'][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 yearOld => localizedValues['years-old'][locale.languageCode];
String get categorise => localizedValues['categorise'][locale.languageCode]; String get categorise => localizedValues['categorise'][locale.languageCode];
String get refine => localizedValues['refine'][locale.languageCode]; String get refine => localizedValues['refine'][locale.languageCode];
String get apply => localizedValues['apply'][locale.languageCode]; String get apply => localizedValues['apply'][locale.languageCode];
String get reset => localizedValues['reset'][locale.languageCode]; String get reset => localizedValues['reset'][locale.languageCode];
String get viewCategorise => localizedValues['viewCategorise'][locale.languageCode]; String get viewCategorise => localizedValues['viewCategorise'][locale.languageCode];
String get cart => localizedValues['cart'][locale.languageCode]; String get cart => localizedValues['cart'][locale.languageCode];
String get wishList => localizedValues['wishList'][locale.languageCode]; String get wishList => localizedValues['wishList'][locale.languageCode];
@ -1744,10 +1770,15 @@ class TranslationBase {
String get quantitySize => localizedValues['quantitySize'][locale.languageCode]; String get quantitySize => localizedValues['quantitySize'][locale.languageCode];
String get addToCart => localizedValues['addToCart'][locale.languageCode]; String get addToCart => localizedValues['addToCart'][locale.languageCode];
String get addToWishlist => localizedValues['addToWishlist'][locale.languageCode]; String get addToWishlist => localizedValues['addToWishlist'][locale.languageCode];
String get buyNow => localizedValues['buyNow'][locale.languageCode]; String get buyNow => localizedValues['buyNow'][locale.languageCode];
String get quantityShortcut => localizedValues['quantityShortcut'][locale.languageCode]; String get quantityShortcut => localizedValues['quantityShortcut'][locale.languageCode];
String get noData => localizedValues['noData'][locale.languageCode]; String get noData => localizedValues['noData'][locale.languageCode];
String get no_data => localizedValues['no_data'][locale.languageCode]; String get no_data => localizedValues['no_data'][locale.languageCode];
String get year => localizedValues['Year'][locale.languageCode]; String get year => localizedValues['Year'][locale.languageCode];

@ -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,
);
},
);
}
Loading…
Cancel
Save