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:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_vector_icons/flutter_vector_icons.dart';
@@ -11,12 +10,13 @@ import 'processing_info.dart';
typedef CallbackPackageSelect(Package package);
class ProcessingListRow extends StatelessWidget {
final Package? package;
final Package package;
final CallbackPackageSelect? callbackPackageSelect;
final double dotSize = 15.0;
final DateFormat dateFormat = new DateFormat("dd MMM yyyy");
ProcessingListRow({Key? key, this.package, this.callbackPackageSelect})
ProcessingListRow(
{Key? key, required this.package, this.callbackPackageSelect})
: super(key: key);
@override
@@ -24,7 +24,7 @@ class ProcessingListRow extends StatelessWidget {
return InkWell(
onTap: () {
if (callbackPackageSelect != null) {
callbackPackageSelect!(package!);
callbackPackageSelect!(package);
return;
}
Navigator.push(
@@ -39,38 +39,33 @@ class ProcessingListRow extends StatelessWidget {
children: <Widget>[
Expanded(
child: new Padding(
padding: const EdgeInsets.symmetric(vertical: 16.0),
padding: const EdgeInsets.symmetric(vertical: 13.0),
child: new Row(
children: <Widget>[
Container(
padding: EdgeInsets.only(left: 5, right: 10),
child: Icon(
FontAwesome.dropbox,
color: primaryColor,
size: 30,
),
),
Icon(FontAwesome.dropbox, color: primaryColor, size: 30),
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.trackingID == 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.0),
child: new Text(
package.market == null ? '' : package.market!,
style: new TextStyle(
fontSize: 15.0, color: Colors.black),
),
),
),
],
],
),
),
),
],
@@ -78,18 +73,20 @@ class ProcessingListRow 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),
style: new TextStyle(fontSize: 14.0, color: Colors.grey),
),
),
],