Merge branch 'development' into 'master'

Development

See merge request Cloud_Solution/driver-app!17
setting_page
Mohammad Aljammal 5 years ago
commit 4b953be9e7

@ -11,7 +11,7 @@ const Map<String, Map<String, String>> localizedValues = {
'services': {'en': 'SERVICES', 'ar': 'الخدمات'},
'mySchedule': {'en': 'My Schedule', 'ar': 'جدولي'},
'logout': {'en': 'Logout', 'ar': 'تسجيل خروج'},
'booking':{'en': 'Booking','ar':'حجز'},
'booking': {'en': 'Booking', 'ar': 'حجز'},
'enterId': {'en': 'User Name', 'ar': 'اسم المستخدم'},
'pleaseEnterYourID': {
'en': 'Please enter your ',
@ -26,13 +26,19 @@ const Map<String, Map<String, String>> localizedValues = {
'en': 'Please insert username and password to login',
'ar': 'الرجاء إدخال اسم المستخدم وكلمة المرور لتسجيل الدخول'
},
'forgotPassword': {
'en': 'Forgot Password?',
'ar': 'هل نسيت كلمة المرور ؟'
'forgotPassword': {'en': 'Forgot Password?', 'ar': 'هل نسيت كلمة المرور ؟'},
'login': {'en': 'Login', 'ar': 'تسجيل الدخول'},
'haveGreatDay': {'en': 'have a great day ,', 'ar': 'أتمنى لك يوما جميلا '},
'youHave': {'en': 'You Have', 'ar': 'يوجد لديك'},
'deliveredPackages': {'en': 'Delivered Packages', 'ar': 'الطرود المسلمة'},
'seeAll': {'en': 'See All', 'ar': 'اظهار الكل'},
'nearestDropOffs': {'en': 'nearest drop-offs', 'ar': 'أقرب نقطة إنزال'},
'undeliveredPackages': {
'en': 'Undelivered Packages',
'ar': 'الطرود التي لم يتم تسليمها'
},
'login': {
'en': 'Login',
'ar': 'تسجيل الدخول'
}
'away': {'en': 'away', 'ar': 'بعيدا'},
'scan': {'en': 'Scan', 'ar': 'مسح'},
'scan2': {'en': 'away', 'ar': 'بعيدا'},
'scanDb': {'en': 'away', 'ar': 'بعيدا'},
};

@ -1,5 +1,3 @@
import 'dart:ffi';
class PendingOrders {
int driverID;
String searchKey;
@ -11,18 +9,21 @@ class PendingOrders {
String firstName;
String lastName;
String mobileNumber;
int distanceInKilometers;
PendingOrders(
{this.driverID,
this.searchKey,
this.pageSize,
this.pageIndex,
this.tokenID,
this.userID,
this.mobileNo,
this.firstName,
this.lastName,
this.mobileNumber});
PendingOrders({
this.driverID,
this.searchKey,
this.pageSize,
this.pageIndex,
this.tokenID,
this.userID,
this.mobileNo,
this.firstName,
this.lastName,
this.mobileNumber,
this.distanceInKilometers,
});
PendingOrders.fromJson(Map<String, dynamic> json) {
driverID = json['DriverID'];
@ -35,6 +36,7 @@ class PendingOrders {
firstName = json['FirstName'];
lastName = json['LastName'];
mobileNumber = json['MobileNumber'];
distanceInKilometers = json['DistanceInKilometers'];
}
Map<String, dynamic> toJson() {

@ -34,9 +34,10 @@ class BaseAppClient {
body['UserID'] = '${doctorProfile?.userID}';
body['TokenID'] = token;
body['MobileNo'] = doctorProfile?.mobileNumber;
body['Channel'] = CHANNEL;
}
body['Channel'] = CHANNEL;
print("URL : $url");
print("Body : ${json.encode(body)}");

@ -1,15 +1,16 @@
import 'package:barcode_scan/platform_wrapper.dart';
import 'package:driverapp/config/size_config.dart';
import 'package:driverapp/core/enum/viewstate.dart';
import 'package:driverapp/core/viewModels/orders_view_model.dart';
import 'package:driverapp/pages/delivery/information_page.dart';
import 'package:driverapp/pages/orders/pending_orders_page.dart';
import 'package:driverapp/uitl/app_toast.dart';
import 'package:driverapp/uitl/utils.dart';
import 'package:driverapp/widgets/others/app_scaffold_widget.dart';
import 'package:driverapp/widgets/others/rounded_container.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import '../base/base_view.dart';
import 'package:flutter/cupertino.dart';
import 'package:driverapp/app-icons/driver_app_icons.dart';
import 'package:driverapp/widgets/others/rounded_container.dart';
import 'package:driverapp/pages/orders/pending_orders_page.dart';
class DashboardScreen extends StatefulWidget {
@override
@ -19,12 +20,12 @@ class DashboardScreen extends StatefulWidget {
class _DashboardScreenState extends State<DashboardScreen> {
@override
Widget build(BuildContext context) {
int orderId;
return BaseView<OrdersViewModel>(
onModelReady: (model) => model.getPendingOrders(),
builder:
(BuildContext context, OrdersViewModel model, Widget child) =>
Scaffold(
backgroundColor: Color(0xffF4F9FA),
AppScaffold(
body: Column(
// mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
@ -337,98 +338,114 @@ class _DashboardScreenState extends State<DashboardScreen> {
],
),
),
Column(
children: <Widget>[
ListView.builder(
shrinkWrap: true,
scrollDirection: Axis.vertical,
itemCount: //model.orders == null ? 0 : model.orders.length,
3,
itemBuilder: (BuildContext context, int index) {
return Padding(
padding: EdgeInsets.symmetric(horizontal: 12.2),
child: RoundedContainer(
height: MediaQuery.of(context).size.height * 0.108,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Expanded(
flex: 1,
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Padding(
padding: EdgeInsets.only(left: 22.0),
child: Image.asset(
'assets/images/location.png'),
)
],
),
),
if (model.orders.length != 0)
Expanded(
child: ListView.builder(
shrinkWrap: true,
scrollDirection: Axis.vertical,
itemCount: //model.orders == null ? 0 : model.orders.length,
3,
itemBuilder: (BuildContext context, int index) {
return Padding(
padding: EdgeInsets.symmetric(horizontal: 12.2),
child: InkWell(
child: RoundedContainer(
height: MediaQuery.of(context).size.height * 0.108,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Expanded(
flex: 3,
flex: 1,
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Text(
model.orders[index].firstName +
' ' +
model.orders[index].lastName,
style: TextStyle(fontSize: 18.0),
),
Text(
model.orders[index].mobileNumber,
style: TextStyle(
color: Color(0xff30B7B9),
fontWeight: FontWeight.w600,
fontSize: 15.0),
),
Expanded(
child: Text(
'Olaya ST, Behind kfc next to king ',
style:
TextStyle(color: Colors.black45),
Padding(
padding: EdgeInsets.only(left: 22.0),
child: Image.asset(
'assets/images/location.png',
height: MediaQuery.of(context)
.size
.height *
0.10,
width: MediaQuery.of(context)
.size
.width *
0.09,
),
)
],
),
),
Padding(
padding: EdgeInsets.all(10.0),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
if (model.orders.length != 0)
Expanded(
flex: 3,
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: <Widget>[
Text(
model.orders[index].firstName +
' ' +
model.orders[index].lastName,
style: TextStyle(fontSize: 18.0),
),
Text(
model.orders[index].mobileNumber,
style: TextStyle(
color: Color(0xff30B7B9),
fontWeight: FontWeight.w600,
fontSize: 15.0),
),
Expanded(
child: Text(
'Olaya ST, Behind kfc next to king ,Olaya ST ',
style: TextStyle(color: Colors.black45),
),
),
],
),
),
Padding(
padding: EdgeInsets.all(10.0),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Expanded(
child: CircleAvatar(
backgroundColor: Colors.black45,
radius: 28.0,
child: CircleAvatar(
backgroundColor: Colors.black45,
radius: 28.0,
child: CircleAvatar(
backgroundColor: Colors.white,
maxRadius: 25.1,
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Text(
'3 K.m \n away',
style: TextStyle(
color: Color(0xff30B7B9),
fontSize: 12.5,
fontWeight: FontWeight.w600),
),
backgroundColor: Colors.white,
maxRadius: 25.1,
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Text(
'3 K.m \n away',
style: TextStyle(
color: Color(0xff30B7B9),
fontSize: 12.5,
fontWeight: FontWeight.w600),
),
),
),
)
],
),
),
)
],
),
],
),
),
],
),
);
})
],
),
onTap: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) =>
InformationPage(model.orders[index])));
},
),
);
},
),
)
],
),

@ -0,0 +1,155 @@
import 'package:driverapp/widgets/delivery/customer_brief_card.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import '../../widgets/others/app_scaffold_widget.dart';
class DeliveryConfirmedPage extends StatelessWidget {
final dynamic item;
DeliveryConfirmedPage(this.item);
@override
Widget build(BuildContext context) {
return AppScaffold(
body: SafeArea(
child: Container(
color: Color(0xff41bdbb),
child: ListView(
children: <Widget>[
Column(
children: <Widget>[
Column(
children: <Widget>[
Container(
child: Container(
alignment: Alignment.topLeft,
child: IconButton(
color: Colors.white,
iconSize: 40,
icon: Icon(Icons.arrow_back),
onPressed: () {
Navigator.pop(context);
},
),
),
),
Container(
child: Column(
children: <Widget>[
Container(
width: 300,
height: 300,
padding: EdgeInsets.only(top:60),
decoration: BoxDecoration(
color: Colors.white10,
shape: BoxShape.circle
),
child: Column(
children: <Widget>[
Icon(
Icons.check_circle,
color: Colors.white,
size: 60,
),
Text(
'Delivery Confirmed',
style: TextStyle(
color: Colors.white,
fontSize: 20,
fontWeight: FontWeight.bold),
),
Text(
'Confirmation email and SMS has been sent',
style: TextStyle(
color: Colors.white,
fontSize: 13,
),
),
],
),
),
],
),
),
],
),
Stack(
children: <Widget>[
Container(
width: 400,
height: 500,
),
Container(
width: 800,
height: 440,
margin: EdgeInsets.only(top: 60),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.only(
topLeft: Radius.circular(80),
topRight: Radius.circular(80)),
),
child: Column(
mainAxisAlignment: MainAxisAlignment.end,
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
Container(
margin: EdgeInsets.only(bottom: 50),
child: Column(
children: <Widget>[
FlatButton.icon(
padding: EdgeInsets.all(8),
color: Colors.orangeAccent,
shape: RoundedRectangleBorder(
borderRadius: new BorderRadius.circular(10.0),
),
icon: Icon(
Icons.mode_edit,
color: Colors.white,
),
label: Text(
'Add Note',
style: TextStyle(color: Colors.white),
),
onPressed: () {},
),
SizedBox(height: 20,),
FlatButton(
color: Color(0xff41bdbb),
padding: EdgeInsets.only(right: 100, left: 100),
shape: RoundedRectangleBorder(
borderRadius: new BorderRadius.circular(18.0),
side: BorderSide(color: Color(0xff41bdbb)),
),
child: Text(
'Next Delivery',
style: TextStyle(color: Colors.white),
),
onPressed: () {},
),
],
),
),
],
),
),
CustomerBrief(
itemId: item.driverID,
customerFirstName: item.firstName,
customerLastName: item.lastName,
mobileNo: item.mobileNumber
),
],
),
],
),
],
),
),
),
);
}
}

@ -0,0 +1,225 @@
import 'package:driverapp/pages/delivery/delivery_confirmed_page.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 '../../widgets/others/app_scaffold_widget.dart';
class InformationPage extends StatelessWidget {
final dynamic item;
InformationPage(this.item);
@override
Widget build(BuildContext context) {
// return AppScaffold(
// body: Center(
// child: InkWell(onTap: () {},
// child: Texts('Replay Page')),
// ),
// );
return AppScaffold(
body: Container(
color: Color(0xff41bdbb),
child: ListView(
children: <Widget>[
Column(
children: <Widget>[
Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
Container(
margin: EdgeInsets.only(right: 50),
child: IconButton(
color: Colors.white,
iconSize: 50,
icon: Icon(Icons.arrow_back),
onPressed: () {
Navigator.pop(context);
},
),
),
Container(
child: Text(
'Delivery information',
style: TextStyle(
color: Colors.white,
fontSize: 20,
),
),
),
],
),
Stack(
children: <Widget>[
Container(
width: 400,
height: 500,
),
Container(
width: 800,
height: 700,
margin: EdgeInsets.only(top: 100),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.only(
topLeft: Radius.circular(45),
topRight: Radius.circular(45)),
),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
SizedBox(
height: 170,
),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
delivery_info_button(
btnColor: Color(0xfff44336),
btnIcon: Icon(
Icons.near_me,
size: 30,
color: Colors.white,
),
btnName: 'Location',
btnFunction: () {},
),
delivery_info_button(
btnColor: Colors.green,
btnIcon: Icon(
Icons.whatshot,
size: 30,
color: Colors.white,
),
btnName: 'Whatsapp',
btnFunction: () {},
),
delivery_info_button(
btnColor: Colors.orangeAccent,
btnIcon: Icon(
Icons.mail_outline,
size: 30,
color: Colors.white,
),
btnName: 'SMS',
btnFunction: () {},
),
delivery_info_button(
btnColor: Color(0xff41bdbb),
btnIcon: Icon(
Icons.phone,
size: 30,
color: Colors.white,
),
btnName: 'Call',
btnFunction: () {},
),
],
),
SizedBox(
height: 30,
),
Container(
margin: EdgeInsets.only(left: 15, right: 15),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Text(
'Package Content',
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 20),
),
SizedBox(
height: 20,
),
package_content(
packageName: 'Panadol Extra 50 tablet',
packageCount: '5 box',
),
SizedBox(
height: 10,
),
package_content(
packageName: 'Xeractan 20MG 30 Capsules',
packageCount: '1 PCS',
),
SizedBox(
height: 10,
),
package_content(
packageName: 'Oltment for Rash unbranded 50 ml',
packageCount: '1 tube',
),
SizedBox(
height: 10,
),
package_content(
packageName: 'Face Mask 50 Pieces',
packageCount: '1 box',
),
SizedBox(
height: 10,
),
package_content(
packageName: 'Panadol Extra 50 tablet',
packageCount: '5 box',
),
SizedBox(
height: 10,
),
],
),
),
SizedBox(
height: 30,
),
FlatButton(
color: Color(0xff41bdbb),
padding: EdgeInsets.only(
right: 100, left: 100, bottom: 15, top: 15),
shape: RoundedRectangleBorder(
borderRadius: new BorderRadius.circular(30.0),
side: BorderSide(color: Color(0xff41bdbb)),
),
child: Text(
'Client Reached',
style: TextStyle(
color: Colors.white,
fontWeight: FontWeight.bold,
fontSize: 16),
),
onPressed: () {
Navigator.push(
context, MaterialPageRoute(
builder: (context) =>
DeliveryConfirmedPage(item)));
},
),
],
),
),
CustomerBrief(
itemId: item.driverID,
customerFirstName: item.firstName,
customerLastName: item.lastName,
mobileNo: item.mobileNumber
),
],
),
],
),
],
),
),
);
}
}

@ -1,10 +1,11 @@
import 'package:driverapp/pages/landing/replay_page.dart';
import 'package:driverapp/pages/delivery/delivery_confirmed_page.dart';
import 'package:driverapp/pages/delivery/information_page.dart';
import 'package:driverapp/uitl/translations_delegate_base.dart';
import 'package:driverapp/widgets/bottom_navigation/bottom_nav_bar.dart';
import 'package:driverapp/widgets/drawer/app_drawer_widget.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:driverapp/pages/dashboard/dashboard_screen.dart';
import 'home_page.dart';
class LandingPage extends StatefulWidget {
@ -55,7 +56,12 @@ class _LandingPageState extends State<LandingPage> {
body: PageView(
physics: NeverScrollableScrollPhysics(),
controller: pageController,
children: [HomePage(), ReplayPage(), DashboardScreen(), Container()],
children: [
HomePage(),
InformationPage(null),
DeliveryConfirmedPage(null),
Container()
],
),
bottomNavigationBar: BottomNavBar(changeIndex: _changeCurrentTab),
);

@ -8,8 +8,10 @@ class ReplayPage extends StatelessWidget {
Widget build(BuildContext context) {
return AppScaffold(
body: Center(
child: InkWell(onTap: () {}, child: Texts('Replay Page')),
child: InkWell(onTap: () {},
child: Texts('Replay Page')),
),
);
}
}

@ -27,96 +27,112 @@ class _OrdersListScreenState extends State<OrdersListScreen> {
),
body: Column(
children: <Widget>[
Text(
'Nearest',
style: TextStyle(color: Color(0xff30B7B9), fontSize: 18.0),
Center(
child: Text(
'Nearest',
style: TextStyle(
color: Color(0xff30B7B9),
fontSize: 18.0,
fontWeight: FontWeight.w400),
),
),
ListView.builder(
itemCount: model.orders == null ? 0 : model.orders.length,
scrollDirection: Axis.vertical,
shrinkWrap: true,
itemBuilder: (BuildContext context, int index) {
return Padding(
padding: EdgeInsets.symmetric(horizontal: 12.2),
child: RoundedContainer(
height: MediaQuery.of(context).size.height * 0.11,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Expanded(
flex: 1,
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Padding(
padding: EdgeInsets.only(left: 22.0),
child:
Image.asset('assets/images/location.png'),
)
],
),
),
if (model.orders.length != 0)
Expanded(
child: ListView.builder(
itemCount: model.orders == null ? 0 : model.orders.length,
scrollDirection: Axis.vertical,
shrinkWrap: true,
itemBuilder: (BuildContext context, int index) {
return Padding(
padding: EdgeInsets.symmetric(horizontal: 12.2),
child: RoundedContainer(
height: MediaQuery.of(context).orientation ==
Orientation.portrait
? MediaQuery.of(context).size.height * 0.107
: MediaQuery.of(context).size.height * 0.18,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Expanded(
flex: 3,
flex: 1,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Text(
model.orders[index].firstName +
' ' +
model.orders[index].lastName,
style: TextStyle(fontSize: 18.0),
),
Text(
model.orders[index].mobileNumber,
style: TextStyle(
color: Color(0xff30B7B9),
fontWeight: FontWeight.w600,
fontSize: 15.0),
),
Expanded(
child: Text(
'Olaya ST, Behind kfc next to king ',
style: TextStyle(color: Colors.black45),
Padding(
padding: EdgeInsets.only(left: 22.0),
child: Image.asset(
'assets/images/location.png',
height:
MediaQuery.of(context).size.height *
0.101,
),
)
),
],
),
),
Padding(
padding: EdgeInsets.all(10.0),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Expanded(
child: CircleAvatar(
backgroundColor: Colors.black45,
radius: 28.0,
if (model.orders.length != 0)
Expanded(
flex: 3,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Expanded(
child: Text(
model.orders[index].firstName +
' ' +
model.orders[index].lastName,
style: TextStyle(fontSize: 18.0),
),
),
Text(
model.orders[index].mobileNumber,
style: TextStyle(
color: Color(0xff30B7B9),
fontWeight: FontWeight.w600,
fontSize: 15.0),
),
Expanded(
child: Text(
'Olaya ST, Behind kfc next to king ',
style: TextStyle(color: Colors.black45),
),
)
],
),
),
Padding(
padding: EdgeInsets.all(10.0),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Expanded(
child: CircleAvatar(
backgroundColor: Colors.white,
maxRadius: 25.1,
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Text(
'3 K.m \n away',
style: TextStyle(
color: Color(0xff30B7B9),
fontSize: 12.5,
fontWeight: FontWeight.w600),
backgroundColor: Colors.black45,
radius: 28.0,
child: CircleAvatar(
backgroundColor: Colors.white,
maxRadius: 25.1,
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Text(
'3 K.m \n away',
style: TextStyle(
color: Color(0xff30B7B9),
fontSize: 12.5,
fontWeight: FontWeight.w600),
),
),
),
),
),
)
],
)
],
),
),
),
],
],
),
),
),
);
}),
);
}),
),
],
),
),

@ -49,9 +49,23 @@ class TranslationBase {
String get english => localizedValues['english'][locale.languageCode];
String get arabic => localizedValues['arabic'][locale.languageCode];
String get enterCredentialsMsg => localizedValues['enterCredentialsMsg'][locale.languageCode];
String get forgotPassword => localizedValues['forgotPassword'][locale.languageCode];
String get enterCredentialsMsg =>
localizedValues['enterCredentialsMsg'][locale.languageCode];
String get forgotPassword =>
localizedValues['forgotPassword'][locale.languageCode];
String get login => localizedValues['login'][locale.languageCode];
String get haveGreatDay =>
localizedValues['haveGreatDay'][locale.languageCode];
String get youHave => localizedValues['youHave'][locale.languageCode];
String get deliveredPackages =>
localizedValues['deliveredPackages'][locale.languageCode];
String get seeAll => localizedValues['seeAll'][locale.languageCode];
String get nearestDropOffs =>
localizedValues['nearestDropOffs'][locale.languageCode];
String get undeliveredPackages =>
localizedValues['undeliveredPackages'][locale.languageCode];
String get away => localizedValues['away'][locale.languageCode];
String get scan => localizedValues['scan'][locale.languageCode];
}
class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> {

@ -0,0 +1,144 @@
import 'package:flutter/material.dart';
class CustomerBrief extends StatelessWidget {
final int itemId;
final String time;
final String customerFirstName;
final String customerLastName;
final String mobileNo;
final String direction;
final String totalPayment;
final String deliveryTime;
CustomerBrief(
{this.itemId,
this.time,
this.customerFirstName,
this.customerLastName,
this.mobileNo,
this.direction,
this.totalPayment,
this.deliveryTime});
@override
Widget build(BuildContext context) {
return Center(
child: Container(
width: 350,
height: 300,
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.only(
topLeft: Radius.circular(45),
topRight: Radius.circular(45),
bottomRight: Radius.circular(45),
bottomLeft: Radius.circular(45)),
boxShadow: [
BoxShadow(
color: Colors.grey.withOpacity(0.3),
spreadRadius: 5,
blurRadius: 7,
offset: Offset(0, 3),
),
],
),
child: Container(
padding: EdgeInsets.only(left: 30, top: 10, right: 30),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Row(
children: <Widget>[
Expanded(
child: Text('ID: ${itemId}'),
),
Expanded(
child: Container(
margin: EdgeInsets.only(left: 83),
width: 10,
height: 60,
decoration: BoxDecoration(
border: Border.all(
width: 2.0,
color: Color(0xff41bdbb),
),
borderRadius: BorderRadius.only(
topLeft: Radius.circular(45),
topRight: Radius.circular(45),
bottomRight: Radius.circular(45),
bottomLeft: Radius.circular(45),
),
),
child: Container(
margin: EdgeInsets.only(left: 12, top: 10),
child: Text(
'3 min away',
style: TextStyle(color: Color(0xff41bdbb)),
),
),
),
),
],
),
Text(
'${customerFirstName} ${customerLastName}',
style: TextStyle(fontSize: 20, fontWeight: FontWeight.bold),
),
Text(
mobileNo,
style: TextStyle(color: Colors.lightBlue),
),
SizedBox(
height: 10,
),
Text(
'Olaya street, behind KFC resturant, next to kingdom towers 2ND floor ofice 277',
style: TextStyle(fontWeight: FontWeight.w600),
),
SizedBox(
height: 10,
),
Divider(
color: Colors.grey,
),
SizedBox(
height: 20,
),
Column(
children: <Widget>[
Row(
children: <Widget>[
Text(
'payment',
),
SizedBox(
width: 170,
),
Text(
'SAR 70',
style: TextStyle(fontWeight: FontWeight.bold),
),
],
),
SizedBox(
height: 20,
),
Row(
children: <Widget>[
Text('Delivery Time'),
SizedBox(
width: 50,
),
Text('05 Aug 20 - 10:00 AM',
style: TextStyle(fontWeight: FontWeight.bold)),
],
)
],
),
],
),
),
),
);
}
}

@ -0,0 +1,45 @@
import 'package:flutter/material.dart';
class delivery_info_button extends StatelessWidget {
final Color btnColor;
final Icon btnIcon;
final Function btnFunction;
final String btnName;
delivery_info_button(
{this.btnColor, this.btnIcon, this.btnFunction, this.btnName});
@override
Widget build(BuildContext context) {
print(btnColor);
return Padding(
padding: EdgeInsets.all(8.0),
child: Column(
children: <Widget>[
SizedBox(
height: 50,
width: 60, // specific value
child: RaisedButton(
padding: EdgeInsets.only(left: 2),
color: btnColor,
shape: RoundedRectangleBorder(
borderRadius: new BorderRadius.circular(8.0),
),
child: btnIcon,
onPressed: btnFunction,
),
),
SizedBox(
height: 10,
),
Text(
btnName,
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 10,
),
),
],
),
);
}
}

@ -0,0 +1,30 @@
import 'package:flutter/material.dart';
class package_content extends StatelessWidget {
final String packageName;
final String packageCount;
package_content({this.packageName, this.packageCount});
@override
Widget build(BuildContext context) {
return Row(
children: <Widget>[
Expanded(
flex: 2,
child: Text(
packageName,
style: TextStyle(color: Colors.grey, fontWeight: FontWeight.w400),
),
),
Expanded(
child: Text(
packageCount,
textAlign: TextAlign.end,
style: TextStyle(color: Colors.grey, fontWeight: FontWeight.w400),
),
),
],
);
}
}
Loading…
Cancel
Save