You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
296 lines
13 KiB
Dart
296 lines
13 KiB
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/delivery_action_button.dart';
|
|
import 'package:driverapp/widgets/delivery/package_content.dart';
|
|
import 'package:flutter/cupertino.dart';
|
|
import 'package:flutter/material.dart';
|
|
|
|
import '../../uitl/translations_delegate_base.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: Container(
|
|
color: Color(0xff3ABBBA),
|
|
child: Container(
|
|
color: Color(0xff3ABBBA),
|
|
child: ListView(
|
|
children: <Widget>[
|
|
Column(
|
|
children: <Widget>[
|
|
Row(
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
children: <Widget>[
|
|
Container(
|
|
margin: EdgeInsets.only(
|
|
right: MediaQuery
|
|
.of(context)
|
|
.size
|
|
.width * 0.10, //50
|
|
),
|
|
child: IconButton(
|
|
color: Colors.white,
|
|
iconSize: 50,
|
|
icon: Icon(Icons.arrow_back),
|
|
onPressed: () {
|
|
Navigator.pop(context);
|
|
},
|
|
),
|
|
),
|
|
Container(
|
|
child: Text(
|
|
TranslationBase
|
|
.of(context)
|
|
.deliveryInfo,
|
|
style: TextStyle(
|
|
color: Colors.white,
|
|
fontSize: 20,
|
|
),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
Stack(
|
|
children: <Widget>[
|
|
Container(
|
|
width: MediaQuery
|
|
.of(context)
|
|
.size
|
|
.width, //400,
|
|
height: MediaQuery
|
|
.of(context)
|
|
.size
|
|
.width, //500,
|
|
),
|
|
Container(
|
|
width: MediaQuery
|
|
.of(context)
|
|
.size
|
|
.width * 1,
|
|
//800,
|
|
height: MediaQuery
|
|
.of(context)
|
|
.size
|
|
.width * 1.5,
|
|
//700,
|
|
margin: EdgeInsets.only(
|
|
top: MediaQuery
|
|
.of(context)
|
|
.size
|
|
.width * 0.23, //100
|
|
),
|
|
decoration: BoxDecoration(
|
|
color: Theme.of(context).scaffoldBackgroundColor,
|
|
borderRadius: BorderRadius.only(
|
|
topLeft: Radius.circular(45),
|
|
topRight: Radius.circular(45)),
|
|
),
|
|
child: Column(
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
children: <Widget>[
|
|
SizedBox(
|
|
height: MediaQuery
|
|
.of(context)
|
|
.size
|
|
.width * 0.4, //170,
|
|
),
|
|
Row(
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
children: <Widget>[
|
|
deliveryInfoButton(
|
|
btnColor: Color(0xffED1C24),
|
|
btnIcon: Icon(
|
|
Icons.near_me,
|
|
size: 30,
|
|
color: Colors.white,
|
|
),
|
|
btnName: TranslationBase
|
|
.of(context)
|
|
.location,
|
|
btnFunction: () {},
|
|
),
|
|
deliveryInfoButton(
|
|
btnColor: Color(0xFF61B260),
|
|
btnIcon: Icon(
|
|
Icons.whatshot,
|
|
size: 30,
|
|
color: Colors.white,
|
|
),
|
|
btnName: 'Whatsapp',
|
|
btnFunction: () {},
|
|
),
|
|
deliveryInfoButton(
|
|
btnColor: Color(0xFFFCB657),
|
|
btnIcon: Icon(
|
|
Icons.mail_outline,
|
|
size: 30,
|
|
color: Colors.white,
|
|
),
|
|
btnName: TranslationBase
|
|
.of(context)
|
|
.sms,
|
|
btnFunction: () {},
|
|
),
|
|
deliveryInfoButton(
|
|
btnColor: Color(0xff41bdbb),
|
|
btnIcon: Icon(
|
|
Icons.phone,
|
|
size: 30,
|
|
color: Colors.white,
|
|
),
|
|
btnName: TranslationBase
|
|
.of(context)
|
|
.call,
|
|
btnFunction: () {},
|
|
),
|
|
],
|
|
),
|
|
SizedBox(
|
|
height: MediaQuery
|
|
.of(context)
|
|
.size
|
|
.width * 0.1, //30,
|
|
),
|
|
Container(
|
|
margin: EdgeInsets.only(
|
|
left: MediaQuery
|
|
.of(context)
|
|
.size
|
|
.width * 0.05, //15,
|
|
right: MediaQuery
|
|
.of(context)
|
|
.size
|
|
.width * 0.05, //15
|
|
),
|
|
child: Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: <Widget>[
|
|
Text(
|
|
TranslationBase
|
|
.of(context)
|
|
.packageContent,
|
|
style: TextStyle(
|
|
fontWeight: FontWeight.w900,
|
|
fontSize: 20),
|
|
),
|
|
SizedBox(
|
|
height: MediaQuery
|
|
.of(context)
|
|
.size
|
|
.width * 0.05, //20,
|
|
),
|
|
Column(
|
|
children: List.generate(
|
|
item.itemsQuantitiesList.length,
|
|
(index) {
|
|
return package_content(
|
|
packageName: item
|
|
.itemsQuantitiesList[index]
|
|
.itemName
|
|
.toString(),
|
|
packageCount: item
|
|
.itemsQuantitiesList[index]
|
|
.quantity
|
|
.toString(),
|
|
);
|
|
}),
|
|
),
|
|
SizedBox(
|
|
height: MediaQuery
|
|
.of(context)
|
|
.size
|
|
.width * 0.01, //10,
|
|
),
|
|
],
|
|
),
|
|
),
|
|
SizedBox(
|
|
height: MediaQuery
|
|
.of(context)
|
|
.size
|
|
.width * 0.1, //30,
|
|
),
|
|
Container(
|
|
margin: EdgeInsets.all(10),
|
|
// height: MediaQuery.of(context).size.height *0.08,
|
|
child: SecondaryButton(
|
|
label: TranslationBase.of(context).clientReached,
|
|
onTap: () {
|
|
Navigator.push(
|
|
context,
|
|
MaterialPageRoute(
|
|
builder: (context) =>
|
|
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)));
|
|
// },
|
|
// ),
|
|
],
|
|
),
|
|
),
|
|
CustomerBrief(
|
|
itemId: item.patientID,
|
|
customerFirstName: item.firstName,
|
|
customerLastName: item.lastName,
|
|
mobileNo: item.mobileNumber,
|
|
totalPayment: item.amount,
|
|
deliveryTime: item.orderCreatedOn),
|
|
],
|
|
),
|
|
],
|
|
),
|
|
],
|
|
),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|