update carton and cargo type

This commit is contained in:
tzw
2025-03-12 17:49:27 +06:30
parent 05e912ea68
commit e208734dfa
32 changed files with 1141 additions and 462 deletions

View File

@@ -6,21 +6,20 @@ import 'package:flutter/material.dart';
import 'package:flutter_vector_icons/flutter_vector_icons.dart';
import 'package:intl/intl.dart';
typedef CallbackPackageSelect(Package package);
typedef CallbackPackageSelect = Function(Package package);
class PackageListRow extends StatelessWidget {
final bool isCustomer;
final Package package;
final CallbackPackageSelect? callbackPackageSelect;
final double dotSize = 15.0;
final DateFormat dateFormat = new DateFormat("dd MMM yyyy");
final DateFormat dateFormat = DateFormat("dd MMM yyyy");
PackageListRow(
{Key? key,
{super.key,
required this.package,
this.callbackPackageSelect,
this.isCustomer = false})
: super(key: key);
this.isCustomer = false});
@override
Widget build(BuildContext context) {
@@ -44,30 +43,30 @@ class PackageListRow extends StatelessWidget {
Row(
children: <Widget>[
Expanded(
child: new Padding(
child: Padding(
padding: const EdgeInsets.symmetric(vertical: 13),
child: new Row(
child: Row(
children: <Widget>[
Icon(Octicons.package, color: primaryColor),
new Expanded(
Expanded(
child: Padding(
padding: const EdgeInsets.only(left: 15),
child: new Column(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
new Text(
Text(
package.id == null ? '' : package.trackingID!,
style: new TextStyle(
style: TextStyle(
fontSize: 15.0, color: Colors.black),
),
Padding(
padding: const EdgeInsets.only(top: 5),
child: new Text(
child: Text(
package.market == null
? ''
: package.market!,
style: new TextStyle(
fontSize: 15.0, color: Colors.black),
style: TextStyle(
fontSize: 15.0, color: Colors.grey),
),
),
],
@@ -88,12 +87,11 @@ class PackageListRow extends StatelessWidget {
fontWeight: FontWeight.bold)),
Padding(
padding: const EdgeInsets.only(top: 5),
child: new Text(
child: Text(
package.currentStatusDate != null
? dateFormat.format(package.currentStatusDate!)
: '',
style:
new TextStyle(fontSize: 14.0, color: Colors.grey),
style: TextStyle(fontSize: 14.0, color: Colors.grey),
),
),
],