Files
fcs/lib/pages/carton/carton_row.dart

58 lines
1.8 KiB
Dart
Raw Normal View History

2020-12-10 20:06:15 +06:30
import 'package:fcs/domain/entities/carton.dart';
import 'package:flutter/material.dart';
2021-09-10 12:00:08 +06:30
import 'package:flutter_vector_icons/flutter_vector_icons.dart';
2020-12-10 20:06:15 +06:30
import 'package:intl/intl.dart';
class CartonRow extends StatelessWidget {
2021-09-10 16:33:52 +06:30
final Carton box;
2024-02-01 18:07:40 +06:30
CartonRow({Key? key, required this.box}) : super(key: key);
2020-12-10 20:06:15 +06:30
final double dotSize = 15.0;
final DateFormat dateFormat = new DateFormat("dd MMM yyyy");
@override
Widget build(BuildContext context) {
return Container(
decoration: BoxDecoration(
2024-02-01 18:07:40 +06:30
border: Border(bottom: BorderSide(color: Colors.grey.shade300)),
2020-12-10 20:06:15 +06:30
),
child: Row(
children: <Widget>[
Expanded(
child: new Padding(
2024-02-01 18:07:40 +06:30
padding: const EdgeInsets.symmetric(vertical: 5.0),
2020-12-10 20:06:15 +06:30
child: new Row(
children: <Widget>[
2024-02-01 18:07:40 +06:30
new Text(box.cartonNumber ?? "",
style:
new TextStyle(fontSize: 15.0, color: Colors.black)),
const SizedBox(width: 15),
IconButton(onPressed: () {}, icon: Icon(AntDesign.qrcode)),
2020-12-10 20:06:15 +06:30
],
),
),
),
Column(
children: <Widget>[
2024-02-01 18:07:40 +06:30
box.cartonWeight == 0
2020-12-10 20:06:15 +06:30
? Container()
: Padding(
padding: const EdgeInsets.only(left: 8.0, bottom: 5),
child: Row(
children: <Widget>[
new Text(
2024-02-01 18:07:40 +06:30
"${box.cartonWeight.toStringAsFixed(2)} lb",
2020-12-10 20:06:15 +06:30
style: new TextStyle(
fontSize: 15.0, color: Colors.grey),
),
],
),
),
],
),
],
),
);
}
}