cleanup code

This commit is contained in:
tzw
2024-01-23 16:28:08 +06:30
parent a1e87cdbf6
commit f3f75a80c6
96 changed files with 232 additions and 439 deletions

View File

@@ -1,7 +1,6 @@
import 'package:fcs/domain/entities/cargo_type.dart';
import 'package:fcs/helpers/theme.dart';
import 'package:fcs/pages/widgets/local_text.dart';
import 'package:fcs/pages/widgets/my_data_table.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
@@ -78,7 +77,7 @@ class _CargoTableState extends State<CargoTable> {
style: textStyle,
),
new Text(
c.qty == null || c.qty == 0 ? "" : " x ${c.qty.toString()}",
c.qty == 0 ? "" : " x ${c.qty.toString()}",
style: TextStyle(color: Colors.grey),
),
],
@@ -135,9 +134,7 @@ class _CargoTableState extends State<CargoTable> {
totalWeight = _t;
this.remainingWeight = this.totalWeight - _total;
widget.cargoTypes!.forEach((c) {
if (c.qty == null) {
this._cargos.add(c);
}
this._cargos.add(c);
});
this._cargos.forEach((c) {
_list.add(c.name!);