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/carton.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';
@@ -9,8 +8,8 @@ import 'package:intl/intl.dart';
import 'delivery_info.dart';
class DeliveryListRow extends StatelessWidget {
final Carton? box;
DeliveryListRow({Key? key, this.box}) : super(key: key);
final Carton box;
DeliveryListRow({Key? key, required this.box}) : super(key: key);
final double dotSize = 15.0;
final DateFormat dateFormat = new DateFormat("dd MMM yyyy");
@@ -19,11 +18,10 @@ class DeliveryListRow extends StatelessWidget {
Widget build(BuildContext context) {
return InkWell(
onTap: () {
if (box != null)
Navigator.push(
context,
CupertinoPageRoute(builder: (context) => DeliveryInfo(box: box!)),
);
Navigator.push(
context,
CupertinoPageRoute(builder: (context) => DeliveryInfo(box: box)),
);
},
child: Container(
padding: EdgeInsets.only(left: 15, right: 15),
@@ -31,38 +29,32 @@ class DeliveryListRow extends StatelessWidget {
children: <Widget>[
Expanded(
child: new Padding(
padding: const EdgeInsets.symmetric(vertical: 10.0),
padding: const EdgeInsets.symmetric(vertical: 13.0),
child: new Row(
children: <Widget>[
Container(
padding: EdgeInsets.only(left: 5, right: 10),
child: Icon(
MaterialCommunityIcons.truck_fast,
color: primaryColor,
size: 30,
),
),
Icon(MaterialCommunityIcons.truck_fast,
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(
box?.cartonNumber ?? "",
child: Padding(
padding: const EdgeInsets.only(left: 15),
child: new Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
new Text(
box.cartonNumber ?? "",
style: new TextStyle(
fontSize: 15.0, color: Colors.black),
),
),
Padding(
padding: const EdgeInsets.only(left: 10.0, top: 10),
child: new Text(
box?.userName ?? "",
style: new TextStyle(
fontSize: 15.0, color: Colors.grey),
),
)
],
Padding(
padding: const EdgeInsets.only(top: 5),
child: new Text(
box.userName ?? "",
style: new TextStyle(
fontSize: 15.0, color: Colors.grey),
),
)
],
),
),
),
],
@@ -70,19 +62,21 @@ class DeliveryListRow extends StatelessWidget {
),
),
Column(
crossAxisAlignment: CrossAxisAlignment.end,
children: <Widget>[
Text(box.status ?? "",
style: TextStyle(
color: primaryColor,
fontSize: 15,
fontWeight: FontWeight.bold)),
Padding(
padding: const EdgeInsets.all(0),
child: getStatus(box?.status ?? ''),
),
Padding(
padding: const EdgeInsets.only(left: 8.0, top: 5, bottom: 5),
padding: const EdgeInsets.only(top: 5),
child: Row(
children: <Widget>[
new Text(
"${box?.actualWeight.toString() ?? ''} lb",
"${box.actualWeight.toString()} lb",
style:
new TextStyle(fontSize: 15.0, color: Colors.grey),
new TextStyle(fontSize: 14.0, color: Colors.grey),
),
],
),