Files
fcs/lib/pages/shipment/box_row.dart
phyothandar bb4f4ad7c2 null safety
2021-09-10 16:48:21 +06:30

117 lines
4.7 KiB
Dart

import 'package:fcs/domain/entities/carton.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
class BoxRow extends StatelessWidget {
final Carton box;
const BoxRow({Key? key, required this.box}) : super(key: key);
@override
Widget build(BuildContext context) {
return Container(
padding: EdgeInsets.only(left: 10),
child: Column(
children: <Widget>[
Row(
children: <Widget>[
Expanded(
child: new Padding(
padding: const EdgeInsets.symmetric(vertical: 10.0),
child: new Row(
children: <Widget>[
new Expanded(
child: new Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Padding(
padding: const EdgeInsets.only(left: 8.0),
child: new Text(
box.deliveryAddress?.fullName ?? "",
style: new TextStyle(
fontSize: 15.0,
color: Colors.black,
fontWeight: FontWeight.bold),
),
),
Padding(
padding: const EdgeInsets.only(left: 8.0),
child: new Text(
box.deliveryAddress?.addressLine1 ?? "",
style: new TextStyle(
fontSize: 14.0, color: Colors.grey),
),
),
Padding(
padding: const EdgeInsets.only(left: 8.0),
child: new Text(
box.deliveryAddress?.addressLine2 ?? "",
style: new TextStyle(
fontSize: 14.0, color: Colors.grey),
),
),
Padding(
padding: const EdgeInsets.only(left: 8.0),
child: new Text(
box.deliveryAddress?.city ?? "",
style: new TextStyle(
fontSize: 14.0, color: Colors.grey),
),
),
Padding(
padding: const EdgeInsets.only(left: 8.0),
child: new Text(
box.deliveryAddress?.state ?? "",
style: new TextStyle(
fontSize: 14.0, color: Colors.grey),
),
),
Padding(
padding: const EdgeInsets.only(left: 8.0),
child: new Text(
box.deliveryAddress?.phoneNumber ?? "",
style: new TextStyle(
fontSize: 14.0, color: Colors.grey),
),
),
],
),
),
],
),
),
),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Padding(
padding: const EdgeInsets.only(left: 8.0),
child: new Text(
"${box.cartonNumber ?? ""}",
style: new TextStyle(fontSize: 15.0, color: Colors.black),
),
),
Padding(
padding: const EdgeInsets.only(left: 8.0),
child: new Text(
"L${box.length}xW${box.width}xH${box.height}",
style: new TextStyle(fontSize: 15.0, color: Colors.black),
),
),
Padding(
padding: const EdgeInsets.only(left: 8.0),
child: new Text(
"Actual Weight:${box.actualWeight.toStringAsFixed(2)}lb",
style: new TextStyle(fontSize: 14.0, color: Colors.grey),
),
),
],
)
],
),
],
),
);
}
}