add markdown for term

This commit is contained in:
tzw
2024-02-28 17:47:47 +06:30
parent 270be54d38
commit 8305cb45ce
17 changed files with 456 additions and 462 deletions

View File

@@ -1,6 +1,5 @@
import 'package:fcs/domain/entities/package.dart';
import 'package:fcs/helpers/theme.dart';
import 'package:fcs/pages/main/util.dart';
import 'package:fcs/pages/package/package_info.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
@@ -11,14 +10,14 @@ typedef CallbackPackageSelect(Package package);
class PackageListRow extends StatelessWidget {
final bool isCustomer;
final Package? package;
final Package package;
final CallbackPackageSelect? callbackPackageSelect;
final double dotSize = 15.0;
final DateFormat dateFormat = new DateFormat("dd MMM yyyy");
PackageListRow(
{Key? key,
this.package,
required this.package,
this.callbackPackageSelect,
this.isCustomer = false})
: super(key: key);
@@ -28,7 +27,7 @@ class PackageListRow extends StatelessWidget {
return InkWell(
onTap: () {
if (callbackPackageSelect != null) {
callbackPackageSelect!(package!);
callbackPackageSelect!(package);
return;
}
Navigator.push(
@@ -48,36 +47,33 @@ class PackageListRow extends StatelessWidget {
children: <Widget>[
Expanded(
child: new Padding(
padding: const EdgeInsets.symmetric(vertical: 16.0),
padding: const EdgeInsets.symmetric(vertical: 13),
child: new Row(
children: <Widget>[
Icon(Octicons.package, color: primaryColor),
SizedBox(width: 8),
new Expanded(
child: new Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Padding(
padding: const EdgeInsets.only(left: 8.0),
child: new Text(
package!.id == null
? ''
: package!.trackingID!,
child: Padding(
padding: const EdgeInsets.only(left: 15),
child: new Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
new Text(
package.id == null ? '' : package.trackingID!,
style: new TextStyle(
fontSize: 15.0, color: Colors.black),
),
),
Padding(
padding: const EdgeInsets.only(left: 8.0),
child: new Text(
package!.market == null
? ''
: package!.market!,
style: new TextStyle(
fontSize: 15.0, color: Colors.black),
Padding(
padding: const EdgeInsets.only(top: 5),
child: new Text(
package.market == null
? ''
: package.market!,
style: new TextStyle(
fontSize: 15.0, color: Colors.black),
),
),
),
],
],
),
),
),
],
@@ -85,19 +81,21 @@ class PackageListRow extends StatelessWidget {
),
),
Column(
crossAxisAlignment: CrossAxisAlignment.end,
children: <Widget>[
Text(package.status ?? "",
style: TextStyle(
color: primaryColor,
fontSize: 15,
fontWeight: FontWeight.bold)),
Padding(
padding: const EdgeInsets.all(3.0),
child: getStatus(package!.status??""),
),
Padding(
padding: const EdgeInsets.all(0),
padding: const EdgeInsets.only(top: 5),
child: new Text(
package!.currentStatusDate != null
? dateFormat.format(package!.currentStatusDate!)
package.currentStatusDate != null
? dateFormat.format(package.currentStatusDate!)
: '',
style:
new TextStyle(fontSize: 15.0, color: Colors.grey),
new TextStyle(fontSize: 14.0, color: Colors.grey),
),
),
],