133 lines
5.5 KiB
Dart
133 lines
5.5 KiB
Dart
import 'package:fcs/domain/entities/box.dart';
|
|
import 'package:flutter/cupertino.dart';
|
|
import 'package:flutter/material.dart';
|
|
|
|
class BoxRow extends StatelessWidget {
|
|
final Box box;
|
|
|
|
const BoxRow({Key key, 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.shippingAddress.fullName == null
|
|
? ''
|
|
: box.shippingAddress.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.shippingAddress.addressLine1 == null
|
|
? ''
|
|
: box.shippingAddress.addressLine1,
|
|
style: new TextStyle(
|
|
fontSize: 14.0, color: Colors.grey),
|
|
),
|
|
),
|
|
Padding(
|
|
padding: const EdgeInsets.only(left: 8.0),
|
|
child: new Text(
|
|
box.shippingAddress.addressLine2 == null
|
|
? ''
|
|
: box.shippingAddress.addressLine2,
|
|
style: new TextStyle(
|
|
fontSize: 14.0, color: Colors.grey),
|
|
),
|
|
),
|
|
Padding(
|
|
padding: const EdgeInsets.only(left: 8.0),
|
|
child: new Text(
|
|
box.shippingAddress.city == null
|
|
? ''
|
|
: box.shippingAddress.city,
|
|
style: new TextStyle(
|
|
fontSize: 14.0, color: Colors.grey),
|
|
),
|
|
),
|
|
Padding(
|
|
padding: const EdgeInsets.only(left: 8.0),
|
|
child: new Text(
|
|
box.shippingAddress.state == null
|
|
? ''
|
|
: box.shippingAddress.state,
|
|
style: new TextStyle(
|
|
fontSize: 14.0, color: Colors.grey),
|
|
),
|
|
),
|
|
Padding(
|
|
padding: const EdgeInsets.only(left: 8.0),
|
|
child: new Text(
|
|
box.shippingAddress.phoneNumber == null
|
|
? ''
|
|
: "Phone:${box.shippingAddress.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(
|
|
"L${box.length}xW${box.weight}xH${box.height}",
|
|
style: new TextStyle(fontSize: 15.0, color: Colors.black),
|
|
),
|
|
),
|
|
Padding(
|
|
padding: const EdgeInsets.only(left: 8.0),
|
|
child: new Text(
|
|
box.weight == null
|
|
? ''
|
|
: "Actual Weight:${box.weight.toString()}lb",
|
|
style: new TextStyle(fontSize: 14.0, color: Colors.grey),
|
|
),
|
|
),
|
|
Padding(
|
|
padding: const EdgeInsets.only(left: 8.0),
|
|
child: new Text(
|
|
box.shipmentWeight == null
|
|
? ''
|
|
: "Shipment Weight:${box.shipmentWeight.toString()}lb",
|
|
style: new TextStyle(fontSize: 14.0, color: Colors.grey),
|
|
),
|
|
),
|
|
],
|
|
)
|
|
],
|
|
),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|