fix number formatting
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import 'package:fcs/domain/entities/carton.dart';
|
||||
import 'package:fcs/domain/entities/package.dart';
|
||||
import 'package:fcs/domain/entities/rate.dart';
|
||||
import 'package:fcs/helpers/theme.dart';
|
||||
import 'package:fcs/pages/widgets/local_text.dart';
|
||||
import 'package:fcs/pages/widgets/local_title.dart';
|
||||
@@ -11,8 +12,9 @@ typedef OnSelect = Function(Carton carton, bool checked);
|
||||
class InvoiceCartonTable extends StatelessWidget {
|
||||
final List<Carton> cartons;
|
||||
final OnSelect onSelect;
|
||||
final Rate rate;
|
||||
|
||||
const InvoiceCartonTable({Key key, this.cartons, this.onSelect})
|
||||
const InvoiceCartonTable({Key key, this.cartons, this.onSelect, this.rate})
|
||||
: super(key: key);
|
||||
|
||||
@override
|
||||
@@ -88,6 +90,14 @@ class InvoiceCartonTable extends StatelessWidget {
|
||||
"${p.value?.length ?? ""} x ${p.value?.width ?? ""} x ${p.value?.height ?? ""}",
|
||||
style: textStyle,
|
||||
),
|
||||
new Text(
|
||||
"${p.value?.getShipmentWeight(rate.volumetricRatio)?.toStringAsFixed(2) ?? "0"} lb",
|
||||
style: textStyle,
|
||||
),
|
||||
new Text(
|
||||
"${p.value?.actualWeight?.toStringAsFixed(2) ?? "0"} lb (Actual)",
|
||||
style: textStyle,
|
||||
),
|
||||
],
|
||||
),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user