2
0
mirror of https://github.com/inventree/inventree-app.git synced 2025-06-17 12:45:26 +00:00

Format code

This commit is contained in:
Asterix\Oliver
2025-06-14 10:59:13 +10:00
parent 0349ebb0b3
commit 387dc1eb39
96 changed files with 5478 additions and 7340 deletions

View File

@ -1,4 +1,3 @@
import "package:flutter/material.dart";
import "package:flutter_tabler_icons/flutter_tabler_icons.dart";
import "package:inventree/app_colors.dart";
@ -9,19 +8,19 @@ import "package:inventree/inventree/model.dart";
import "package:inventree/l10.dart";
class PaginatedSOShipmentList extends PaginatedSearchWidget {
const PaginatedSOShipmentList(Map<String, String> filters) : super(filters: filters);
const PaginatedSOShipmentList(Map<String, String> filters)
: super(filters: filters);
@override
String get searchTitle => L10().shipments;
@override
_PaginatedSOShipmentListState createState() => _PaginatedSOShipmentListState();
_PaginatedSOShipmentListState createState() =>
_PaginatedSOShipmentListState();
}
class _PaginatedSOShipmentListState extends PaginatedSearchState<PaginatedSOShipmentList> {
class _PaginatedSOShipmentListState
extends PaginatedSearchState<PaginatedSOShipmentList> {
_PaginatedSOShipmentListState() : super();
@override
@ -34,22 +33,23 @@ class _PaginatedSOShipmentListState extends PaginatedSearchState<PaginatedSOShip
Map<String, Map<String, dynamic>> get filterOptions => {};
@override
Future<InvenTreePageResponse?> requestPage(int limit, int offset, Map<String, String> params) async {
final page = await InvenTreeSalesOrderShipment().listPaginated(limit, offset, filters: params);
Future<InvenTreePageResponse?> requestPage(
int limit, int offset, Map<String, String> params) async {
final page = await InvenTreeSalesOrderShipment()
.listPaginated(limit, offset, filters: params);
return page;
}
@override
Widget buildItem(BuildContext context, InvenTreeModel model) {
InvenTreeSalesOrderShipment shipment = model as InvenTreeSalesOrderShipment;
return ListTile(
title: Text(shipment.reference),
subtitle: Text(shipment.tracking_number),
leading: shipment.shipped ? Icon(TablerIcons.calendar_check, color: COLOR_SUCCESS) : Icon(TablerIcons.calendar_cancel, color: COLOR_WARNING),
trailing: shipment.shipped ? Text(shipment.shipment_date ?? "") : null
);
title: Text(shipment.reference),
subtitle: Text(shipment.tracking_number),
leading: shipment.shipped
? Icon(TablerIcons.calendar_check, color: COLOR_SUCCESS)
: Icon(TablerIcons.calendar_cancel, color: COLOR_WARNING),
trailing: shipment.shipped ? Text(shipment.shipment_date ?? "") : null);
}
}
}