Merge branch 'dashboard_landscape' into 'development'

Dashboard landscape

See merge request Cloud_Solution/driver-app!24
logut
hussam alhababieh 6 years ago
commit 6f74d32523

@ -129,8 +129,8 @@ class PendingOrdersRes {
class ItemsQuantitiesList { class ItemsQuantitiesList {
String itemName; String itemName;
int productID; var productID;
int quantity; var quantity;
ItemsQuantitiesList({this.itemName, this.productID, this.quantity}); ItemsQuantitiesList({this.itemName, this.productID, this.quantity});

@ -4,6 +4,9 @@ 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';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:map_launcher/map_launcher.dart';
import 'package:maps_launcher/maps_launcher.dart';
import 'package:url_launcher/url_launcher.dart';
import '../../uitl/translations_delegate_base.dart'; import '../../uitl/translations_delegate_base.dart';
import '../../widgets/others/app_scaffold_widget.dart'; import '../../widgets/others/app_scaffold_widget.dart';
@ -44,9 +47,7 @@ class InformationPage extends StatelessWidget {
), ),
Container( Container(
child: Text( child: Text(
TranslationBase TranslationBase.of(context).deliveryInfo,
.of(context)
.deliveryInfo,
style: TextStyle( style: TextStyle(
color: Colors.white, color: Colors.white,
fontSize: 20, fontSize: 20,
@ -87,10 +88,11 @@ class InformationPage extends StatelessWidget {
size: 30, size: 30,
color: Colors.white, color: Colors.white,
), ),
btnName: TranslationBase btnName: TranslationBase.of(context).location,
.of(context) btnFunction: () {
.location, MapsLauncher.launchCoordinates(
btnFunction: () {}, item.longitude, item.latitude);
},
), ),
delivery_info_button( delivery_info_button(
btnColor: Colors.green, btnColor: Colors.green,
@ -109,9 +111,7 @@ class InformationPage extends StatelessWidget {
size: 30, size: 30,
color: Colors.white, color: Colors.white,
), ),
btnName: TranslationBase btnName: TranslationBase.of(context).sms,
.of(context)
.sms,
btnFunction: () {}, btnFunction: () {},
), ),
delivery_info_button( delivery_info_button(
@ -121,10 +121,11 @@ class InformationPage extends StatelessWidget {
size: 30, size: 30,
color: Colors.white, color: Colors.white,
), ),
btnName: TranslationBase btnName: TranslationBase.of(context).call,
.of(context) btnFunction: () {
.call, launch(
btnFunction: () {}, "tel://" + item.mobileNumber.toString());
},
), ),
], ],
), ),
@ -137,9 +138,7 @@ class InformationPage extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Text( Text(
TranslationBase TranslationBase.of(context).packageContent,
.of(context)
.packageContent,
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize: 20), fontSize: 20),
@ -162,7 +161,8 @@ class InformationPage extends StatelessWidget {
height: 10, height: 10,
), ),
package_content( package_content(
packageName: 'Oltment for Rash unbranded 50 ml', packageName:
'Oltment for Rash unbranded 50 ml',
packageCount: '1 tube', packageCount: '1 tube',
), ),
SizedBox( SizedBox(
@ -197,9 +197,7 @@ class InformationPage extends StatelessWidget {
side: BorderSide(color: Color(0xff41bdbb)), side: BorderSide(color: Color(0xff41bdbb)),
), ),
child: Text( child: Text(
TranslationBase TranslationBase.of(context).clientReached,
.of(context)
.clientReached,
style: TextStyle( style: TextStyle(
color: Colors.white, color: Colors.white,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
@ -207,19 +205,22 @@ class InformationPage extends StatelessWidget {
), ),
onPressed: () { onPressed: () {
Navigator.push( Navigator.push(
context, MaterialPageRoute( context,
builder: (context) => MaterialPageRoute(
DeliveryConfirmedPage(item))); builder: (context) =>
DeliveryConfirmedPage(item)));
}, },
), ),
], ],
), ),
), ),
CustomerBrief( CustomerBrief(
itemId: item.driverID, itemId: item.driverID,
customerFirstName: item.firstName, customerFirstName: item.firstName,
customerLastName: item.lastName, customerLastName: item.lastName,
mobileNo: item.mobileNumber mobileNo: item.mobileNumber,
latitude: item.latitude,
longitude: item.longitude,
), ),
], ],
), ),
@ -231,8 +232,3 @@ class InformationPage extends StatelessWidget {
); );
} }
} }

@ -11,16 +11,20 @@ class CustomerBrief extends StatelessWidget {
final String direction; final String direction;
final String totalPayment; final String totalPayment;
final String deliveryTime; final String deliveryTime;
final double longitude;
final double latitude;
CustomerBrief( CustomerBrief(
{this.itemId, {this.itemId,
this.time, this.time,
this.customerFirstName, this.customerFirstName,
this.customerLastName, this.customerLastName,
this.mobileNo, this.mobileNo,
this.direction, this.direction,
this.totalPayment, this.totalPayment,
this.deliveryTime}); this.deliveryTime,
this.longitude,
this.latitude});
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -111,9 +115,7 @@ class CustomerBrief extends StatelessWidget {
Row( Row(
children: <Widget>[ children: <Widget>[
Text( Text(
TranslationBase TranslationBase.of(context).payment,
.of(context)
.payment,
), ),
SizedBox( SizedBox(
width: 170, width: 170,
@ -130,9 +132,7 @@ class CustomerBrief extends StatelessWidget {
Row( Row(
children: <Widget>[ children: <Widget>[
Text( Text(
TranslationBase TranslationBase.of(context).delivryTime,
.of(context)
.delivryTime,
), ),
SizedBox( SizedBox(
width: 50, width: 50,
@ -149,4 +149,4 @@ class CustomerBrief extends StatelessWidget {
), ),
); );
} }
} }

@ -67,6 +67,8 @@ dependencies:
# Qr code Scanner # Qr code Scanner
barcode_scan: ^3.0.1 barcode_scan: ^3.0.1
#mape
map_launcher: ^0.12.0

Loading…
Cancel
Save