add carton editor to update

This commit is contained in:
tzw
2024-02-09 17:10:19 +06:30
parent 2d912a20aa
commit a246097d05
9 changed files with 103 additions and 45 deletions

View File

@@ -18,6 +18,7 @@ typedef OnCreateMixCarton = Function();
typedef OnPrevious = Function();
class MixCartonSubmit extends StatefulWidget {
final bool isNew;
final FcsShipment shipment;
final List<Carton> cartons;
final String cartonSizeType;
@@ -37,7 +38,8 @@ class MixCartonSubmit extends StatefulWidget {
required this.cartonSizeType,
this.length = 0,
this.width = 0,
this.height = 0})
this.height = 0,
this.isNew = true})
: super(key: key);
@override
@@ -253,7 +255,8 @@ class _MixCartonSubmitState extends State<MixCartonSubmit> {
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Flexible(
child: LocalText(context, 'box.crete.carton',
child: LocalText(context,
widget.isNew ? 'box.crete.carton' : 'box.update.btn',
color: Colors.white, fontSize: 15),
),
const SizedBox(width: 5),