improve design implementation in delivery_confirmed branch.

setting_branch
enadhilal 6 years ago
parent df0049cd35
commit 9892976526

@ -1,4 +1,5 @@
import 'package:driverapp/pages/delivery/delivery_confirmed_page.dart'; import 'package:driverapp/pages/delivery/delivery_confirmed_page.dart';
import 'package:driverapp/widgets/buttons/secondary_button.dart';
import 'package:driverapp/widgets/delivery/customer_brief_card.dart'; import 'package:driverapp/widgets/delivery/customer_brief_card.dart';
import 'package:driverapp/widgets/delivery/delivery_action_button.dart'; import 'package:driverapp/widgets/delivery/delivery_action_button.dart';
import 'package:driverapp/widgets/delivery/package_content.dart'; import 'package:driverapp/widgets/delivery/package_content.dart';
@ -17,9 +18,9 @@ class InformationPage extends StatelessWidget {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return AppScaffold( return AppScaffold(
body: Container( body: Container(
color: Color(0xff41bdbb), color: Color(0xff3ABBBA),
child: Container( child: Container(
color: Color(0xff41bdbb), color: Color(0xff3ABBBA),
child: ListView( child: ListView(
children: <Widget>[ children: <Widget>[
Column( Column(
@ -32,7 +33,7 @@ class InformationPage extends StatelessWidget {
right: MediaQuery right: MediaQuery
.of(context) .of(context)
.size .size
.width * 0.15, //50 .width * 0.10, //50
), ),
child: IconButton( child: IconButton(
color: Colors.white, color: Colors.white,
@ -83,10 +84,10 @@ class InformationPage extends StatelessWidget {
top: MediaQuery top: MediaQuery
.of(context) .of(context)
.size .size
.width * 0.3, //100 .width * 0.23, //100
), ),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: Theme.of(context).scaffoldBackgroundColor,
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
topLeft: Radius.circular(45), topLeft: Radius.circular(45),
topRight: Radius.circular(45)), topRight: Radius.circular(45)),
@ -98,13 +99,13 @@ class InformationPage extends StatelessWidget {
height: MediaQuery height: MediaQuery
.of(context) .of(context)
.size .size
.width * 0.2, //170, .width * 0.4, //170,
), ),
Row( Row(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[ children: <Widget>[
delivery_info_button( deliveryInfoButton(
btnColor: Color(0xfff44336), btnColor: Color(0xffED1C24),
btnIcon: Icon( btnIcon: Icon(
Icons.near_me, Icons.near_me,
size: 30, size: 30,
@ -115,8 +116,8 @@ class InformationPage extends StatelessWidget {
.location, .location,
btnFunction: () {}, btnFunction: () {},
), ),
delivery_info_button( deliveryInfoButton(
btnColor: Colors.green, btnColor: Color(0xFF61B260),
btnIcon: Icon( btnIcon: Icon(
Icons.whatshot, Icons.whatshot,
size: 30, size: 30,
@ -125,8 +126,8 @@ class InformationPage extends StatelessWidget {
btnName: 'Whatsapp', btnName: 'Whatsapp',
btnFunction: () {}, btnFunction: () {},
), ),
delivery_info_button( deliveryInfoButton(
btnColor: Colors.orangeAccent, btnColor: Color(0xFFFCB657),
btnIcon: Icon( btnIcon: Icon(
Icons.mail_outline, Icons.mail_outline,
size: 30, size: 30,
@ -137,7 +138,7 @@ class InformationPage extends StatelessWidget {
.sms, .sms,
btnFunction: () {}, btnFunction: () {},
), ),
delivery_info_button( deliveryInfoButton(
btnColor: Color(0xff41bdbb), btnColor: Color(0xff41bdbb),
btnIcon: Icon( btnIcon: Icon(
Icons.phone, Icons.phone,
@ -166,7 +167,7 @@ class InformationPage extends StatelessWidget {
right: MediaQuery right: MediaQuery
.of(context) .of(context)
.size .size
.width * 0.02, //15 .width * 0.05, //15
), ),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
@ -176,7 +177,7 @@ class InformationPage extends StatelessWidget {
.of(context) .of(context)
.packageContent, .packageContent,
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.bold, fontWeight: FontWeight.w900,
fontSize: 20), fontSize: 20),
), ),
SizedBox( SizedBox(
@ -194,7 +195,6 @@ class InformationPage extends StatelessWidget {
.itemsQuantitiesList[index] .itemsQuantitiesList[index]
.itemName .itemName
.toString(), .toString(),
//'Panadol Extra 50 tablet',
packageCount: item packageCount: item
.itemsQuantitiesList[index] .itemsQuantitiesList[index]
.quantity .quantity
@ -217,40 +217,12 @@ class InformationPage extends StatelessWidget {
.size .size
.width * 0.1, //30, .width * 0.1, //30,
), ),
FlatButton( Container(
color: Color(0xff41bdbb), margin: EdgeInsets.all(10),
padding: EdgeInsets.only( // height: MediaQuery.of(context).size.height *0.08,
right: MediaQuery child: SecondaryButton(
.of(context) label: TranslationBase.of(context).clientReached,
.size onTap: () {
.width * 0.3, //100,
left: MediaQuery
.of(context)
.size
.width * 0.3, //100,
bottom: MediaQuery
.of(context)
.size
.width * 0.035, //15,
top: MediaQuery
.of(context)
.size
.width * 0.035, //15
),
shape: RoundedRectangleBorder(
borderRadius: new BorderRadius.circular(30.0),
side: BorderSide(color: Color(0xff41bdbb)),
),
child: Text(
TranslationBase
.of(context)
.clientReached,
style: TextStyle(
color: Colors.white,
fontWeight: FontWeight.bold,
fontSize: 16),
),
onPressed: () {
Navigator.push( Navigator.push(
context, context,
MaterialPageRoute( MaterialPageRoute(
@ -258,6 +230,48 @@ class InformationPage extends StatelessWidget {
DeliveryConfirmedPage(item))); DeliveryConfirmedPage(item)));
}, },
), ),
),
// FlatButton(
// color: Color(0xff41bdbb),
// padding: EdgeInsets.only(
// right: MediaQuery
// .of(context)
// .size
// .width * 0.3, //100,
// left: MediaQuery
// .of(context)
// .size
// .width * 0.3, //100,
// bottom: MediaQuery
// .of(context)
// .size
// .width * 0.035, //15,
// top: MediaQuery
// .of(context)
// .size
// .width * 0.035, //15
// ),
// shape: RoundedRectangleBorder(
// borderRadius: new BorderRadius.circular(30.0),
// side: BorderSide(color: Color(0xff41bdbb)),
// ),
// child: Text(
// TranslationBase
// .of(context)
// .clientReached,
// style: TextStyle(
// color: Colors.white,
// fontWeight: FontWeight.bold,
// fontSize: 16),
// ),
// onPressed: () {
// Navigator.push(
// context,
// MaterialPageRoute(
// builder: (context) =>
// DeliveryConfirmedPage(item)));
// },
// ),
], ],
), ),
), ),

@ -32,10 +32,10 @@ class CustomerBrief extends StatelessWidget {
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: Colors.white,
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
topLeft: Radius.circular(45), topLeft: Radius.circular(30),
topRight: Radius.circular(45), topRight: Radius.circular(30),
bottomRight: Radius.circular(45), bottomRight: Radius.circular(30),
bottomLeft: Radius.circular(45)), bottomLeft: Radius.circular(30)),
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: Colors.grey.withOpacity(0.3), color: Colors.grey.withOpacity(0.3),
@ -53,30 +53,27 @@ class CustomerBrief extends StatelessWidget {
Row( Row(
children: <Widget>[ children: <Widget>[
Expanded( Expanded(
child: Text('ID: ${itemId}'), flex: 3,
child: Text('ID: ${itemId}', style: TextStyle(
color: Color(0xFFADACAD)
),),
), ),
Expanded( Expanded(
child: Container( child: CircleAvatar(
margin: EdgeInsets.only(left: 83), backgroundColor: Colors.black45,
width: 10, radius: 28.0,
height: 60, child: CircleAvatar(
decoration: BoxDecoration( backgroundColor: Colors.white,
border: Border.all( maxRadius: 25.1,
width: 2.0, child: Padding(
color: Color(0xff41bdbb), padding: const EdgeInsets.all(8.0),
),
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( child: Text(
'3 min away', '3 K.m \n away',
style: TextStyle(color: Color(0xff41bdbb)), style: TextStyle(
color: Color(0xff30B7B9),
fontSize: 12.5,
fontWeight: FontWeight.w600),
),
), ),
), ),
), ),
@ -85,25 +82,32 @@ class CustomerBrief extends StatelessWidget {
), ),
Text( Text(
'${customerFirstName} ${customerLastName}', '${customerFirstName} ${customerLastName}',
style: TextStyle(fontSize: 20, fontWeight: FontWeight.bold), style: TextStyle(fontSize: 20, fontWeight: FontWeight.w900),
), ),
Text( Text(
mobileNo, mobileNo,
style: TextStyle(color: Colors.lightBlue), style: TextStyle(color: Color(0xFF50BDC5)),
), ),
SizedBox( SizedBox(
height: 10, height: 10,
), ),
Text( Text(
'Olaya street, behind KFC resturant, next to kingdom towers 2ND floor ofice 277', 'Olaya street, behind KFC resturant, next to kingdom towers 2ND floor ofice 277',
style: TextStyle(fontWeight: FontWeight.w600), style: TextStyle(color: Color(0xFF464748),fontWeight: FontWeight.w600),
), ),
SizedBox( SizedBox(
height: 10, height: 10,
), ),
Divider( SizedBox(
height: 10.0,
child: Center(
child: Container(
margin: EdgeInsetsDirectional.only(start: 1.0, end: 1.0),
height: 1.0,
color: Colors.grey, color: Colors.grey,
), ),
),
),
SizedBox( SizedBox(
height: 20, height: 20,
), ),
@ -111,17 +115,24 @@ class CustomerBrief extends StatelessWidget {
children: <Widget>[ children: <Widget>[
Row( Row(
children: <Widget>[ children: <Widget>[
Text( Expanded(
flex: 2,
child: Text(
TranslationBase TranslationBase
.of(context) .of(context)
.payment, .payment,
textAlign: TextAlign.start,
),
), ),
SizedBox( SizedBox(
width: 170, width: 170,
), ),
Text( Expanded(
child: Text(
totalPayment.toString(), //'SAR 70', totalPayment.toString(), //'SAR 70',
style: TextStyle(fontWeight: FontWeight.bold), textAlign: TextAlign.end,
style: TextStyle(fontWeight: FontWeight.w600),
),
), ),
], ],
), ),
@ -130,21 +141,28 @@ class CustomerBrief extends StatelessWidget {
), ),
Row( Row(
children: <Widget>[ children: <Widget>[
Text( Expanded(
flex: 1,
child: Text(
TranslationBase TranslationBase
.of(context) .of(context)
.delivryTime, .delivryTime,
textAlign: TextAlign.start,
), ),
SizedBox(
width: 50,
), ),
Text( // SizedBox(
// width: 50,
// ),
Expanded(
child: Text(
'${DateUtil.getMonthDayYearDateFormatted( '${DateUtil.getMonthDayYearDateFormatted(
DateUtil.convertStringToDate( DateUtil.convertStringToDate(
deliveryTime))} ${(DateUtil deliveryTime))} ${(DateUtil
.convertStringToHours(deliveryTime))}', .convertStringToHours(deliveryTime))}',
//'05 Aug 20 - 10:00 AM', //'05 Aug 20 - 10:00 AM',
style: TextStyle(fontWeight: FontWeight.bold)), textAlign: TextAlign.end,
style: TextStyle(fontWeight: FontWeight.w600)),
),
], ],
) )
], ],

@ -1,12 +1,12 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
class delivery_info_button extends StatelessWidget { class deliveryInfoButton extends StatelessWidget {
final Color btnColor; final Color btnColor;
final Icon btnIcon; final Icon btnIcon;
final Function btnFunction; final Function btnFunction;
final String btnName; final String btnName;
delivery_info_button( deliveryInfoButton(
{this.btnColor, this.btnIcon, this.btnFunction, this.btnName}); {this.btnColor, this.btnIcon, this.btnFunction, this.btnName});
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {

Loading…
Cancel
Save