update cartion editor
This commit is contained in:
@@ -16,6 +16,7 @@ import 'package:flutter/material.dart';
|
|||||||
import 'package:flutter_vector_icons/flutter_vector_icons.dart';
|
import 'package:flutter_vector_icons/flutter_vector_icons.dart';
|
||||||
import '../main/util.dart';
|
import '../main/util.dart';
|
||||||
import 'carton_editor_for_package.dart';
|
import 'carton_editor_for_package.dart';
|
||||||
|
import 'carton_info.dart';
|
||||||
import 'mix_carton/mix_carton_editor.dart';
|
import 'mix_carton/mix_carton_editor.dart';
|
||||||
import 'carton_row.dart';
|
import 'carton_row.dart';
|
||||||
|
|
||||||
@@ -63,10 +64,7 @@ class _CartonEditorState extends State<CartonEditor> {
|
|||||||
_carton = Carton(cargoTypes: [], packages: []);
|
_carton = Carton(cargoTypes: [], packages: []);
|
||||||
_isNew = true;
|
_isNew = true;
|
||||||
_selectedCartonType = carton_from_packages;
|
_selectedCartonType = carton_from_packages;
|
||||||
_cartons = [
|
_cartons = [];
|
||||||
Carton(cartonNumber: "A177(A)-3#2", cartonWeight: 35.5),
|
|
||||||
Carton(cartonNumber: "A177(A)-3#1", cartonWeight: 25.5)
|
|
||||||
];
|
|
||||||
_sender = User(
|
_sender = User(
|
||||||
name: "ptd-phyo44 kaelone",
|
name: "ptd-phyo44 kaelone",
|
||||||
fcsID: "FCS-8X6V",
|
fcsID: "FCS-8X6V",
|
||||||
@@ -159,7 +157,9 @@ class _CartonEditorState extends State<CartonEditor> {
|
|||||||
context,
|
context,
|
||||||
CupertinoPageRoute(
|
CupertinoPageRoute(
|
||||||
builder: (context) => CartonEditorForPackage(
|
builder: (context) => CartonEditorForPackage(
|
||||||
sender: _sender!, consignee: _consignee!,billToValue: _billToValue)));
|
sender: _sender!,
|
||||||
|
consignee: _consignee!,
|
||||||
|
billToValue: _billToValue)));
|
||||||
}
|
}
|
||||||
// for mix cartion
|
// for mix cartion
|
||||||
else {
|
else {
|
||||||
@@ -293,7 +293,9 @@ class _CartonEditorState extends State<CartonEditor> {
|
|||||||
padding: const EdgeInsets.only(left: 10),
|
padding: const EdgeInsets.only(left: 10),
|
||||||
child: LocalText(context, 'box.bill_to_sender',
|
child: LocalText(context, 'box.bill_to_sender',
|
||||||
fontSize: 15,
|
fontSize: 15,
|
||||||
color: _billToValue == billToSender ? primaryColor : Colors.black),
|
color: _billToValue == billToSender
|
||||||
|
? primaryColor
|
||||||
|
: Colors.black),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
]),
|
]),
|
||||||
@@ -320,7 +322,9 @@ class _CartonEditorState extends State<CartonEditor> {
|
|||||||
padding: const EdgeInsets.only(left: 10),
|
padding: const EdgeInsets.only(left: 10),
|
||||||
child: LocalText(context, 'box.bill_to.consignee',
|
child: LocalText(context, 'box.bill_to.consignee',
|
||||||
fontSize: 15,
|
fontSize: 15,
|
||||||
color: _billToValue == billToConsignee ? primaryColor : Colors.black),
|
color: _billToValue == billToConsignee
|
||||||
|
? primaryColor
|
||||||
|
: Colors.black),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
]),
|
]),
|
||||||
@@ -372,8 +376,15 @@ class _CartonEditorState extends State<CartonEditor> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
List<Widget> _getCartons(BuildContext context, List<Carton> cartons) {
|
List<Widget> _getCartons(BuildContext context, List<Carton> cartons) {
|
||||||
return cartons.asMap().entries.map((c) {
|
return cartons.map((c) {
|
||||||
return InkWell(onTap: () async {}, child: CartonRow(box: c.value));
|
return InkWell(
|
||||||
|
onTap: () async {
|
||||||
|
Navigator.push(
|
||||||
|
context,
|
||||||
|
CupertinoPageRoute(builder: (context) => CartonInfo(box: c)),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
child: CartonRow(box: c));
|
||||||
}).toList();
|
}).toList();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user