fix length input

This commit is contained in:
Sai Naw Wun
2021-01-23 23:55:53 +06:30
parent 3aea71571a
commit 9a19e7af08
5 changed files with 181 additions and 25 deletions

View File

@@ -426,17 +426,17 @@ class _CartonEditorState extends State<CartonEditor> {
final lengthBox = LengthPicker(
controller: _lengthController,
lableKey: "box.length",
isReadOnly: true,
isReadOnly: false,
);
final widthBox = LengthPicker(
controller: _widthController,
lableKey: "box.width",
isReadOnly: true,
isReadOnly: false,
);
final heightBox = LengthPicker(
controller: _heightController,
lableKey: "box.height",
isReadOnly: true,
isReadOnly: false,
);
final dimBox = Row(
mainAxisAlignment: MainAxisAlignment.start,

View File

@@ -408,10 +408,10 @@ class _CartonInfoState extends State<CartonInfo> {
}
_gotoEditor() async {
widget.box.mixCartons = _box.mixCartons;
_box.mixCartons = _box.mixCartons;
bool updated = await Navigator.push<bool>(
context,
CupertinoPageRoute(builder: (context) => CartonEditor(box: widget.box)),
CupertinoPageRoute(builder: (context) => CartonEditor(box: _box)),
);
if (updated ?? false) {
var cartonModel = Provider.of<CartonModel>(context, listen: false);

View File

@@ -97,17 +97,17 @@ class _PackageCartonEditorState extends State<PackageCartonEditor> {
final lengthBox = LengthPicker(
controller: _lengthCtl,
lableKey: "box.length",
isReadOnly: true,
isReadOnly: false,
);
final widthBox = LengthPicker(
controller: _widthCtl,
lableKey: "box.width",
isReadOnly: true,
isReadOnly: false,
);
final heightBox = LengthPicker(
controller: _heightCtl,
lableKey: "box.height",
isReadOnly: true,
isReadOnly: false,
);
final dimBox = Row(
mainAxisAlignment: MainAxisAlignment.start,