fix for slides

This commit is contained in:
2020-07-02 16:16:21 +06:30
parent 9b865a201d
commit 2681de6850
16 changed files with 389 additions and 182 deletions

View File

@@ -566,7 +566,7 @@
"invoice.add_package":"Add Package",
"term":"TERMS",
"term.btn":"Terms of services",
"term.btn":"Terms of service",
"customer.list.title":"CUSTOMERS",
"customer.form.title":"CUSTOMER",

View File

@@ -10,7 +10,7 @@ class InvoiceModel extends BaseModel {
invoiceDate: DateTime(2020, 4, 5, 12, 30),
customerName: 'Ko Nyi',
customerPhoneNumber: '+959 888888888',
amount: 5000,
amount: 500,
status: 'Pending',
packages: [
Package(
@@ -36,15 +36,15 @@ class InvoiceModel extends BaseModel {
receiverAddress: '1 Bo Yar Nyunt St.\nDagon Tsp, Yangon'),
],
receipts: [
Receipt(amount: 2000, date: DateTime(2020, 6, 1)),
Receipt(amount: 1000, date: DateTime(2020, 6, 16)),
Receipt(amount: 200, date: DateTime(2020, 6, 1)),
Receipt(amount: 100, date: DateTime(2020, 6, 16)),
]),
Invoice(
invoiceNumber: 'A092(A)-31',
invoiceDate: DateTime(2020, 4, 5, 9, 30),
customerName: 'Ko Aung Myo',
customerPhoneNumber: '+959 444444444',
amount: 3000,
amount: 300,
status: 'Paid',
packages: [
Package(
@@ -69,14 +69,14 @@ class InvoiceModel extends BaseModel {
receiverAddress: '2 Shwe Taung Kyar St, Bahan Tsp, Yangon'),
],
receipts: [
Receipt(amount: 2000, date: DateTime(2020, 6, 1)),
Receipt(amount: 200, date: DateTime(2020, 6, 1)),
]),
Invoice(
invoiceNumber: 'A092(A)-32',
invoiceDate: DateTime(2020, 4, 6, 10, 10),
customerName: 'Ko Zaw Thu',
customerPhoneNumber: '+959 777777777',
amount: 2000,
amount: 200,
status: 'Paid',
packages: [
Package(
@@ -101,17 +101,17 @@ class InvoiceModel extends BaseModel {
receiverAddress: '3 Kambzwza St, Bahan Tsp, Yangon'),
],
receipts: [
Receipt(amount: 2000, date: DateTime(2020, 6, 1)),
Receipt(amount: 200, date: DateTime(2020, 6, 1)),
]),
Invoice(
invoiceNumber: 'A092(A)-33',
invoiceDate: DateTime(2020, 4, 6, 12, 15),
customerName: 'Ko Myo Min',
customerPhoneNumber: '+959 555555555',
amount: 3000,
amount: 300,
status: 'Pending',
receipts: [
Receipt(amount: 2000, date: DateTime(2020, 6, 1)),
Receipt(amount: 200, date: DateTime(2020, 6, 1)),
],
packages: [
Package(

View File

@@ -23,7 +23,7 @@ class PickUpModel extends BaseModel {
mail: 'admin@fcs.com',
facebook: 'https://facebook.com/fcs');
List<RadioGroup> radioGroups = [
List<RadioGroup> radioGroups1 = [
RadioGroup(
text: "FCS Pickup",
index: 1,
@@ -42,9 +42,33 @@ class PickUpModel extends BaseModel {
),
];
List<RadioGroup> get radioGroups {
List<RadioGroup> radioGroups = [
RadioGroup(
text: "Local Pickup",
index: 1,
),
RadioGroup(
text: "Courier Pickup",
index: 2,
),
RadioGroup(
text: "Local Drop-off",
index: 3,
),
RadioGroup(
text: "Courier Drop-off",
index: 4,
),
];
return radioGroups;
}
List<PickUp> get pickups {
List<PickUp> pickups = [
PickUp(
id: "P200412 - 12 Apr 2020",
id: "S200412 - 12 Apr 2020",
userName: "Ko Kyaw Nyi",
phoneNumber: '+959111111111',
fromTime: '1PM',
@@ -54,7 +78,7 @@ class PickUpModel extends BaseModel {
status: 'Pending',
date: DateTime(2020, 5, 1),
address: '154-19 64th Ave.\nFlushing, NY 11367',
handlingFee: 5000,
handlingFee: 50,
isCourier: true,
radioIndex: 2,
cargoTypes: [
@@ -63,7 +87,7 @@ class PickUpModel extends BaseModel {
Cargo(type: 'Dangerous Cargo', weight: 30)
]),
PickUp(
id: "P200125 - 12 May 2020",
id: "S200125 - 12 May 2020",
userName: "Ko Kyaw Nyi",
phoneNumber: '+959111111111',
fromTime: '1PM',
@@ -73,14 +97,14 @@ class PickUpModel extends BaseModel {
status: 'Confirmed',
date: DateTime(2020, 5, 6),
address: '154-19 64th Ave.\nFlushing, NY 11367',
handlingFee: 5000,
handlingFee: 50,
cargoTypes: [
Cargo(type: 'General Cargo', weight: 25),
Cargo(type: 'Medicine', weight: 20),
Cargo(type: 'Dangerous Cargo', weight: 30)
]),
PickUp(
id: "P200441 - 13 Apr 2020",
id: "S200441 - 13 Apr 2020",
userName: "Ko Kyaw Nyi",
phoneNumber: '+959111111111',
fromTime: '1PM',
@@ -90,7 +114,7 @@ class PickUpModel extends BaseModel {
status: "Pickuped",
date: DateTime(2020, 5, 9),
address: '154-19 64th Ave.\nFlushing, NY 11367',
handlingFee: 5000,
handlingFee: 50,
radioIndex: 3,
cargoTypes: [
Cargo(type: 'General Cargo', weight: 25),
@@ -98,7 +122,7 @@ class PickUpModel extends BaseModel {
Cargo(type: 'Dangerous Cargo', weight: 30)
]),
PickUp(
id: "P200412 - 12 Apr 2020",
id: "S200412 - 12 Apr 2020",
userName: "Ko Kyaw Nyi",
phoneNumber: '+959111111111',
fromTime: '1PM',
@@ -108,14 +132,14 @@ class PickUpModel extends BaseModel {
status: 'Pickuped',
date: DateTime(2020, 5, 15),
address: '154-19 64th Ave.\nFlushing, NY 11367',
handlingFee: 5000,
handlingFee: 50,
cargoTypes: [
Cargo(type: 'General Cargo', weight: 25),
Cargo(type: 'Medicine', weight: 20),
Cargo(type: 'Dangerous Cargo', weight: 30)
]),
PickUp(
id: "P200125 - 12 May 2020",
id: "S200125 - 12 May 2020",
userName: "Ko Kyaw Nyi",
phoneNumber: '+959111111111',
fromTime: '1PM',
@@ -125,14 +149,14 @@ class PickUpModel extends BaseModel {
status: 'Pickuped',
date: DateTime(2020, 5, 20),
address: '154-19 64th Ave.\nFlushing, NY 11367',
handlingFee: 5000,
handlingFee: 50,
cargoTypes: [
Cargo(type: 'General Cargo', weight: 25),
Cargo(type: 'Medicine', weight: 20),
Cargo(type: 'Dangerous Cargo', weight: 30)
]),
PickUp(
id: "P200441 - 13 Apr 2020",
id: "S200441 - 13 Apr 2020",
userName: "Ko Kyaw Nyi",
phoneNumber: '+959111111111',
fromTime: '1PM',
@@ -142,14 +166,14 @@ class PickUpModel extends BaseModel {
status: "Pickuped",
date: DateTime(2020, 5, 21),
address: '154-19 64th Ave.\nFlushing, NY 11367',
handlingFee: 5000,
handlingFee: 50,
cargoTypes: [
Cargo(type: 'General Cargo', weight: 25),
Cargo(type: 'Medicine', weight: 20),
Cargo(type: 'Dangerous Cargo', weight: 30)
]),
PickUp(
id: "P200441 - 10 Apr 2020",
id: "S200441 - 10 Apr 2020",
userName: "Ko Kyaw Nyi",
phoneNumber: '+959111111111',
fromTime: '1PM',
@@ -159,14 +183,14 @@ class PickUpModel extends BaseModel {
status: "Canceled",
date: DateTime(2020, 5, 25),
address: '154-19 64th Ave.\nFlushing, NY 11367',
handlingFee: 5000,
handlingFee: 50,
cargoTypes: [
Cargo(type: 'General Cargo', weight: 25),
Cargo(type: 'Medicine', weight: 20),
Cargo(type: 'Dangerous Cargo', weight: 30)
]),
PickUp(
id: "P200441 - 6 Apr 2020",
id: "S200441 - 6 Apr 2020",
userName: "Ko Kyaw Nyi",
phoneNumber: '+959111111111',
fromTime: '1PM',
@@ -176,7 +200,151 @@ class PickUpModel extends BaseModel {
status: "Canceled",
date: DateTime(2020, 5, 27),
address: '154-19 64th Ave.\nFlushing, NY 11367',
handlingFee: 5000,
handlingFee: 50,
cargoTypes: [
Cargo(type: 'General Cargo', weight: 25),
Cargo(type: 'Medicine', weight: 20),
Cargo(type: 'Dangerous Cargo', weight: 30)
]),
];
return pickups;
}
List<PickUp> pickups1 = [
PickUp(
id: "S200412 - 12 Apr 2020",
userName: "Ko Kyaw Nyi",
phoneNumber: '+959111111111',
fromTime: '1PM',
toTime: '3PM',
numberOfPackage: 5,
weight: 25,
status: 'Pending',
date: DateTime(2020, 5, 1),
address: '154-19 64th Ave.\nFlushing, NY 11367',
handlingFee: 50,
isCourier: true,
radioIndex: 2,
cargoTypes: [
Cargo(type: 'General Cargo', weight: 25),
Cargo(type: 'Medicine', weight: 20),
Cargo(type: 'Dangerous Cargo', weight: 30)
]),
PickUp(
id: "S200125 - 12 May 2020",
userName: "Ko Kyaw Nyi",
phoneNumber: '+959111111111',
fromTime: '1PM',
toTime: '3PM',
numberOfPackage: 5,
weight: 25,
status: 'Confirmed',
date: DateTime(2020, 5, 6),
address: '154-19 64th Ave.\nFlushing, NY 11367',
handlingFee: 50,
cargoTypes: [
Cargo(type: 'General Cargo', weight: 25),
Cargo(type: 'Medicine', weight: 20),
Cargo(type: 'Dangerous Cargo', weight: 30)
]),
PickUp(
id: "S200441 - 13 Apr 2020",
userName: "Ko Kyaw Nyi",
phoneNumber: '+959111111111',
fromTime: '1PM',
toTime: '3PM',
numberOfPackage: 5,
weight: 25,
status: "Pickuped",
date: DateTime(2020, 5, 9),
address: '154-19 64th Ave.\nFlushing, NY 11367',
handlingFee: 50,
radioIndex: 3,
cargoTypes: [
Cargo(type: 'General Cargo', weight: 25),
Cargo(type: 'Medicine', weight: 20),
Cargo(type: 'Dangerous Cargo', weight: 30)
]),
PickUp(
id: "S200412 - 12 Apr 2020",
userName: "Ko Kyaw Nyi",
phoneNumber: '+959111111111',
fromTime: '1PM',
toTime: '3PM',
numberOfPackage: 5,
weight: 25,
status: 'Pickuped',
date: DateTime(2020, 5, 15),
address: '154-19 64th Ave.\nFlushing, NY 11367',
handlingFee: 50,
cargoTypes: [
Cargo(type: 'General Cargo', weight: 25),
Cargo(type: 'Medicine', weight: 20),
Cargo(type: 'Dangerous Cargo', weight: 30)
]),
PickUp(
id: "S200125 - 12 May 2020",
userName: "Ko Kyaw Nyi",
phoneNumber: '+959111111111',
fromTime: '1PM',
toTime: '3PM',
numberOfPackage: 5,
weight: 25,
status: 'Pickuped',
date: DateTime(2020, 5, 20),
address: '154-19 64th Ave.\nFlushing, NY 11367',
handlingFee: 50,
cargoTypes: [
Cargo(type: 'General Cargo', weight: 25),
Cargo(type: 'Medicine', weight: 20),
Cargo(type: 'Dangerous Cargo', weight: 30)
]),
PickUp(
id: "S200441 - 13 Apr 2020",
userName: "Ko Kyaw Nyi",
phoneNumber: '+959111111111',
fromTime: '1PM',
toTime: '3PM',
numberOfPackage: 5,
weight: 25,
status: "Pickuped",
date: DateTime(2020, 5, 21),
address: '154-19 64th Ave.\nFlushing, NY 11367',
handlingFee: 50,
cargoTypes: [
Cargo(type: 'General Cargo', weight: 25),
Cargo(type: 'Medicine', weight: 20),
Cargo(type: 'Dangerous Cargo', weight: 30)
]),
PickUp(
id: "S200441 - 10 Apr 2020",
userName: "Ko Kyaw Nyi",
phoneNumber: '+959111111111',
fromTime: '1PM',
toTime: '3PM',
numberOfPackage: 5,
weight: 25,
status: "Canceled",
date: DateTime(2020, 5, 25),
address: '154-19 64th Ave.\nFlushing, NY 11367',
handlingFee: 50,
cargoTypes: [
Cargo(type: 'General Cargo', weight: 25),
Cargo(type: 'Medicine', weight: 20),
Cargo(type: 'Dangerous Cargo', weight: 30)
]),
PickUp(
id: "S200441 - 6 Apr 2020",
userName: "Ko Kyaw Nyi",
phoneNumber: '+959111111111',
fromTime: '1PM',
toTime: '3PM',
numberOfPackage: 5,
weight: 25,
status: "Canceled",
date: DateTime(2020, 5, 27),
address: '154-19 64th Ave.\nFlushing, NY 11367',
handlingFee: 50,
cargoTypes: [
Cargo(type: 'General Cargo', weight: 25),
Cargo(type: 'Medicine', weight: 20),
@@ -219,6 +387,6 @@ class PickUpModel extends BaseModel {
@override
logout() async {
if (listener != null) await listener.cancel();
pickups = [];
// pickups = [];
}
}

View File

@@ -30,8 +30,8 @@ class ShipmentRateModel extends BaseModel {
];
List<Discount> discountsByWeight = [
Discount(weight: 10, discountRate: 3),
Discount(weight: 20, discountRate: 5)
Discount(weight: 50, discountRate: 0.25),
Discount(weight: 100, discountRate: 0.50)
];
int freeDeliveryWeight = 10;

View File

@@ -285,7 +285,7 @@ class BoxModel extends BaseModel {
return boxes
.where((e) =>
e.status == "Packed" ||
e.status == "Received" ||
// e.status == "Received" ||
e.status == "Shipped" ||
e.status == "Arrived")
.toList()

View File

@@ -209,8 +209,8 @@ class _HomePageState extends State<HomePage> {
owner ? widgets.add(deliveryBtn) : "";
owner ? widgets.add(customersBtn) : "";
customer || owner ? widgets.add(invoicesBtn) : "";
customer || owner ? widgets.add(paymentMethodBtn) : "";
customer || owner ? widgets.add(discountBtn) : "";
owner ? widgets.add(paymentMethodBtn) : "";
owner ? widgets.add(discountBtn) : "";
// widgets.add(termBtn);
return OfflineRedirect(
@@ -352,7 +352,7 @@ class _HomePageState extends State<HomePage> {
MaterialPageRoute(builder: (_) => Term()));
},
child: _buildSmallButton(
"Terms of services", Icons.info_outline),
"Terms of service", Icons.info_outline),
),
],
)

View File

@@ -143,7 +143,7 @@ class _HomePageWelcomeState extends State<HomePageWelcome> {
child: Column(
children: <Widget>[
Padding(
padding: const EdgeInsets.all(100.0),
padding: const EdgeInsets.all(80.0),
child: Text(
"Welcome!",
textAlign: TextAlign.center,
@@ -154,7 +154,7 @@ class _HomePageWelcomeState extends State<HomePageWelcome> {
),
),
Padding(
padding: const EdgeInsets.only(top: 80.0),
padding: const EdgeInsets.only(top: 0.0),
child: Text(
"Cargo Services",
textAlign: TextAlign.center,
@@ -260,7 +260,7 @@ class _HomePageWelcomeState extends State<HomePageWelcome> {
MaterialPageRoute(builder: (_) => Term()));
},
child: _buildSmallButton(
"Terms of services", Icons.info_outline),
"Terms of service", Icons.info_outline),
),
],
)

View File

@@ -1,4 +1,5 @@
import 'package:fcs/model/invoice_model.dart';
import 'package:fcs/model/main_model.dart';
import 'package:fcs/model/shipment_model.dart';
import 'package:fcs/model_fcs/package_model.dart';
import 'package:fcs/pages_fcs/package_list_row.dart';
@@ -38,10 +39,12 @@ class _InvoiceListState extends State<InvoiceList> {
@override
Widget build(BuildContext context) {
var owner = Provider.of<MainModel>(context).isOwner();
return LocalProgress(
inAsyncCall: _isLoading,
child: DefaultTabController(
length: 3,
length: 2,
child: Scaffold(
appBar: AppBar(
centerTitle: true,
@@ -65,22 +68,21 @@ class _InvoiceListState extends State<InvoiceList> {
bottom: TabBar(
unselectedLabelColor: Colors.grey,
tabs: [
Tab(text: "Boxes"),
Tab(text: "Pending"),
Tab(text: "Paid"),
],
),
),
floatingActionButton: FloatingActionButton.extended(
floatingActionButton:owner? FloatingActionButton.extended(
onPressed: () {
_newInvoice();
},
icon: Icon(Icons.add),
label: Text(AppTranslations.of(context).text("invoices.add")),
backgroundColor: primaryColor,
),
):null,
body: TabBarView(
children: [_packages(), _pending(), _paided()],
children: [ _pending(), _paided()],
)),
),
);

View File

@@ -128,23 +128,33 @@ class _InvoiceListRowState extends State<InvoiceListRow> {
),
),
),
Padding(
padding: const EdgeInsets.all(0),
child: getStatus(_invoice.status),
),
// Padding(
// padding: const EdgeInsets.all(0),
// child: getStatus(_invoice.status),
// ),
_invoice.status=="Pending"?
Padding(
padding: const EdgeInsets.only(left: 10.0),
child: InkWell(
child: Icon(
Icons.payment,
color: primaryColor,
child: RaisedButton(
child: Row(
children: <Widget>[
Icon(
Icons.payment,
color: primaryColor,
),
Padding(
padding: const EdgeInsets.only(left:8.0),
child: Text("Payment"),
)
],
),
onTap: () {
onPressed: () {
Navigator.of(context)
.push(BottomUpPageRoute(PaymentPage(invoice: _invoice)));
},
),
),
)),
):Container(),
Padding(
padding: const EdgeInsets.only(left: 8.0),
child: InkWell(

View File

@@ -30,8 +30,7 @@ class _PaymentPDFScreenState extends State<PaymentPDFScreen>
return Scaffold(
appBar: AppBar(
backgroundColor: primaryColor,
title: LocalText(context, 'pdf_view.title',
color: Colors.white, fontSize: 20),
title:Text("Invoice File"),
actions: <Widget>[
IconButton(
icon: Icon(Icons.share),
@@ -95,21 +94,21 @@ class _PaymentPDFScreenState extends State<PaymentPDFScreen>
// )
],
),
floatingActionButton: FutureBuilder<PDFViewController>(
future: _controller.future,
builder: (context, AsyncSnapshot<PDFViewController> snapshot) {
if (snapshot.hasData) {
return FloatingActionButton.extended(
label: Text("Go to ${pages ~/ 2}"),
onPressed: () async {
await snapshot.data.setPage(pages ~/ 2);
},
);
}
// floatingActionButton: FutureBuilder<PDFViewController>(
// future: _controller.future,
// builder: (context, AsyncSnapshot<PDFViewController> snapshot) {
// if (snapshot.hasData) {
// return FloatingActionButton.extended(
// label: Text("Go to ${pages ~/ 2}"),
// onPressed: () async {
// await snapshot.data.setPage(pages ~/ 2);
// },
// );
// }
return Container();
},
),
// return Container();
// },
// ),
);
}
}

View File

@@ -220,7 +220,7 @@ class _PickupBoxEditorState extends State<PickupBoxEditor> {
),
ExpansionTile(
title: Text(
'Address',
'Shipment Address',
style: TextStyle(
color: primaryColor, fontWeight: FontWeight.bold),
),

View File

@@ -11,6 +11,8 @@ import 'package:fcs/vo/shipping_address.dart';
import 'package:fcs/widget/bottom_up_page_route.dart';
import 'package:fcs/widget/fcs_text_field.dart';
import 'package:fcs/widget/fcs_text_field_readonly.dart';
import 'package:fcs/widget/multi_img_controller.dart';
import 'package:fcs/widget/multi_img_file.dart';
import 'package:flutter_datetime_picker/flutter_datetime_picker.dart';
import 'package:flutter_icons/flutter_icons.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
@@ -35,6 +37,7 @@ class PickUpEditor extends StatefulWidget {
class _PickUpEditorState extends State<PickUpEditor> {
var dateFormatter = new DateFormat('dd MMM yyyy');
final numberFormatter = new NumberFormat("#,###");
MultiImgController multiImgController = MultiImgController();
TextEditingController _addressEditingController = new TextEditingController();
TextEditingController _fromTimeEditingController =
@@ -273,19 +276,21 @@ class _PickUpEditorState extends State<PickUpEditor> {
? Padding(
padding: const EdgeInsets.only(left: 15.0),
child: fcsInputReadOnly(
"Courier Fee", FontAwesomeIcons.moneyBill,
"Handling Fee/Courier Fee",
FontAwesomeIcons.moneyBill,
controller: _handlingFeeController),
)
: Padding(
padding: const EdgeInsets.only(left: 15.0),
child: fcsInputReadOnly(
"Handling Fee", FontAwesomeIcons.moneyBill,
"Handling Fee/Courier Fee",
FontAwesomeIcons.moneyBill,
controller: _handlingFeeController),
),
ExpansionTile(
title: Text(
'Shipment Type',
'Pickup/Drop-off',
style: TextStyle(
color: primaryColor, fontWeight: FontWeight.bold),
),
@@ -313,7 +318,7 @@ class _PickUpEditorState extends State<PickUpEditor> {
? Container(
child: ShippingAddressRow(
shippingAddress: ShippingAddress(
fullName: 'Myo Min',
fullName: 'FCS Office',
addressLine1: '154-19 64th Ave.',
addressLine2: 'Flushing',
city: 'NY',
@@ -324,66 +329,22 @@ class _PickUpEditorState extends State<PickUpEditor> {
: _currVal == 4
? Container(
child: Column(
children: <Widget>[
ShippingAddressRow(
shippingAddress:
shipmentModel.shippingAddresses[1]),
Container(
padding: EdgeInsets.only(
top: 20, bottom: 15, right: 15),
child: Align(
alignment: Alignment.bottomRight,
child: Container(
width: 120,
height: 40,
child: FloatingActionButton.extended(
materialTapTargetSize:
MaterialTapTargetSize.shrinkWrap,
onPressed: () {},
icon: Icon(Icons.add),
label: Text(
'Select\nAddress',
style: TextStyle(fontSize: 12),
),
backgroundColor: primaryColor,
),
),
),
),
],
))
: ExpansionTile(
title: Text(
'Package Information',
style: TextStyle(
color: primaryColor,
fontWeight: FontWeight.bold),
),
children: <Widget>[
Column(
children: getBoxList(context, boxModel.boxes),
),
Container(
padding: EdgeInsets.only(
top: 20, bottom: 15, right: 15),
child: Align(
alignment: Alignment.bottomRight,
alignment: Alignment.center,
child: Container(
width: 120,
width: 350,
height: 40,
child: FloatingActionButton.extended(
materialTapTargetSize:
MaterialTapTargetSize.shrinkWrap,
icon: Icon(Icons.add),
onPressed: () {
Navigator.push(
context,
BottomUpPageRoute(
PickupBoxEditor()),
);
},
onPressed: () {},
icon: Icon(Icons.arrow_right),
label: Text(
'Add Package',
'Visit courier websie for nearest drop-off',
style: TextStyle(fontSize: 12),
),
backgroundColor: primaryColor,
@@ -391,9 +352,50 @@ class _PickUpEditorState extends State<PickUpEditor> {
),
),
),
SizedBox(height: 10.0),
],
))
: Container(),
ExpansionTile(
title: Text(
'Package Information',
style: TextStyle(
color: primaryColor, fontWeight: FontWeight.bold),
),
children: <Widget>[
Column(
children: getBoxList(context, boxModel.boxes),
),
Container(
padding:
EdgeInsets.only(top: 20, bottom: 15, right: 15),
child: Align(
alignment: Alignment.bottomRight,
child: Container(
width: 120,
height: 40,
child: FloatingActionButton.extended(
materialTapTargetSize:
MaterialTapTargetSize.shrinkWrap,
icon: Icon(Icons.add),
onPressed: () {
Navigator.push(
context,
BottomUpPageRoute(PickupBoxEditor()),
);
},
label: Text(
'Add Package',
style: TextStyle(fontSize: 12),
),
backgroundColor: primaryColor,
),
),
),
),
SizedBox(height: 10.0),
],
),
_currVal == 3 || _currVal == 4
? Container()
: ExpansionTile(
@@ -592,6 +594,30 @@ class _PickUpEditorState extends State<PickUpEditor> {
)
: Container()
: Container(),
Padding(
padding: EdgeInsets.only(left: 20),
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Container(
padding: EdgeInsets.only(top: 8),
child: Text(
'Attach Courier Shiping Labels',
style: TextStyle(
color: Colors.black, fontSize: 16),
),
),
Container(
padding: EdgeInsets.only(left: 10),
child: MultiImageFile(
enabled: true,
controller: multiImgController,
title: "Receipt File",
)),
],
),
),
],
),
]),
@@ -603,7 +629,7 @@ class _PickUpEditorState extends State<PickUpEditor> {
child: Container(
width: 250,
child: FlatButton(
child: Text('Request for shipment'),
child: Text('Create shipment'),
color: primaryColor,
textColor: Colors.white,
onPressed: () {
@@ -635,7 +661,7 @@ class _PickUpEditorState extends State<PickUpEditor> {
child: Container(
width: 250,
child: FlatButton(
child: Text('Assign Shipment'),
child: Text('Confirm Shipment'),
color: primaryColor,
textColor: Colors.white,
onPressed: () {

View File

@@ -99,9 +99,9 @@ class _ShipmentRatesCalState extends State<ShipmentRatesCal> {
),
),
_row('Width (inches)', "", "", "10", input: true),
_row('Height', "", "", "10", input: true),
_row('Length', "", "", "10", input: true),
_row('Actual Weight', "", "", "0", input: true),
_row('Height (inches)', "", "", "10", input: true),
_row('Length (inches)', "", "", "10", input: true),
_row('Actual Weight (pounds)', "", "", "0", input: true),
Container(
padding: EdgeInsets.only(left: 25, top: 15, bottom: 5),
child: Row(
@@ -174,7 +174,7 @@ class _ShipmentRatesCalState extends State<ShipmentRatesCal> {
width: 50,
),
Container(
width: 150,
width: 50,
child: TextFormField(
initialValue: value,
textAlign: TextAlign.end,

View File

@@ -204,17 +204,33 @@ class _PackageEditorState extends State<PackageEditor> {
padding: const EdgeInsets.only(
left: 20.0, right: 20),
child: TextFormField(
initialValue: isNew ? "" : "PKG2039",
initialValue: _package.receiverName,
decoration: InputDecoration(
fillColor: Colors.white,
labelText: 'Package ID',
hintText: 'Package ID',
filled: true,
icon: Icon(MaterialCommunityIcons.id_card,
color: primaryColor),
),
fillColor: Colors.white,
labelText: 'Customer Name',
filled: true,
icon: Icon(Feather.user,
color: Colors.white),
suffixIcon: IconButton(
icon: Icon(Icons.search),
onPressed: () {})),
),
),
// Padding(
// padding: const EdgeInsets.only(
// left: 20.0, right: 20),
// child: TextFormField(
// initialValue: isNew ? "" : "PKG2039",
// decoration: InputDecoration(
// fillColor: Colors.white,
// labelText: 'Package ID',
// hintText: 'Package ID',
// filled: true,
// icon: Icon(MaterialCommunityIcons.id_card,
// color: primaryColor),
// ),
// ),
// ),
Padding(
padding: const EdgeInsets.only(
left: 20.0, right: 20),
@@ -231,39 +247,24 @@ class _PackageEditorState extends State<PackageEditor> {
),
),
),
Padding(
padding: const EdgeInsets.only(
left: 20.0, right: 20),
child: TextFormField(
initialValue: _package.receiverName,
decoration: InputDecoration(
fillColor: Colors.white,
labelText: 'Customer Name',
filled: true,
icon: Icon(Feather.user,
color: Colors.white),
suffixIcon: IconButton(
icon: Icon(Icons.search),
onPressed: () {})),
),
),
Padding(
padding: const EdgeInsets.only(
left: 20.0, right: 20),
child: TextFormField(
initialValue: isNew ? "" : "",
decoration: InputDecoration(
fillColor: Colors.white,
labelText: 'Pickup ID',
filled: true,
icon: Icon(
MaterialCommunityIcons.directions,
color: primaryColor),
suffixIcon: IconButton(
icon: Icon(Icons.search),
onPressed: () {})),
),
),
// Padding(
// padding: const EdgeInsets.only(
// left: 20.0, right: 20),
// child: TextFormField(
// initialValue: isNew ? "" : "",
// decoration: InputDecoration(
// fillColor: Colors.white,
// labelText: 'Pickup ID',
// filled: true,
// icon: Icon(
// MaterialCommunityIcons.directions,
// color: primaryColor),
// suffixIcon: IconButton(
// icon: Icon(Icons.search),
// onPressed: () {})),
// ),
// ),
],
)
: Container(),
@@ -362,6 +363,7 @@ class _PackageEditorState extends State<PackageEditor> {
),
],
),
isNew?Container():
getShippingAddressList(context),
isNew
? Container()

View File

@@ -58,7 +58,7 @@ class _PackageListRowtate extends State<PackageListRow> {
Padding(
padding: const EdgeInsets.only(left: 8.0),
child: new Text(
_package.id == null ? '' : _package.id,
_package.id == null ? '' : _package.trackingID,
style: new TextStyle(
fontSize: 15.0, color: Colors.black),
),
@@ -71,16 +71,16 @@ class _PackageListRowtate extends State<PackageListRow> {
fontSize: 15.0, color: Colors.black),
),
),
Padding(
padding: const EdgeInsets.only(left: 8.0),
child: new Text(
_package.trackingID == null
? ''
: _package.trackingID,
style: new TextStyle(
fontSize: 15.0, color: Colors.grey),
),
),
// Padding(
// padding: const EdgeInsets.only(left: 8.0),
// child: new Text(
// _package.trackingID == null
// ? ''
// : _package.trackingID,
// style: new TextStyle(
// fontSize: 15.0, color: Colors.grey),
// ),
// ),
],
),
),

View File

@@ -4,7 +4,7 @@ class Discount {
String status;
double amount;
int weight;
int discountRate;
double discountRate;
Discount(
{this.code,