update carton info
This commit is contained in:
57
lib/pages/carton/widget/carton_row.dart
Normal file
57
lib/pages/carton/widget/carton_row.dart
Normal file
@@ -0,0 +1,57 @@
|
||||
import 'package:fcs/domain/entities/carton.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_vector_icons/flutter_vector_icons.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
|
||||
class CartonRow extends StatelessWidget {
|
||||
final Carton box;
|
||||
CartonRow({Key? key, required this.box}) : super(key: key);
|
||||
|
||||
final double dotSize = 15.0;
|
||||
final DateFormat dateFormat = new DateFormat("dd MMM yyyy");
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
decoration: BoxDecoration(
|
||||
border: Border(bottom: BorderSide(color: Colors.grey.shade300)),
|
||||
),
|
||||
child: Row(
|
||||
children: <Widget>[
|
||||
Expanded(
|
||||
child: new Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 5.0),
|
||||
child: new Row(
|
||||
children: <Widget>[
|
||||
new Text(box.cartonNumber ?? "",
|
||||
style:
|
||||
new TextStyle(fontSize: 15.0, color: Colors.black)),
|
||||
const SizedBox(width: 15),
|
||||
IconButton(onPressed: () {}, icon: Icon(AntDesign.qrcode)),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
Column(
|
||||
children: <Widget>[
|
||||
box.cartonWeight == 0
|
||||
? Container()
|
||||
: Padding(
|
||||
padding: const EdgeInsets.only(left: 8.0, bottom: 5),
|
||||
child: Row(
|
||||
children: <Widget>[
|
||||
new Text(
|
||||
"${box.cartonWeight.toStringAsFixed(2)} lb",
|
||||
style: new TextStyle(
|
||||
fontSize: 15.0, color: Colors.grey),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user