|
|
|
@ -4,9 +4,6 @@ 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';
|
|
|
|
@ -18,14 +15,10 @@ class InformationPage extends StatelessWidget {
|
|
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
// return AppScaffold(
|
|
|
|
|
|
|
|
// body: Center(
|
|
|
|
|
|
|
|
// child: InkWell(onTap: () {},
|
|
|
|
|
|
|
|
// child: Texts('Replay Page')),
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// );
|
|
|
|
|
|
|
|
return AppScaffold(
|
|
|
|
return AppScaffold(
|
|
|
|
body: Container(
|
|
|
|
body: Container(
|
|
|
|
|
|
|
|
color: Color(0xff41bdbb),
|
|
|
|
|
|
|
|
child: Container(
|
|
|
|
color: Color(0xff41bdbb),
|
|
|
|
color: Color(0xff41bdbb),
|
|
|
|
child: ListView(
|
|
|
|
child: ListView(
|
|
|
|
children: <Widget>[
|
|
|
|
children: <Widget>[
|
|
|
|
@ -35,7 +28,12 @@ class InformationPage extends StatelessWidget {
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
children: <Widget>[
|
|
|
|
children: <Widget>[
|
|
|
|
Container(
|
|
|
|
Container(
|
|
|
|
margin: EdgeInsets.only(right: 50),
|
|
|
|
margin: EdgeInsets.only(
|
|
|
|
|
|
|
|
right: MediaQuery
|
|
|
|
|
|
|
|
.of(context)
|
|
|
|
|
|
|
|
.size
|
|
|
|
|
|
|
|
.width * 0.15, //50
|
|
|
|
|
|
|
|
),
|
|
|
|
child: IconButton(
|
|
|
|
child: IconButton(
|
|
|
|
color: Colors.white,
|
|
|
|
color: Colors.white,
|
|
|
|
iconSize: 50,
|
|
|
|
iconSize: 50,
|
|
|
|
@ -47,7 +45,9 @@ class InformationPage extends StatelessWidget {
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Container(
|
|
|
|
Container(
|
|
|
|
child: Text(
|
|
|
|
child: Text(
|
|
|
|
TranslationBase.of(context).deliveryInfo,
|
|
|
|
TranslationBase
|
|
|
|
|
|
|
|
.of(context)
|
|
|
|
|
|
|
|
.deliveryInfo,
|
|
|
|
style: TextStyle(
|
|
|
|
style: TextStyle(
|
|
|
|
color: Colors.white,
|
|
|
|
color: Colors.white,
|
|
|
|
fontSize: 20,
|
|
|
|
fontSize: 20,
|
|
|
|
@ -59,13 +59,32 @@ class InformationPage extends StatelessWidget {
|
|
|
|
Stack(
|
|
|
|
Stack(
|
|
|
|
children: <Widget>[
|
|
|
|
children: <Widget>[
|
|
|
|
Container(
|
|
|
|
Container(
|
|
|
|
width: 400,
|
|
|
|
width: MediaQuery
|
|
|
|
height: 500,
|
|
|
|
.of(context)
|
|
|
|
|
|
|
|
.size
|
|
|
|
|
|
|
|
.width, //400,
|
|
|
|
|
|
|
|
height: MediaQuery
|
|
|
|
|
|
|
|
.of(context)
|
|
|
|
|
|
|
|
.size
|
|
|
|
|
|
|
|
.width, //500,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Container(
|
|
|
|
Container(
|
|
|
|
width: 800,
|
|
|
|
width: MediaQuery
|
|
|
|
height: 700,
|
|
|
|
.of(context)
|
|
|
|
margin: EdgeInsets.only(top: 100),
|
|
|
|
.size
|
|
|
|
|
|
|
|
.width * 1,
|
|
|
|
|
|
|
|
//800,
|
|
|
|
|
|
|
|
height: MediaQuery
|
|
|
|
|
|
|
|
.of(context)
|
|
|
|
|
|
|
|
.size
|
|
|
|
|
|
|
|
.width * 1.5,
|
|
|
|
|
|
|
|
//700,
|
|
|
|
|
|
|
|
margin: EdgeInsets.only(
|
|
|
|
|
|
|
|
top: MediaQuery
|
|
|
|
|
|
|
|
.of(context)
|
|
|
|
|
|
|
|
.size
|
|
|
|
|
|
|
|
.width * 0.3, //100
|
|
|
|
|
|
|
|
),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
color: Colors.white,
|
|
|
|
color: Colors.white,
|
|
|
|
borderRadius: BorderRadius.only(
|
|
|
|
borderRadius: BorderRadius.only(
|
|
|
|
@ -76,7 +95,10 @@ class InformationPage extends StatelessWidget {
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
children: <Widget>[
|
|
|
|
children: <Widget>[
|
|
|
|
SizedBox(
|
|
|
|
SizedBox(
|
|
|
|
height: 170,
|
|
|
|
height: MediaQuery
|
|
|
|
|
|
|
|
.of(context)
|
|
|
|
|
|
|
|
.size
|
|
|
|
|
|
|
|
.width * 0.2, //170,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Row(
|
|
|
|
Row(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
@ -88,11 +110,10 @@ class InformationPage extends StatelessWidget {
|
|
|
|
size: 30,
|
|
|
|
size: 30,
|
|
|
|
color: Colors.white,
|
|
|
|
color: Colors.white,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
btnName: TranslationBase.of(context).location,
|
|
|
|
btnName: TranslationBase
|
|
|
|
btnFunction: () {
|
|
|
|
.of(context)
|
|
|
|
MapsLauncher.launchCoordinates(
|
|
|
|
.location,
|
|
|
|
item.longitude, item.latitude);
|
|
|
|
btnFunction: () {},
|
|
|
|
},
|
|
|
|
|
|
|
|
),
|
|
|
|
),
|
|
|
|
delivery_info_button(
|
|
|
|
delivery_info_button(
|
|
|
|
btnColor: Colors.green,
|
|
|
|
btnColor: Colors.green,
|
|
|
|
@ -111,7 +132,9 @@ class InformationPage extends StatelessWidget {
|
|
|
|
size: 30,
|
|
|
|
size: 30,
|
|
|
|
color: Colors.white,
|
|
|
|
color: Colors.white,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
btnName: TranslationBase.of(context).sms,
|
|
|
|
btnName: TranslationBase
|
|
|
|
|
|
|
|
.of(context)
|
|
|
|
|
|
|
|
.sms,
|
|
|
|
btnFunction: () {},
|
|
|
|
btnFunction: () {},
|
|
|
|
),
|
|
|
|
),
|
|
|
|
delivery_info_button(
|
|
|
|
delivery_info_button(
|
|
|
|
@ -121,83 +144,107 @@ class InformationPage extends StatelessWidget {
|
|
|
|
size: 30,
|
|
|
|
size: 30,
|
|
|
|
color: Colors.white,
|
|
|
|
color: Colors.white,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
btnName: TranslationBase.of(context).call,
|
|
|
|
btnName: TranslationBase
|
|
|
|
btnFunction: () {
|
|
|
|
.of(context)
|
|
|
|
launch(
|
|
|
|
.call,
|
|
|
|
"tel://" + item.mobileNumber.toString());
|
|
|
|
btnFunction: () {},
|
|
|
|
},
|
|
|
|
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
SizedBox(
|
|
|
|
SizedBox(
|
|
|
|
height: 30,
|
|
|
|
height: MediaQuery
|
|
|
|
|
|
|
|
.of(context)
|
|
|
|
|
|
|
|
.size
|
|
|
|
|
|
|
|
.width * 0.1, //30,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Container(
|
|
|
|
Container(
|
|
|
|
margin: EdgeInsets.only(left: 15, right: 15),
|
|
|
|
margin: EdgeInsets.only(
|
|
|
|
|
|
|
|
left: MediaQuery
|
|
|
|
|
|
|
|
.of(context)
|
|
|
|
|
|
|
|
.size
|
|
|
|
|
|
|
|
.width * 0.05, //15,
|
|
|
|
|
|
|
|
right: MediaQuery
|
|
|
|
|
|
|
|
.of(context)
|
|
|
|
|
|
|
|
.size
|
|
|
|
|
|
|
|
.width * 0.02, //15
|
|
|
|
|
|
|
|
),
|
|
|
|
child: Column(
|
|
|
|
child: Column(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
children: <Widget>[
|
|
|
|
children: <Widget>[
|
|
|
|
Text(
|
|
|
|
Text(
|
|
|
|
TranslationBase.of(context).packageContent,
|
|
|
|
TranslationBase
|
|
|
|
|
|
|
|
.of(context)
|
|
|
|
|
|
|
|
.packageContent,
|
|
|
|
style: TextStyle(
|
|
|
|
style: TextStyle(
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
fontSize: 20),
|
|
|
|
fontSize: 20),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
SizedBox(
|
|
|
|
SizedBox(
|
|
|
|
height: 20,
|
|
|
|
height: MediaQuery
|
|
|
|
),
|
|
|
|
.of(context)
|
|
|
|
package_content(
|
|
|
|
.size
|
|
|
|
packageName: 'Panadol Extra 50 tablet',
|
|
|
|
.width * 0.05, //20,
|
|
|
|
packageCount: '5 box',
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
SizedBox(
|
|
|
|
|
|
|
|
height: 10,
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
package_content(
|
|
|
|
|
|
|
|
packageName: 'Xeractan 20MG 30 Capsules',
|
|
|
|
|
|
|
|
packageCount: '1 PCS',
|
|
|
|
|
|
|
|
),
|
|
|
|
),
|
|
|
|
SizedBox(
|
|
|
|
Column(
|
|
|
|
height: 10,
|
|
|
|
children: List.generate(
|
|
|
|
),
|
|
|
|
item.itemsQuantitiesList.length,
|
|
|
|
package_content(
|
|
|
|
(index) {
|
|
|
|
packageName:
|
|
|
|
return package_content(
|
|
|
|
'Oltment for Rash unbranded 50 ml',
|
|
|
|
packageName: item
|
|
|
|
packageCount: '1 tube',
|
|
|
|
.itemsQuantitiesList[index]
|
|
|
|
),
|
|
|
|
.itemName
|
|
|
|
SizedBox(
|
|
|
|
.toString(),
|
|
|
|
height: 10,
|
|
|
|
//'Panadol Extra 50 tablet',
|
|
|
|
),
|
|
|
|
packageCount: item
|
|
|
|
package_content(
|
|
|
|
.itemsQuantitiesList[index]
|
|
|
|
packageName: 'Face Mask 50 Pieces',
|
|
|
|
.quantity
|
|
|
|
packageCount: '1 box',
|
|
|
|
.toString(),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
SizedBox(
|
|
|
|
}),
|
|
|
|
height: 10,
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
package_content(
|
|
|
|
|
|
|
|
packageName: 'Panadol Extra 50 tablet',
|
|
|
|
|
|
|
|
packageCount: '5 box',
|
|
|
|
|
|
|
|
),
|
|
|
|
),
|
|
|
|
SizedBox(
|
|
|
|
SizedBox(
|
|
|
|
height: 10,
|
|
|
|
height: MediaQuery
|
|
|
|
|
|
|
|
.of(context)
|
|
|
|
|
|
|
|
.size
|
|
|
|
|
|
|
|
.width * 0.01, //10,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
SizedBox(
|
|
|
|
SizedBox(
|
|
|
|
height: 30,
|
|
|
|
height: MediaQuery
|
|
|
|
|
|
|
|
.of(context)
|
|
|
|
|
|
|
|
.size
|
|
|
|
|
|
|
|
.width * 0.1, //30,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
FlatButton(
|
|
|
|
FlatButton(
|
|
|
|
color: Color(0xff41bdbb),
|
|
|
|
color: Color(0xff41bdbb),
|
|
|
|
padding: EdgeInsets.only(
|
|
|
|
padding: EdgeInsets.only(
|
|
|
|
right: 100, left: 100, bottom: 15, top: 15),
|
|
|
|
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(
|
|
|
|
shape: RoundedRectangleBorder(
|
|
|
|
borderRadius: new BorderRadius.circular(30.0),
|
|
|
|
borderRadius: new BorderRadius.circular(30.0),
|
|
|
|
side: BorderSide(color: Color(0xff41bdbb)),
|
|
|
|
side: BorderSide(color: Color(0xff41bdbb)),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
child: Text(
|
|
|
|
child: Text(
|
|
|
|
TranslationBase.of(context).clientReached,
|
|
|
|
TranslationBase
|
|
|
|
|
|
|
|
.of(context)
|
|
|
|
|
|
|
|
.clientReached,
|
|
|
|
style: TextStyle(
|
|
|
|
style: TextStyle(
|
|
|
|
color: Colors.white,
|
|
|
|
color: Colors.white,
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
@ -215,13 +262,12 @@ class InformationPage extends StatelessWidget {
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
CustomerBrief(
|
|
|
|
CustomerBrief(
|
|
|
|
itemId: item.driverID,
|
|
|
|
itemId: item.patientID,
|
|
|
|
customerFirstName: item.firstName,
|
|
|
|
customerFirstName: item.firstName,
|
|
|
|
customerLastName: item.lastName,
|
|
|
|
customerLastName: item.lastName,
|
|
|
|
mobileNo: item.mobileNumber,
|
|
|
|
mobileNo: item.mobileNumber,
|
|
|
|
latitude: item.latitude,
|
|
|
|
totalPayment: item.amount,
|
|
|
|
longitude: item.longitude,
|
|
|
|
deliveryTime: item.orderCreatedOn),
|
|
|
|
),
|
|
|
|
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
@ -229,6 +275,7 @@ class InformationPage extends StatelessWidget {
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
);
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|