update carton list
This commit is contained in:
@@ -28,6 +28,7 @@ class _CartonListState extends State<CartonList> {
|
|||||||
bool _isLoading = false;
|
bool _isLoading = false;
|
||||||
List<FcsShipment> _shipments = [];
|
List<FcsShipment> _shipments = [];
|
||||||
FcsShipment? _selectedShipment;
|
FcsShipment? _selectedShipment;
|
||||||
|
bool _down = true;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
@@ -119,6 +120,20 @@ class _CartonListState extends State<CartonList> {
|
|||||||
backgroundColor: primaryColor,
|
backgroundColor: primaryColor,
|
||||||
),
|
),
|
||||||
body: Column(
|
body: Column(
|
||||||
|
children: [
|
||||||
|
AnimatedSwitcher(
|
||||||
|
duration: const Duration(milliseconds: 300),
|
||||||
|
transitionBuilder: (Widget child, Animation<double> animation) =>
|
||||||
|
FadeTransition(
|
||||||
|
opacity: animation,
|
||||||
|
child: SizeTransition(
|
||||||
|
child: child,
|
||||||
|
sizeFactor: animation,
|
||||||
|
axis: Axis.vertical,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
child: _down
|
||||||
|
? Column(
|
||||||
children: [
|
children: [
|
||||||
shipmentFilterBox,
|
shipmentFilterBox,
|
||||||
Wrap(
|
Wrap(
|
||||||
@@ -135,24 +150,32 @@ class _CartonListState extends State<CartonList> {
|
|||||||
children: [
|
children: [
|
||||||
const Text("Consignee: ",
|
const Text("Consignee: ",
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 12, color: Colors.grey)),
|
fontSize: 12,
|
||||||
|
color: Colors.grey)),
|
||||||
Text(
|
Text(
|
||||||
cartonModel.filterByConsingee!.name ??
|
cartonModel
|
||||||
|
.filterByConsingee!
|
||||||
|
.name ??
|
||||||
"",
|
"",
|
||||||
style: const TextStyle(
|
style: const TextStyle(
|
||||||
fontSize: 12, color: Colors.black)),
|
fontSize: 12,
|
||||||
|
color: Colors.black)),
|
||||||
const SizedBox(width: 3),
|
const SizedBox(width: 3),
|
||||||
Text(
|
Text(
|
||||||
cartonModel.filterByConsingee!.fcsID ??
|
cartonModel
|
||||||
|
.filterByConsingee!
|
||||||
|
.fcsID ??
|
||||||
"",
|
"",
|
||||||
style: const TextStyle(
|
style: const TextStyle(
|
||||||
fontSize: 12, color: labelColor)),
|
fontSize: 12,
|
||||||
|
color: labelColor)),
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.only(left: 5),
|
padding:
|
||||||
|
const EdgeInsets.only(left: 5),
|
||||||
child: InkResponse(
|
child: InkResponse(
|
||||||
radius: 30,
|
radius: 30,
|
||||||
onTap: () {
|
onTap: () {
|
||||||
@@ -160,8 +183,10 @@ class _CartonListState extends State<CartonList> {
|
|||||||
.read<CartonModel>()
|
.read<CartonModel>()
|
||||||
.clearFilterConsignee();
|
.clearFilterConsignee();
|
||||||
},
|
},
|
||||||
child: const Icon(AntDesign.closecircleo,
|
child: const Icon(
|
||||||
size: 20, color: dangerColor),
|
AntDesign.closecircleo,
|
||||||
|
size: 20,
|
||||||
|
color: dangerColor),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
@@ -179,21 +204,30 @@ class _CartonListState extends State<CartonList> {
|
|||||||
children: [
|
children: [
|
||||||
const Text("Sender: ",
|
const Text("Sender: ",
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 12, color: Colors.grey)),
|
fontSize: 12,
|
||||||
Text(cartonModel.filterBySender!.name ?? "",
|
color: Colors.grey)),
|
||||||
|
Text(
|
||||||
|
cartonModel.filterBySender!
|
||||||
|
.name ??
|
||||||
|
"",
|
||||||
style: const TextStyle(
|
style: const TextStyle(
|
||||||
fontSize: 12, color: Colors.black)),
|
fontSize: 12,
|
||||||
|
color: Colors.black)),
|
||||||
const SizedBox(width: 3),
|
const SizedBox(width: 3),
|
||||||
Text(
|
Text(
|
||||||
cartonModel.filterBySender!.fcsID ?? "",
|
cartonModel.filterBySender!
|
||||||
|
.fcsID ??
|
||||||
|
"",
|
||||||
style: const TextStyle(
|
style: const TextStyle(
|
||||||
fontSize: 12, color: labelColor)),
|
fontSize: 12,
|
||||||
|
color: labelColor)),
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.only(left: 5),
|
padding:
|
||||||
|
const EdgeInsets.only(left: 5),
|
||||||
child: InkResponse(
|
child: InkResponse(
|
||||||
radius: 30,
|
radius: 30,
|
||||||
onTap: () {
|
onTap: () {
|
||||||
@@ -201,8 +235,10 @@ class _CartonListState extends State<CartonList> {
|
|||||||
.read<CartonModel>()
|
.read<CartonModel>()
|
||||||
.clearFilterSender();
|
.clearFilterSender();
|
||||||
},
|
},
|
||||||
child: const Icon(AntDesign.closecircleo,
|
child: const Icon(
|
||||||
size: 20, color: dangerColor),
|
AntDesign.closecircleo,
|
||||||
|
size: 20,
|
||||||
|
color: dangerColor),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
@@ -212,13 +248,24 @@ class _CartonListState extends State<CartonList> {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
Divider(color: Colors.grey.shade400),
|
Divider(color: Colors.grey.shade400),
|
||||||
|
],
|
||||||
|
)
|
||||||
|
: const SizedBox(),
|
||||||
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: cartonModel.getBoxes == null
|
child: cartonModel.getBoxes == null
|
||||||
? const SizedBox()
|
? const SizedBox()
|
||||||
: PaginatorListView<Carton>(
|
: PaginatorListView<Carton>(
|
||||||
paginatorListener: cartonModel.getBoxes!,
|
paginatorListener: cartonModel.getBoxes!,
|
||||||
rowBuilder: (p) => CartonListRow(box: p),
|
rowBuilder: (p) => CartonListRow(box: p),
|
||||||
color: primaryColor),
|
color: primaryColor,
|
||||||
|
onScroll: ((down) {
|
||||||
|
if (_down == down) return;
|
||||||
|
setState(() {
|
||||||
|
_down = down;
|
||||||
|
});
|
||||||
|
}),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -37,22 +37,22 @@ class DeliveryAddressRow extends StatelessWidget {
|
|||||||
deliveryAddress.addressLine1!=""
|
deliveryAddress.addressLine1!=""
|
||||||
?
|
?
|
||||||
line(context, deliveryAddress.addressLine1,
|
line(context, deliveryAddress.addressLine1,
|
||||||
iconData: Icons.location_on,color: Colors.black, fontSize: 16):SizedBox(),
|
iconData: Icons.location_on,color: Colors.grey, fontSize: 16):SizedBox(),
|
||||||
deliveryAddress.addressLine2!=""
|
deliveryAddress.addressLine2!=""
|
||||||
?
|
?
|
||||||
line(
|
line(
|
||||||
context,
|
context,
|
||||||
deliveryAddress.addressLine2,color: Colors.black, fontSize: 16
|
deliveryAddress.addressLine2,color: Colors.grey, fontSize: 16
|
||||||
):SizedBox(),
|
):SizedBox(),
|
||||||
deliveryAddress.city!=""
|
deliveryAddress.city!=""
|
||||||
?
|
?
|
||||||
line(
|
line(
|
||||||
context,
|
context,
|
||||||
deliveryAddress.city,color: Colors.black, fontSize: 16
|
deliveryAddress.city,color: Colors.grey, fontSize: 16
|
||||||
):SizedBox(),
|
):SizedBox(),
|
||||||
deliveryAddress.state!=""
|
deliveryAddress.state!=""
|
||||||
?
|
?
|
||||||
line(context, deliveryAddress.state,color: Colors.black, fontSize: 16):SizedBox(),
|
line(context, deliveryAddress.state,color: Colors.grey, fontSize: 16):SizedBox(),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -69,7 +69,7 @@ class DeliveryAddressRow extends StatelessWidget {
|
|||||||
? SizedBox(width: 40)
|
? SizedBox(width: 40)
|
||||||
: Padding(
|
: Padding(
|
||||||
padding: const EdgeInsets.only(left: 8.0, right: 8),
|
padding: const EdgeInsets.only(left: 8.0, right: 8),
|
||||||
child: Icon(iconData, color: Colors.black38),
|
child: Icon(iconData, color: Colors.grey),
|
||||||
),
|
),
|
||||||
Flexible(
|
Flexible(
|
||||||
child: TextLocalStyle(
|
child: TextLocalStyle(
|
||||||
|
|||||||
@@ -107,7 +107,7 @@ class _FcsShipmentListState extends State<FcsShipmentList> {
|
|||||||
value: choice,
|
value: choice,
|
||||||
child: Row(
|
child: Row(
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Flexible(child: Text("${choice.text}")),
|
Flexible(child: Text("${choice.text}",style: TextStyle(color: Colors.black))),
|
||||||
const SizedBox(
|
const SizedBox(
|
||||||
width: 10,
|
width: 10,
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -107,9 +107,9 @@ class _LocalPopupMenuButtonState extends State<LocalPopupMenuButton> {
|
|||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
color:
|
color:
|
||||||
choice.enabled ? primaryColor : Colors.grey))
|
choice.enabled ? Colors.black : Colors.grey))
|
||||||
: LocalText(context, choice.textKey ?? "",
|
: LocalText(context, choice.textKey ?? "",
|
||||||
color: choice.enabled ? primaryColor : Colors.grey,
|
color: choice.enabled ? Colors.black : Colors.grey,
|
||||||
fontSize: 14),
|
fontSize: 14),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
width: 10,
|
width: 10,
|
||||||
|
|||||||
Reference in New Issue
Block a user