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

@@ -3,7 +3,6 @@ import 'package:fcs/helpers/theme.dart';
import 'package:fcs/pages/main/util.dart';
import 'package:fcs/pages/widgets/dialog_input.dart';
import 'package:fcs/pages/widgets/local_text.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
typedef OnRemove(CargoType cargoType);
@@ -94,7 +93,7 @@ class _CargoTableState extends State<CargoTable> {
c.isCutomDuty!
? GestureDetector(
onTap: () async {
String _t = await showDialog(
String? _t = await showDialog(
context: context,
builder: (_) => DialogInput(
label: "cargo.qty", value: c.qty.toString()));
@@ -114,7 +113,7 @@ class _CargoTableState extends State<CargoTable> {
borderRadius: BorderRadius.all(Radius.circular(5.0)),
),
child: new Text(
c.qty == null ? "" : c.qty.toString(),
c.qty.toString(),
style: textStyle,
textAlign: TextAlign.center,
),
@@ -140,7 +139,7 @@ class _CargoTableState extends State<CargoTable> {
return;
}
String _t = await showDialog(
String? _t = await showDialog(
context: context,
builder: (_) => DialogInput(
label: "cargo.weight",
@@ -161,9 +160,7 @@ class _CargoTableState extends State<CargoTable> {
border: Border.all(color: primaryColor),
borderRadius: BorderRadius.all(Radius.circular(5.0)),
),
child: Text(
c.weight == null ? "0.00" : c.weight.toStringAsFixed(2),
style: textStyle),
child: Text(c.weight.toStringAsFixed(2), style: textStyle),
),
),
widget.onRemove == null