From e81c91debf9d299736cc9388467d5766e0d8316a Mon Sep 17 00:00:00 2001 From: hussam al-habibeh Date: Mon, 14 Sep 2020 08:28:03 +0300 Subject: [PATCH] delivery info design update --- lib/pages/delivery/information_page.dart | 2 +- lib/uitl/utils.dart | 2 +- lib/widgets/delivery/customer_brief_card.dart | 249 +++++++++--------- 3 files changed, 128 insertions(+), 125 deletions(-) diff --git a/lib/pages/delivery/information_page.dart b/lib/pages/delivery/information_page.dart index ea0e171..02f0cf4 100644 --- a/lib/pages/delivery/information_page.dart +++ b/lib/pages/delivery/information_page.dart @@ -1 +1 @@ -import 'package:driverapp/app-icons/driver_app_icons.dart'; import 'package:driverapp/config/config.dart'; import 'package:driverapp/core/enum/viewstate.dart'; import 'package:driverapp/core/model/orders/pending_orders_res_model.dart'; import 'package:driverapp/core/model/orders/update_order_status_request_model.dart'; import 'package:driverapp/core/viewModels/orders_view_model.dart'; import 'package:driverapp/pages/base/base_view.dart'; import 'package:driverapp/pages/delivery/delivery_confirmed_page.dart'; import 'package:driverapp/uitl/utils.dart'; import 'package:driverapp/widgets/bottom_sheet/action_sheet_button.dart'; import 'package:driverapp/widgets/buttons/secondary_button.dart'; import 'package:driverapp/widgets/data_display/dialog/custom_dialog.dart'; import 'package:driverapp/widgets/data_display/text.dart'; import 'package:driverapp/widgets/delivery/customer_brief_card.dart'; import 'package:driverapp/widgets/delivery/delivery_action_button.dart'; import 'package:driverapp/widgets/delivery/package_content.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:hexcolor/hexcolor.dart'; import 'package:maps_launcher/maps_launcher.dart'; import 'package:url_launcher/url_launcher.dart'; import '../../uitl/translations_delegate_base.dart'; import '../../widgets/others/app_scaffold_widget.dart'; class InformationPage extends StatelessWidget { final PendingOrdersRes item; int orderStatus; InformationPage(this.item); @override Widget build(BuildContext context) { showDeliveryOptions(OrdersViewModel model) { showModalBottomSheet( backgroundColor: Colors.white, shape: RoundedRectangleBorder( borderRadius: BorderRadius.only( topLeft: Radius.circular(50.0), topRight: Radius.circular(50.0), ), ), context: context, builder: (BuildContext bc) { return ListView( children: [ Container( decoration: BoxDecoration( color: Colors.white, borderRadius: BorderRadius.only( topLeft: Radius.circular(50.0), topRight: Radius.circular(50.0), ), ), child: Column( mainAxisSize: MainAxisSize.min, children: [ SizedBox( height: 10, ), Center( child: Texts( TranslationBase.of(context).selectAction, color: Colors.black, fontSize: 22, ), ), SizedBox( height: 10, ), FractionallySizedBox( widthFactor: MediaQuery.of(context).orientation == Orientation.portrait ? 0.9 : 0.98, child: Container( height: MediaQuery.of(context).size.height * 0.45, decoration: BoxDecoration( color: Colors.white, borderRadius: BorderRadius.only( topLeft: Radius.circular(50.0), topRight: Radius.circular(50.0), ), ), width: double.infinity, child: ListView( children: [ Column( children: [ SizedBox( height: 3, child: Container( color: Hexcolor("#D5D5D5"), ), ), SizedBox( height: 15, ), ActionSheetButton( label: TranslationBase.of(context).delivered, icon: DriverApp.deliverd_icon, onTap: () { selectAction(context, 3, model); }, ), SizedBox(height: 15), ActionSheetButton( label: TranslationBase.of(context) .deliveredAccepted, icon: DriverApp.not_available, onTap: () { selectAction(context, 4, model); }, ), SizedBox(height: 15), ActionSheetButton( label: TranslationBase.of(context) .deliveredRejected, icon: DriverApp.rejected_icon, onTap: () { selectAction(context, 5, model); }, ), SizedBox(height: 15), ActionSheetButton( label: TranslationBase.of(context).canceled, icon: DriverApp.not_reachable_icon, onTap: () { selectAction(context, 6, model); }, ), SizedBox(height: 15), ], ), ], ), ), ) ], ), ), ], ); }); } return BaseView( builder: (_, model, w) => AppScaffold( isShowAppBar: true, appBarColor: Color(0xff49C1BC), arrowColor: Colors.white, titleColor: Colors.white, appBarTitle: TranslationBase.of(context).deliveryInfo, isAppBarGradient: true, body: Container( child: Container( decoration: BoxDecoration(gradient: LINEAR_GRADIENT), child: ListView( children: [ Column( children: [ Stack( children: [ // Container( // width: MediaQuery.of(context).size.width, // height: MediaQuery.of(context).size.width, // ), Container( width: MediaQuery.of(context).size.width * 1.0, height: MediaQuery.of(context).orientation == Orientation.portrait ? MediaQuery.of(context).size.height * 0.88 : MediaQuery.of(context).size.height * 1.7, margin: EdgeInsets.only( top: MediaQuery.of(context).orientation == Orientation.portrait ? MediaQuery.of(context).size.width * 0.23 : MediaQuery.of(context).size.width * 0.13), decoration: BoxDecoration( color: Theme.of(context).scaffoldBackgroundColor, borderRadius: BorderRadius.only( topLeft: Radius.circular(45), topRight: Radius.circular(45)), ), child: Column( mainAxisAlignment: MainAxisAlignment.center, children: [ SizedBox( height: MediaQuery.of(context).orientation == Orientation.portrait ? MediaQuery.of(context).size.height * 0.2 : MediaQuery.of(context).size.height * 0.29, //MediaQuery.of(context).size.width * 0.005, ), Row( mainAxisAlignment: MainAxisAlignment.center, children: [ DeliveryInfoButton( btnColor: Colors.white, //Color(0xffED1C24), btnIcon: Icon(DriverApp.location_1, size: MediaQuery.of(context) .orientation == Orientation.portrait ? 50 : 90, color: Color(0xffED1C24)), btnName: TranslationBase.of(context).location, btnFunction: () { MapsLauncher.launchCoordinates( item.latitude, item.longitude); }, ), DeliveryInfoButton( btnColor: Colors.white, //Color(0xFF61B260), btnIcon: Icon( DriverApp.whatsapp, size: MediaQuery.of(context).orientation == Orientation.portrait ? 50 : 90, color: Color(0xFF5EA34A), ), btnName: 'Whatsapp', btnFunction: () {}, ), DeliveryInfoButton( btnColor: Colors.white, //Color(0xFFFCB657), btnIcon: Icon( DriverApp.message, size: MediaQuery.of(context).orientation == Orientation.portrait ? 50 : 90, color: Color(0xffFFA540), ), btnName: TranslationBase.of(context).sms, btnFunction: () {}, ), DeliveryInfoButton( btnColor: Colors .white, //Theme.of(context).primaryColor, btnIcon: Icon( DriverApp.call, size: MediaQuery.of(context).orientation == Orientation.portrait ? 50 : 90, color: Theme.of(context).primaryColor, ), btnName: TranslationBase.of(context).call, btnFunction: () => launch("tel://" + item.mobileNumber), ), ], ), SizedBox( height: MediaQuery.of(context).size.width * 0.08, ), Container( margin: EdgeInsets.only( left: MediaQuery.of(context).size.width * 0.05, right: MediaQuery.of(context).size.width * 0.05, ), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ Padding( padding: const EdgeInsets.only(left: 8), child: Text( TranslationBase.of(context) .packageContent, style: TextStyle( fontWeight: FontWeight.w900, fontSize: 20), ), ), SizedBox( height: MediaQuery.of(context).size.width * 0.05, ), Padding( padding: const EdgeInsets.only(left: 10), child: Column( children: List.generate( item.itemsQuantitiesList != null ? item .itemsQuantitiesList.length : 0, (index) { return packageContent( packageName: item .itemsQuantitiesList[index] .itemName .toString(), packageCount: item .itemsQuantitiesList[index] .quantity .toString(), ); }), ), ), ], ), ), SizedBox( height: MediaQuery.of(context).size.width * 0.1, ), Container( margin: MediaQuery.of(context).orientation == Orientation.portrait ? EdgeInsets.all(8.0) : EdgeInsets.symmetric(horizontal: 12.0), child: SecondaryButton( label: TranslationBase.of(context).clientReached, onTap: () { showDeliveryOptions(model); }, ), ), ], ), ), CustomerBriefCard( itemId: item.orderID, customerFirstName: item.firstName, customerLastName: item.lastName, mobileNo: item.mobileNumber, totalPayment: item.amount, deliveryTime: item.orderCreatedOn, longitude: item.longitude, latitude: item.latitude, ), ], ), ], ), ], ), ), ), ), ); } selectAction(BuildContext context, orderStatus, OrdersViewModel model) { String orderStatusText; this.orderStatus = orderStatus; switch (orderStatus) { case 3: orderStatusText = TranslationBase.of(context).delivered; break; case 4: orderStatusText = TranslationBase.of(context).deliveredAccepted; break; case 5: orderStatusText = TranslationBase.of(context).deliveredRejected; break; case 6: orderStatusText = TranslationBase.of(context).canceled; break; } showDialog( context: context, builder: (BuildContext context) { return CustomDialog( orderStatusText: orderStatusText, callService: () { updateOrderStatus(context, model); }, model: model, ); }); } updateOrderStatus(BuildContext context, OrdersViewModel model) async { UpdateOrderStatusRequestModel updateOrderStatusRequestModel = UpdateOrderStatusRequestModel( deliveryOrderID: item.orderID, deliveryOrderStatus: orderStatus, rejectionReason: "NO Reason", cancleReason: ""); await model.updateOrderStatus(updateOrderStatusRequestModel); if (model.state == ViewState.ErrorLocal) { Utils.showErrorToast(model.error); Navigator.of(context).pop(); model.hideBottomSheet(); } else { Navigator.of(context).pop(); model.hideBottomSheet(); Navigator.pushReplacement( context, MaterialPageRoute( builder: (context) => DeliveryConfirmedPage(item), ), ); } } } \ No newline at end of file +import 'package:driverapp/app-icons/driver_app_icons.dart'; import 'package:driverapp/config/config.dart'; import 'package:driverapp/core/enum/viewstate.dart'; import 'package:driverapp/core/model/orders/pending_orders_res_model.dart'; import 'package:driverapp/core/model/orders/update_order_status_request_model.dart'; import 'package:driverapp/core/viewModels/orders_view_model.dart'; import 'package:driverapp/pages/base/base_view.dart'; import 'package:driverapp/pages/delivery/delivery_confirmed_page.dart'; import 'package:driverapp/uitl/utils.dart'; import 'package:driverapp/widgets/bottom_sheet/action_sheet_button.dart'; import 'package:driverapp/widgets/buttons/secondary_button.dart'; import 'package:driverapp/widgets/data_display/dialog/custom_dialog.dart'; import 'package:driverapp/widgets/data_display/text.dart'; import 'package:driverapp/widgets/delivery/customer_brief_card.dart'; import 'package:driverapp/widgets/delivery/delivery_action_button.dart'; import 'package:driverapp/widgets/delivery/package_content.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:hexcolor/hexcolor.dart'; import 'package:maps_launcher/maps_launcher.dart'; import 'package:url_launcher/url_launcher.dart'; import '../../uitl/translations_delegate_base.dart'; import '../../widgets/others/app_scaffold_widget.dart'; class InformationPage extends StatelessWidget { final PendingOrdersRes item; int orderStatus; InformationPage(this.item); @override Widget build(BuildContext context) { showDeliveryOptions(OrdersViewModel model) { showModalBottomSheet( backgroundColor: Colors.white, shape: RoundedRectangleBorder( borderRadius: BorderRadius.only( topLeft: Radius.circular(50.0), topRight: Radius.circular(50.0), ), ), context: context, builder: (BuildContext bc) { return ListView( children: [ Container( decoration: BoxDecoration( color: Colors.white, borderRadius: BorderRadius.only( topLeft: Radius.circular(50.0), topRight: Radius.circular(50.0), ), ), child: Column( mainAxisSize: MainAxisSize.min, children: [ SizedBox( height: 10, ), Center( child: Texts( TranslationBase.of(context).selectAction, color: Colors.black, fontSize: 22, ), ), SizedBox( height: 10, ), FractionallySizedBox( widthFactor: MediaQuery.of(context).orientation == Orientation.portrait ? 0.9 : 0.98, child: Container( height: MediaQuery.of(context).size.height * 0.45, decoration: BoxDecoration( color: Colors.white, borderRadius: BorderRadius.only( topLeft: Radius.circular(50.0), topRight: Radius.circular(50.0), ), ), width: double.infinity, child: ListView( children: [ Column( children: [ SizedBox( height: 3, child: Container( color: Hexcolor("#D5D5D5"), ), ), SizedBox( height: 15, ), ActionSheetButton( label: TranslationBase.of(context).delivered, icon: DriverApp.deliverd_icon, onTap: () { selectAction(context, 3, model); }, ), SizedBox(height: 15), ActionSheetButton( label: TranslationBase.of(context) .deliveredAccepted, icon: DriverApp.not_available, onTap: () { selectAction(context, 4, model); }, ), SizedBox(height: 15), ActionSheetButton( label: TranslationBase.of(context) .deliveredRejected, icon: DriverApp.rejected_icon, onTap: () { selectAction(context, 5, model); }, ), SizedBox(height: 15), ActionSheetButton( label: TranslationBase.of(context).canceled, icon: DriverApp.not_reachable_icon, onTap: () { selectAction(context, 6, model); }, ), SizedBox(height: 15), ], ), ], ), ), ) ], ), ), ], ); }); } return BaseView( builder: (_, model, w) => AppScaffold( isShowAppBar: true, appBarColor: Color(0xff49C1BC), arrowColor: Colors.white, titleColor: Colors.white, appBarTitle: TranslationBase.of(context).deliveryInfo, isAppBarGradient: true, body: Container( child: Container( decoration: BoxDecoration(gradient: LINEAR_GRADIENT), child: ListView( children: [ Column( children: [ Stack( children: [ // Container( // width: MediaQuery.of(context).size.width, // height: MediaQuery.of(context).size.width, // ), Padding( padding: const EdgeInsets.only(top: 75.0), child: Container( width: MediaQuery.of(context).size.width * 1.0, height: MediaQuery.of(context).orientation == Orientation.portrait ? MediaQuery.of(context).size.height * 0.70 : MediaQuery.of(context).size.height * 1.7, margin: EdgeInsets.only( top: MediaQuery.of(context).orientation == Orientation.portrait ? MediaQuery.of(context).size.width * 0.23 : MediaQuery.of(context).size.width * 0.13), decoration: BoxDecoration( color: Theme.of(context).scaffoldBackgroundColor, borderRadius: BorderRadius.only( topLeft: Radius.circular(45), topRight: Radius.circular(45)), ), child: Column( mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: [ SizedBox( height: MediaQuery.of(context).orientation == Orientation.portrait ? MediaQuery.of(context).size.height * 0.05 : MediaQuery.of(context).size.height * 0.29, //MediaQuery.of(context).size.width * 0.005, ), Padding( padding: MediaQuery.of(context).orientation == Orientation.portrait ? EdgeInsets.only(top: 60.0) : EdgeInsets.only(top: 15.0), child: Row( mainAxisAlignment: MainAxisAlignment.center, children: [ DeliveryInfoButton( btnColor: Colors.white, //Color(0xffED1C24), btnIcon: Icon(DriverApp.location_1, size: MediaQuery.of(context) .orientation == Orientation.portrait ? 50 : 90, color: Color(0xffED1C24)), btnName: TranslationBase.of(context) .location, btnFunction: () { MapsLauncher.launchCoordinates( item.latitude, item.longitude); }, ), DeliveryInfoButton( btnColor: Colors.white, //Color(0xFF61B260), btnIcon: Icon( DriverApp.whatsapp, size: MediaQuery.of(context) .orientation == Orientation.portrait ? 50 : 90, color: Color(0xFF5EA34A), ), btnName: 'Whatsapp', btnFunction: () {}, ), DeliveryInfoButton( btnColor: Colors.white, //Color(0xFFFCB657), btnIcon: Icon( DriverApp.message, size: MediaQuery.of(context) .orientation == Orientation.portrait ? 50 : 90, color: Color(0xffFFA540), ), btnName: TranslationBase.of(context).sms, btnFunction: () {}, ), DeliveryInfoButton( btnColor: Colors .white, //Theme.of(context).primaryColor, btnIcon: Icon( DriverApp.call, size: MediaQuery.of(context) .orientation == Orientation.portrait ? 50 : 90, color: Theme.of(context).primaryColor, ), btnName: TranslationBase.of(context).call, btnFunction: () => launch( "tel://" + item.mobileNumber), ), ], ), ), SizedBox( height: MediaQuery.of(context).size.width * 0.08, ), Container( margin: EdgeInsets.only( left: MediaQuery.of(context).size.width * 0.05, right: MediaQuery.of(context).size.width * 0.05, ), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ Padding( padding: const EdgeInsets.only(left: 8), child: Text( TranslationBase.of(context) .packageContent, style: TextStyle( fontWeight: FontWeight.w900, fontSize: 20), ), ), SizedBox( height: MediaQuery.of(context).size.width * 0.05, ), Padding( padding: const EdgeInsets.only(left: 10), child: Column( children: List.generate( item.itemsQuantitiesList != null ? item.itemsQuantitiesList .length : 0, (index) { return packageContent( packageName: item .itemsQuantitiesList[index] .itemName .toString(), packageCount: item .itemsQuantitiesList[index] .quantity .toString(), ); }), ), ), ], ), ), SizedBox( height: MediaQuery.of(context).size.width * 0.1, ), Container( margin: MediaQuery.of(context).orientation == Orientation.portrait ? EdgeInsets.all(8.0) : EdgeInsets.symmetric(horizontal: 12.0), child: SecondaryButton( label: TranslationBase.of(context) .clientReached, onTap: () { showDeliveryOptions(model); }, ), ), ], ), ), ), CustomerBriefCard( itemId: item.orderID, customerFirstName: item.firstName, customerLastName: item.lastName, mobileNo: item.mobileNumber, totalPayment: item.amount, deliveryTime: item.orderCreatedOn, longitude: item.longitude, latitude: item.latitude, ), ], ), ], ), ], ), ), ), ), ); } selectAction(BuildContext context, orderStatus, OrdersViewModel model) { String orderStatusText; this.orderStatus = orderStatus; switch (orderStatus) { case 3: orderStatusText = TranslationBase.of(context).delivered; break; case 4: orderStatusText = TranslationBase.of(context).deliveredAccepted; break; case 5: orderStatusText = TranslationBase.of(context).deliveredRejected; break; case 6: orderStatusText = TranslationBase.of(context).canceled; break; } showDialog( context: context, builder: (BuildContext context) { return CustomDialog( orderStatusText: orderStatusText, callService: () { updateOrderStatus(context, model); }, model: model, ); }); } updateOrderStatus(BuildContext context, OrdersViewModel model) async { UpdateOrderStatusRequestModel updateOrderStatusRequestModel = UpdateOrderStatusRequestModel( deliveryOrderID: item.orderID, deliveryOrderStatus: orderStatus, rejectionReason: "NO Reason", cancleReason: ""); await model.updateOrderStatus(updateOrderStatusRequestModel); if (model.state == ViewState.ErrorLocal) { Utils.showErrorToast(model.error); Navigator.of(context).pop(); model.hideBottomSheet(); } else { Navigator.of(context).pop(); model.hideBottomSheet(); Navigator.pushReplacement( context, MaterialPageRoute( builder: (context) => DeliveryConfirmedPage(item), ), ); } } } \ No newline at end of file diff --git a/lib/uitl/utils.dart b/lib/uitl/utils.dart index 787703d..5fbc743 100644 --- a/lib/uitl/utils.dart +++ b/lib/uitl/utils.dart @@ -55,7 +55,7 @@ class Utils { List formattedNamesList = []; names.forEach((name) { name = name.toLowerCase(); - name = name[0].toUpperCase() + name.substring(1); + name = name != "" ? name[0].toUpperCase() + name.substring(1) : ""; formattedNamesList.add(name); }); diff --git a/lib/widgets/delivery/customer_brief_card.dart b/lib/widgets/delivery/customer_brief_card.dart index 8a611f4..d2f667b 100644 --- a/lib/widgets/delivery/customer_brief_card.dart +++ b/lib/widgets/delivery/customer_brief_card.dart @@ -2,6 +2,7 @@ import 'package:driverapp/config/size_config.dart'; import 'package:driverapp/uitl/utils.dart'; import 'package:driverapp/widgets/delivery/distance_in_kilometers.dart'; import 'package:flutter/material.dart'; +import 'package:hexcolor/hexcolor.dart'; import '../../uitl/date_uitl.dart'; import '../../uitl/translations_delegate_base.dart'; @@ -36,145 +37,147 @@ class CustomerBriefCard extends StatelessWidget { @override Widget build(BuildContext context) { return Center( - child: Container( - width: MediaQuery.of(context).orientation == Orientation.landscape - ? SizeConfig.widthMultiplier * 125.0 - : SizeConfig.widthMultiplier * 90.0, - height: 290, - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.only( - topLeft: Radius.circular(30), - topRight: Radius.circular(30), - bottomRight: Radius.circular(30), - bottomLeft: Radius.circular(30)), - boxShadow: [ - BoxShadow( - color: Colors.grey.withOpacity(0.3), - spreadRadius: 5, - blurRadius: 7, - offset: Offset(0, 3), - ), - ], - ), + child: Padding( + padding: EdgeInsets.only(bottom: 0.0), child: Container( - padding: EdgeInsets.only(left: 30, top: 20, right: 30), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Row( - children: [ - Expanded( - flex: 3, - child: Text( - 'ID: ${itemId}', - style: TextStyle( - color: Color(0xff636363), - fontWeight: FontWeight.w500, - fontSize: 17.5), + width: MediaQuery.of(context).orientation == Orientation.landscape + ? SizeConfig.widthMultiplier * 125.0 + : SizeConfig.widthMultiplier * 90.0, + height: 290, + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.only( + topLeft: Radius.circular(30), + topRight: Radius.circular(30), + bottomRight: Radius.circular(30), + bottomLeft: Radius.circular(30)), + boxShadow: [ + BoxShadow( + color: Colors.grey.withOpacity(0.3), + spreadRadius: 5, + blurRadius: 7, + offset: Offset(0, 3), + ), + ], + ), + child: Container( + padding: EdgeInsets.only(left: 30, top: 20, right: 30), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + children: [ + Expanded( + flex: 3, + child: Text( + 'ID: ${itemId}', + style: TextStyle( + color: Color(0xff636363), + fontWeight: FontWeight.w500, + fontSize: 17.5), + ), ), - ), - Expanded( - child: Padding( - padding: EdgeInsets.all(8.0), - child: DistanceInKilometers( - distanceInKilometers: 0.0, + Expanded( + child: Padding( + padding: EdgeInsets.all(8.0), + child: DistanceInKilometers( + distanceInKilometers: 0.0, + ), ), ), + ], + ), + SizedBox( + height: MediaQuery.of(context).size.width * 0.02, + ), + Text( + Utils.formatStringToPascalCase( + '${customerFirstName} ${customerLastName}'), + style: TextStyle( + color: Color(0xff343333), + fontWeight: FontWeight.bold, + fontSize: 20.0, ), - ], - ), - SizedBox( - height: MediaQuery.of(context).size.width * 0.02, - ), - Text( - Utils.formatStringToPascalCase( - '${customerFirstName} ${customerLastName}'), - style: TextStyle( - fontSize: 20, - fontWeight: FontWeight.w500, - color: Color(0xff343333), - fontFamily: 'Metropolis', ), - ), - SizedBox( - height: MediaQuery.of(context).size.width * 0.019, - ), - Text( - mobileNo, - style: TextStyle( - color: Color(0xff14A0A9), fontWeight: FontWeight.w400), - ), - SizedBox( - height: MediaQuery.of(context).size.width * 0.005, - ), + SizedBox( + height: MediaQuery.of(context).size.width * 0.019, + ), + Text( + mobileNo, + style: TextStyle( + color: Color(0xff14A0A9), fontWeight: FontWeight.w400), + ), + SizedBox( + height: MediaQuery.of(context).size.width * 0.005, + ), // Text( // 'Olaya street, behind KFC resturant, next to kingdom towers 2nd floor ofice 277', // style: TextStyle( // color: Color(0xFF464748), fontWeight: FontWeight.w600), // ), - SizedBox( - height: 10, - ), - SizedBox( - height: 10.0, - child: Center( - child: Container( - margin: EdgeInsetsDirectional.only(start: 1.0, end: 1.0), - height: 1.0, - color: Colors.grey, + SizedBox( + height: 10, + ), + SizedBox( + height: 10.0, + child: Center( + child: Container( + margin: EdgeInsetsDirectional.only(start: 1.0, end: 1.0), + height: 1.0, + color: Colors.grey, + ), ), ), - ), - SizedBox( - height: 20, - ), - Column( - children: [ - Row( - children: [ - Expanded( - flex: 2, - child: Text( - TranslationBase.of(context).payment, - textAlign: TextAlign.start, - ), - ), - SizedBox( - width: 170, - ), - Expanded( - child: Text( - totalPayment.toString(), - textAlign: TextAlign.end, - style: TextStyle(fontWeight: FontWeight.w400), + SizedBox( + height: 20, + ), + Column( + children: [ + Row( + children: [ + Expanded( + flex: 2, + child: Text( + TranslationBase.of(context).payment, + textAlign: TextAlign.start, + ), ), - ), - ], - ), - SizedBox( - height: MediaQuery.of(context).size.width * 0.03, - ), - Row( - children: [ - Expanded( - flex: 1, - child: Text( - TranslationBase.of(context).delivryTime, - textAlign: TextAlign.start, + SizedBox( + width: 170, ), - ), - Expanded( - child: Text( - '${DateUtil.getMonthDayYearDateFormatted(DateUtil.convertStringToDate(deliveryTime))} ${(DateUtil.convertStringToHours(deliveryTime))}', + Expanded( + child: Text( + totalPayment.toString(), textAlign: TextAlign.end, - style: TextStyle(fontWeight: FontWeight.w400)), - ), - ], - ) - ], - ), - ], + style: TextStyle(fontWeight: FontWeight.w400), + ), + ), + ], + ), + SizedBox( + height: MediaQuery.of(context).size.width * 0.03, + ), + Row( + children: [ + Expanded( + flex: 1, + child: Text( + TranslationBase.of(context).delivryTime, + textAlign: TextAlign.start, + ), + ), + Expanded( + child: Text( + '${DateUtil.getMonthDayYearDateFormatted(DateUtil.convertStringToDate(deliveryTime))} ${(DateUtil.convertStringToHours(deliveryTime))}', + textAlign: TextAlign.end, + style: TextStyle(fontWeight: FontWeight.w400)), + ), + ], + ) + ], + ), + ], + ), ), ), ),