add markdown for term
This commit is contained in:
@@ -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 'receiving_info.dart';
|
||||
typedef CallbackPackageSelect(Package package);
|
||||
|
||||
class ReceivingListRow extends StatelessWidget {
|
||||
final Package? package;
|
||||
final Package package;
|
||||
final CallbackPackageSelect? callbackPackageSelect;
|
||||
final double dotSize = 15.0;
|
||||
final DateFormat dateFormat = new DateFormat("dd MMM yyyy");
|
||||
|
||||
ReceivingListRow({Key? key, this.package, this.callbackPackageSelect})
|
||||
ReceivingListRow(
|
||||
{Key? key, required this.package, this.callbackPackageSelect})
|
||||
: super(key: key);
|
||||
|
||||
@override
|
||||
@@ -24,7 +24,7 @@ class ReceivingListRow extends StatelessWidget {
|
||||
return InkWell(
|
||||
onTap: () {
|
||||
if (callbackPackageSelect != null) {
|
||||
callbackPackageSelect!(package!);
|
||||
callbackPackageSelect!(package);
|
||||
return;
|
||||
}
|
||||
Navigator.push(
|
||||
@@ -39,36 +39,32 @@ class ReceivingListRow 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>[
|
||||
Padding(
|
||||
padding: EdgeInsets.all(5.0),
|
||||
child: Icon(
|
||||
MaterialCommunityIcons.inbox_arrow_down,
|
||||
color: primaryColor,
|
||||
)),
|
||||
Icon(MaterialCommunityIcons.inbox_arrow_down,
|
||||
color: primaryColor),
|
||||
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),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
@@ -76,18 +72,20 @@ class ReceivingListRow 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),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user