Merge branch 'development' into 'master'

Development

See merge request Cloud_Solution/driver-app!115
barcode_scanner
Elham 6 years ago
commit ed51310a3a

@ -57,7 +57,9 @@ class _DashboardScreenState extends State<DashboardScreen> {
AppScaffold( AppScaffold(
body: SingleChildScrollView( body: SingleChildScrollView(
child: Container( child: Container(
height: MediaQuery.of(context).size.height * 1.6, height: MediaQuery.of(context).orientation == Orientation.landscape
? MediaQuery.of(context).size.height * 1.6
: MediaQuery.of(context).size.height * 1.0,
child: Column( child: Column(
children: <Widget>[ children: <Widget>[
Row( Row(
@ -500,7 +502,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
if (model.state == ViewState.Idle) if (model.state == ViewState.Idle)
model.orders.length == 0 model.orders.length == 0
? Text("There's No Orders To deliver") ? Text("There's No Orders To deliver")
: Text(""), : SizedBox(),
NetworkBaseView( NetworkBaseView(
baseViewModel: model, baseViewModel: model,
child: Expanded( child: Expanded(

@ -71,7 +71,7 @@ class InformationPage extends StatelessWidget {
), ),
FractionallySizedBox( FractionallySizedBox(
widthFactor: MediaQuery.of(context).orientation == widthFactor: MediaQuery.of(context).orientation ==
Orientation.portrait Orientation.portrait
? 0.9 ? 0.9
: 0.98, : 0.98,
child: Container( child: Container(
@ -168,39 +168,18 @@ class InformationPage extends StatelessWidget {
Padding( Padding(
padding: const EdgeInsets.only(top: 75.0), padding: const EdgeInsets.only(top: 75.0),
child: Container( child: Container(
width: MediaQuery width: MediaQuery.of(context).size.width * 1.0,
.of(context) height: MediaQuery.of(context).orientation ==
.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 Orientation.portrait
? MediaQuery ? MediaQuery.of(context).size.height * 0.70
.of(context) : MediaQuery.of(context).size.height * 1.7,
.size margin: EdgeInsets.only(
.width * 0.23 top: MediaQuery.of(context).orientation ==
: MediaQuery Orientation.portrait
.of(context) ? MediaQuery.of(context).size.width * 0.23
.size : MediaQuery.of(context).size.width * 0.13),
.width * 0.13),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Theme color: Theme.of(context).scaffoldBackgroundColor,
.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)),
@ -209,142 +188,98 @@ class InformationPage extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.spaceEvenly, mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: <Widget>[ children: <Widget>[
SizedBox( SizedBox(
height: MediaQuery height: MediaQuery.of(context).orientation ==
.of(context) Orientation.portrait
.orientation == ? MediaQuery.of(context).size.height * 0.10
Orientation.portrait : MediaQuery.of(context).size.height * 0.29,
? MediaQuery
.of(context)
.size
.height *
0.10
: MediaQuery
.of(context)
.size
.height *
0.29,
//MediaQuery.of(context).size.width * 0.005, //MediaQuery.of(context).size.width * 0.005,
), ),
Padding( Padding(
padding: MediaQuery padding: MediaQuery.of(context).orientation ==
.of(context) Orientation.portrait
.orientation ==
Orientation.portrait
? EdgeInsets.only(top: 60.0) ? EdgeInsets.only(top: 60.0)
: EdgeInsets.only(top: 15.0), : EdgeInsets.only(top: 15.0),
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[ children: <Widget>[
DeliveryInfoButton( DeliveryInfoButton(
btnColor: btnColor: Colors.white, //Color(0xffED1C24),
Colors.white, //Color(0xffED1C24),
btnIcon: Icon(DriverApp.location_1, btnIcon: Icon(DriverApp.location_1,
size: MediaQuery size: MediaQuery.of(context)
.of(context) .orientation ==
.orientation == Orientation.portrait
Orientation.portrait
? 50 ? 50
: 90, : 90,
color: Color(0xffED1C24)), color: Color(0xffED1C24)),
btnName: TranslationBase btnName:
.of(context) TranslationBase.of(context).location,
.location,
btnFunction: () { btnFunction: () {
MapsLauncher.launchCoordinates( MapsLauncher.launchCoordinates(
item.latitude, item.longitude); item.latitude, item.longitude);
}, },
), ),
DeliveryInfoButton( DeliveryInfoButton(
btnColor: btnColor: Colors.white, //Color(0xFF61B260),
Colors.white, //Color(0xFF61B260),
btnIcon: Icon( btnIcon: Icon(
DriverApp.whatsapp, DriverApp.whatsapp,
size: MediaQuery size:
.of(context) MediaQuery.of(context).orientation ==
.orientation == Orientation.portrait
Orientation.portrait ? 50
? 50 : 90,
: 90,
color: Color(0xFF5EA34A), color: Color(0xFF5EA34A),
), ),
btnName: 'Whatsapp', btnName: 'Whatsapp',
btnFunction: () {}, btnFunction: () {},
), ),
DeliveryInfoButton( DeliveryInfoButton(
btnColor: btnColor: Colors.white, //Color(0xFFFCB657),
Colors.white, //Color(0xFFFCB657),
btnIcon: Icon( btnIcon: Icon(
DriverApp.message, DriverApp.message,
size: MediaQuery size:
.of(context) MediaQuery.of(context).orientation ==
.orientation == Orientation.portrait
Orientation.portrait ? 50
? 50 : 90,
: 90,
color: Color(0xffFFA540), color: Color(0xffFFA540),
), ),
btnName: btnName: TranslationBase.of(context).sms,
TranslationBase
.of(context)
.sms,
btnFunction: () {}, btnFunction: () {},
), ),
DeliveryInfoButton( DeliveryInfoButton(
btnColor: Colors btnColor: Colors.white,
.white,
//Theme.of(context).primaryColor, //Theme.of(context).primaryColor,
btnIcon: Icon( btnIcon: Icon(
DriverApp.call, DriverApp.call,
size: MediaQuery size:
.of(context) MediaQuery.of(context).orientation ==
.orientation == Orientation.portrait
Orientation.portrait ? 50
? 50 : 90,
: 90, color: Theme.of(context).primaryColor,
color: Theme
.of(context)
.primaryColor,
), ),
btnName: btnName: TranslationBase.of(context).call,
TranslationBase
.of(context)
.call,
btnFunction: () => btnFunction: () =>
launch( launch("tel://" + item.mobileNumber),
"tel://" + item.mobileNumber),
), ),
], ],
), ),
), ),
SizedBox( SizedBox(
height: height: MediaQuery.of(context).size.width * 0.08,
MediaQuery
.of(context)
.size
.width * 0.08,
), ),
Container( Container(
margin: EdgeInsets.only( margin: EdgeInsets.only(
left: MediaQuery left: MediaQuery.of(context).size.width * 0.05,
.of(context) right: MediaQuery.of(context).size.width * 0.05,
.size
.width *
0.05,
right: MediaQuery
.of(context)
.size
.width *
0.05,
), ),
child: Column( child: Column(
crossAxisAlignment: crossAxisAlignment: CrossAxisAlignment.start,
CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Padding( Padding(
padding: const EdgeInsets.only(left: 8), padding: const EdgeInsets.only(left: 8),
child: Text( child: Text(
TranslationBase TranslationBase.of(context)
.of(context)
.packageContent, .packageContent,
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.w900, fontWeight: FontWeight.w900,
@ -352,21 +287,15 @@ class InformationPage extends StatelessWidget {
), ),
), ),
SizedBox( SizedBox(
height: height: MediaQuery.of(context).size.width *
MediaQuery
.of(context)
.size
.width *
0.05, 0.05,
), ),
Padding( Padding(
padding: padding: const EdgeInsets.only(left: 10),
const EdgeInsets.only(left: 10),
child: Column( child: Column(
children: List.generate( children: List.generate(
item.itemsQuantitiesList != null item.itemsQuantitiesList != null
? item.itemsQuantitiesList ? item.itemsQuantitiesList.length
.length
: 0, (index) { : 0, (index) {
return packageContent( return packageContent(
packageName: item packageName: item
@ -385,29 +314,21 @@ class InformationPage extends StatelessWidget {
), ),
), ),
SizedBox( SizedBox(
height: height: MediaQuery.of(context).size.width * 0.1,
MediaQuery
.of(context)
.size
.width * 0.1,
), ),
Container( Container(
margin: MediaQuery margin: MediaQuery.of(context).orientation ==
.of(context) Orientation.portrait
.orientation ==
Orientation.portrait
? EdgeInsets.all(8.0) ? EdgeInsets.all(8.0)
: EdgeInsets.symmetric(horizontal: 12.0), : EdgeInsets.symmetric(horizontal: 12.0),
child: SecondaryButton( child: SecondaryButton(
label: TranslationBase label:
.of(context) TranslationBase.of(context).clientReached,
.clientReached,
onTap: () { onTap: () {
showDeliveryOptions(model); showDeliveryOptions(model);
}, },
), ),
), ),
], ],
), ),
), ),
@ -421,6 +342,7 @@ class InformationPage extends StatelessWidget {
deliveryTime: item.orderCreatedOn, deliveryTime: item.orderCreatedOn,
longitude: item.longitude, longitude: item.longitude,
latitude: item.latitude, latitude: item.latitude,
distanceInKilometers: item.distanceInKilometers,
), ),
], ],
), ),
@ -437,19 +359,13 @@ class InformationPage extends StatelessWidget {
this._orderStatus = orderStatus; this._orderStatus = orderStatus;
switch (orderStatus) { switch (orderStatus) {
case 3: case 3:
orderStatusText = TranslationBase orderStatusText = TranslationBase.of(context).delivered;
.of(context)
.delivered;
break; break;
case 4: case 4:
orderStatusText = TranslationBase orderStatusText = TranslationBase.of(context).deliveredAccepted;
.of(context)
.deliveredAccepted;
break; break;
case 5: case 5:
orderStatusText = TranslationBase orderStatusText = TranslationBase.of(context).deliveredRejected;
.of(context)
.deliveredRejected;
break; break;
case 6: case 6:
orderStatusText = TranslationBase.of(context).canceled; orderStatusText = TranslationBase.of(context).canceled;
@ -470,11 +386,11 @@ class InformationPage extends StatelessWidget {
updateOrderStatus(BuildContext context, OrdersViewModel model) async { updateOrderStatus(BuildContext context, OrdersViewModel model) async {
UpdateOrderStatusRequestModel updateOrderStatusRequestModel = UpdateOrderStatusRequestModel updateOrderStatusRequestModel =
UpdateOrderStatusRequestModel( UpdateOrderStatusRequestModel(
deliveryOrderID: item.orderID, deliveryOrderID: item.orderID,
deliveryOrderStatus: _orderStatus, deliveryOrderStatus: _orderStatus,
rejectionReason: "NO Reason", rejectionReason: "NO Reason",
cancleReason: ""); cancleReason: "");
await model.updateOrderStatus(updateOrderStatusRequestModel); await model.updateOrderStatus(updateOrderStatusRequestModel);
if (model.state == ViewState.ErrorLocal) { if (model.state == ViewState.ErrorLocal) {
Utils.showErrorToast(model.error); Utils.showErrorToast(model.error);

@ -31,7 +31,7 @@ class _DeliverdOrdersPageState extends State<DeliverdOrdersPage> {
if (model.state == ViewState.Idle) if (model.state == ViewState.Idle)
model.deliverdOrders.length == 0 model.deliverdOrders.length == 0
? Text("There's No Orders To deliver") ? Text("There's No Orders To deliver")
: Text(''), : SizedBox(),
NetworkBaseView( NetworkBaseView(
baseViewModel: model, baseViewModel: model,
child: Expanded( child: Expanded(

@ -32,7 +32,7 @@ class _OrdersListScreenState extends State<OrdersListScreen> {
if (model.state == ViewState.Idle) if (model.state == ViewState.Idle)
model.orders.length == 0 model.orders.length == 0
? Text("There's No Orders To deliver") ? Text("There's No Orders To deliver")
: Text(""), : SizedBox(),
Expanded( Expanded(
child: ListView.builder( child: ListView.builder(
shrinkWrap: true, shrinkWrap: true,

@ -23,13 +23,16 @@ class SettingPage extends StatelessWidget {
appBarColor: Color(0xFF1DA4AA), appBarColor: Color(0xFF1DA4AA),
arrowColor: Colors.white, arrowColor: Colors.white,
titleColor: Colors.white, titleColor: Colors.white,
isAppBarGradient: true,
body: SingleChildScrollView( body: SingleChildScrollView(
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
gradient: LinearGradient( gradient: LinearGradient(
begin: Alignment(0.0,0.0), // 10% of the width, so there are ten blinds.
end: Alignment(-1.5, 0.0), // 10% of the width, so there are ten blinds. colors: [
colors: [const Color(0xFF1DA4AA), const Color(0xFF3EB4AD)],//[const Color(0xff30B7B9), const Color(0xff3AB2AD)], // whitish to gray const Color(0xff45B7AE),
const Color(0xff119FA9)
], //[const Color(0xff30B7B9), const Color(0xff3AB2AD)], // whitish to gray
tileMode: TileMode.clamp, // repeats the gradient over the canvas tileMode: TileMode.clamp, // repeats the gradient over the canvas
), ),
), ),
@ -50,38 +53,40 @@ class SettingPage extends StatelessWidget {
maxRadius: 200.0, maxRadius: 200.0,
child: Image.asset( child: Image.asset(
'assets/images/driver.png', 'assets/images/driver.png',
height: MediaQuery.of(context).size.width * 1 , height: MediaQuery.of(context).size.width * 1,
width: MediaQuery.of(context).size.width * 1, width: MediaQuery.of(context).size.width * 1,
fit: BoxFit.contain, fit: BoxFit.contain,
), ),
), ),
), ),
), ),
SizedBox(height: MediaQuery.of(context).size.width *0.05,), SizedBox(
height: MediaQuery.of(context).size.width * 0.05,
),
Container( Container(
child: Text( child: Text(
driverName, driverName,
style: TextStyle( style: TextStyle(
fontSize: 40, fontSize: 40,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
color: Colors.white color: Colors.white),
),
), ),
), ),
SizedBox(height: MediaQuery.of(context).size.width *0.05,), SizedBox(
height: MediaQuery.of(context).size.width * 0.05,
),
Container( Container(
child: Text( child: Text(
'ID: ${driverID.toString()}', 'ID: ${driverID.toString()}',
style: TextStyle( style: TextStyle(fontSize: 20, color: Colors.white),
fontSize: 20,
color: Colors.white
),
), ),
), ),
], ],
), ),
), ),
SizedBox(height: MediaQuery.of(context).size.width *0.1,), SizedBox(
height: MediaQuery.of(context).size.width * 0.1,
),
Container( Container(
margin: EdgeInsets.only(left: 35), margin: EdgeInsets.only(left: 35),
child: Column( child: Column(
@ -107,23 +112,26 @@ class SettingPage extends StatelessWidget {
size: 40, size: 40,
color: Colors.white, color: Colors.white,
), ),
SizedBox(width: MediaQuery.of(context).size.width *0.05,), SizedBox(
width:
MediaQuery.of(context).size.width * 0.05,
),
Text( Text(
TranslationBase.of(context).logout, TranslationBase.of(context).logout,
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
color: Colors.white, color: Colors.white,
fontSize: 18 fontSize: 18),
),
), ),
], ],
), ),
), ),
SizedBox( SizedBox(
height: MediaQuery.of(context).size.width *0.05, height: MediaQuery.of(context).size.width * 0.05,
child: Center( child: Center(
child: Container( child: Container(
margin: EdgeInsetsDirectional.only(start: 0, end: 30), margin: EdgeInsetsDirectional.only(
start: 0, end: 30),
height: 1.0, height: 1.0,
color: Colors.white, color: Colors.white,
), ),
@ -132,7 +140,9 @@ class SettingPage extends StatelessWidget {
], ],
), ),
), ),
SizedBox(height: MediaQuery.of(context).size.width*0.05,), SizedBox(
height: MediaQuery.of(context).size.width * 0.05,
),
InkWell( InkWell(
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
@ -147,15 +157,15 @@ class SettingPage extends StatelessWidget {
color: Colors.white, color: Colors.white,
), ),
SizedBox( SizedBox(
width: MediaQuery.of(context).size.width * 0.05, width:
MediaQuery.of(context).size.width * 0.05,
), ),
Text( Text(
TranslationBase.of(context).languageText, TranslationBase.of(context).languageText,
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
color: Colors.white, color: Colors.white,
fontSize: 18 fontSize: 18),
),
), ),
], ],
), ),
@ -164,13 +174,16 @@ class SettingPage extends StatelessWidget {
height: 10.0, height: 10.0,
child: Center( child: Center(
child: Container( child: Container(
margin: EdgeInsetsDirectional.only(start: 0, end: 30), margin: EdgeInsetsDirectional.only(
start: 0, end: 30),
height: 1.0, height: 1.0,
color: Colors.white, color: Colors.white,
), ),
), ),
), ),
SizedBox(height: MediaQuery.of(context).size.width*0.05,), SizedBox(
height: MediaQuery.of(context).size.width * 0.05,
),
], ],
), ),
), ),
@ -188,15 +201,15 @@ class SettingPage extends StatelessWidget {
color: Colors.white, color: Colors.white,
), ),
SizedBox( SizedBox(
width: MediaQuery.of(context).size.width * 0.05, width:
MediaQuery.of(context).size.width * 0.05,
), ),
Text( Text(
TranslationBase.of(context).settings, TranslationBase.of(context).settings,
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
color: Colors.white, color: Colors.white,
fontSize: 18 fontSize: 18),
),
), ),
], ],
), ),
@ -205,13 +218,16 @@ class SettingPage extends StatelessWidget {
height: 10.0, height: 10.0,
child: Center( child: Center(
child: Container( child: Container(
margin: EdgeInsetsDirectional.only(start: 0, end: 30), margin: EdgeInsetsDirectional.only(
start: 0, end: 30),
height: 1.0, height: 1.0,
color: Colors.white, color: Colors.white,
), ),
), ),
), ),
SizedBox(height: MediaQuery.of(context).size.width*0.05,), SizedBox(
height: MediaQuery.of(context).size.width * 0.05,
),
], ],
), ),
), ),
@ -229,15 +245,15 @@ class SettingPage extends StatelessWidget {
color: Colors.white, color: Colors.white,
), ),
SizedBox( SizedBox(
width: MediaQuery.of(context).size.width * 0.05, width:
MediaQuery.of(context).size.width * 0.05,
), ),
Text( Text(
TranslationBase.of(context).notification, TranslationBase.of(context).notification,
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
color: Colors.white, color: Colors.white,
fontSize: 18 fontSize: 18),
),
), ),
], ],
), ),
@ -246,13 +262,16 @@ class SettingPage extends StatelessWidget {
height: 10.0, height: 10.0,
child: Center( child: Center(
child: Container( child: Container(
margin: EdgeInsetsDirectional.only(start: 0, end: 30), margin: EdgeInsetsDirectional.only(
start: 0, end: 30),
height: 1.0, height: 1.0,
color: Colors.white, color: Colors.white,
), ),
), ),
), ),
SizedBox(height: MediaQuery.of(context).size.width*0.05,), SizedBox(
height: MediaQuery.of(context).size.width * 0.05,
),
], ],
), ),
), ),

@ -34,9 +34,13 @@ class _SplashScreenPageState extends State<SplashScreenPage> {
body: Container( body: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
gradient: LinearGradient( gradient: LinearGradient(
begin: Alignment(1.0,0.0), begin: Alignment(1.0, 0.0),
end: Alignment(-0.0, 0.0), // 10% of the width, so there are ten blinds. end: Alignment(
colors: [const Color(0xFF1BB0B8), const Color(0xFF44BFBB)],//[const Color(0xff30B7B9), const Color(0xff3AB2AD)], // whitish to gray -0.0, 0.0), // 10% of the width, so there are ten blinds.
colors: [
const Color(0xFF1BB0B8),
const Color(0xFF44BFBB)
], //[const Color(0xff30B7B9), const Color(0xff3AB2AD)], // whitish to gray
tileMode: TileMode.clamp, // repeats the gradient over the canvas tileMode: TileMode.clamp, // repeats the gradient over the canvas
), ),
), ),
@ -45,19 +49,25 @@ class _SplashScreenPageState extends State<SplashScreenPage> {
mainAxisAlignment: MainAxisAlignment.spaceEvenly, mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: <Widget>[ children: <Widget>[
FractionallySizedBox( FractionallySizedBox(
widthFactor: 0.80, widthFactor: 0.89,
child: Column( child: Column(
children: <Widget>[ children: <Widget>[
SizedBox( SizedBox(
height: 200, height: MediaQuery.of(context).orientation ==
Orientation.portrait
? 200
: 50,
), ),
Column( Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[ children: <Widget>[
Container( Container(
child: Icon( child: Icon(
DriverApp.logo, DriverApp.logo,
size: 120, size: MediaQuery.of(context).orientation ==
Orientation.portrait
? 120
: 70,
color: Colors.white, color: Colors.white,
), ),
margin: EdgeInsets.only( margin: EdgeInsets.only(
@ -65,42 +75,64 @@ class _SplashScreenPageState extends State<SplashScreenPage> {
? 0 ? 0
: MediaQuery.of(context).size.width * 0.20, : MediaQuery.of(context).size.width * 0.20,
left: !projectViewModel.isArabic left: !projectViewModel.isArabic
? 0 ? MediaQuery.of(context).orientation ==
Orientation.landscape
? MediaQuery.of(context).size.width * 0.13
: MediaQuery.of(context).size.width * 0.0
: MediaQuery.of(context).size.width * 0.10), : MediaQuery.of(context).size.width * 0.10),
), ),
], ],
), ),
SizedBox( SizedBox(
height: 20, height: MediaQuery.of(context).orientation ==
Orientation.portrait
? 20
: 15,
), ),
Column( Column(
children: <Widget>[ children: <Widget>[
Text( Text(
"Driver", "Driver",
style: TextStyle( style: TextStyle(
fontSize: 70, fontSize: MediaQuery.of(context).orientation ==
Orientation.portrait
? 70
: 35,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: Colors.white), color: Colors.white),
), ),
Text( Text(
"Delivery", "Delivery",
style: TextStyle( style: TextStyle(
fontSize: 50, fontSize: MediaQuery.of(context).orientation ==
Orientation.portrait
? 50
: 25,
letterSpacing: 1, letterSpacing: 1,
color: Colors.white), color: Colors.white),
), ),
Text( Text(
"APP", "APP",
style: TextStyle( style: TextStyle(
fontSize: 53, fontSize: MediaQuery.of(context).orientation ==
letterSpacing: 53, Orientation.portrait
? 53
: 21,
letterSpacing:
MediaQuery.of(context).orientation ==
Orientation.portrait
? 53
: 27,
color: Colors.white, color: Colors.white,
fontWeight: FontWeight.w400), fontWeight: FontWeight.w400),
), ),
], ],
), ),
SizedBox( SizedBox(
height: 100, height: MediaQuery.of(context).orientation ==
Orientation.portrait
? 100
: 50,
) )
], ],
), ),
@ -129,7 +161,10 @@ class _SplashScreenPageState extends State<SplashScreenPage> {
), ),
), ),
SizedBox( SizedBox(
height: 10, height: MediaQuery.of(context).orientation ==
Orientation.portrait
? 10
: 5,
) )
], ],
), ),

@ -45,7 +45,7 @@ class CustomerBriefCard extends StatelessWidget {
width: MediaQuery.of(context).orientation == Orientation.landscape width: MediaQuery.of(context).orientation == Orientation.landscape
? SizeConfig.widthMultiplier * 125.0 ? SizeConfig.widthMultiplier * 125.0
: SizeConfig.widthMultiplier * 90.0, : SizeConfig.widthMultiplier * 90.0,
height: 290, height: SizeConfig.heightMultiplier * 33.0, // TODO make it responsive
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: Colors.white,
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
@ -66,6 +66,7 @@ class CustomerBriefCard extends StatelessWidget {
padding: EdgeInsets.only(left: 30, top: 20, right: 30), padding: EdgeInsets.only(left: 30, top: 20, right: 30),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Row( Row(
children: <Widget>[ children: <Widget>[
@ -81,7 +82,7 @@ class CustomerBriefCard extends StatelessWidget {
), ),
Expanded( Expanded(
child: Padding( child: Padding(
padding: EdgeInsets.all(8.0), padding: EdgeInsets.all(2.0),
child: DistanceInKilometers( child: DistanceInKilometers(
distanceInKilometers: distanceInKilometers, distanceInKilometers: distanceInKilometers,
), ),
@ -89,29 +90,34 @@ class CustomerBriefCard extends StatelessWidget {
), ),
], ],
), ),
SizedBox( Column(
height: MediaQuery.of(context).size.width * 0.02, crossAxisAlignment: CrossAxisAlignment.start,
), mainAxisAlignment: MainAxisAlignment.spaceEvenly,
Text( children: <Widget>[
Utils.formatStringToPascalCase( Text(
'${customerFirstName} ${customerLastName}'), Utils.formatStringToPascalCase(
style: TextStyle( '${customerFirstName} ${customerLastName}'),
color: Color(0xff343333), style: TextStyle(
fontWeight: FontWeight.bold, color: Color(0xff343333),
fontSize: 20.0, fontWeight: FontWeight.bold,
), fontSize: 20.0,
), ),
SizedBox( ),
height: MediaQuery.of(context).size.width * 0.019, // SizedBox(
), // height: MediaQuery.of(context).size.width * 0.00,
Text( // ),
mobileNo, Text(
style: TextStyle( mobileNo,
color: Color(0xff14A0A9), fontWeight: FontWeight.w400), style: TextStyle(
), color: Color(0xff14A0A9),
SizedBox( fontWeight: FontWeight.w400),
height: MediaQuery.of(context).size.width * 0.005, ),
SizedBox(
height: MediaQuery.of(context).size.width * 0.005,
),
],
), ),
// 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( // style: TextStyle(

Loading…
Cancel
Save