add print qr code page
This commit is contained in:
@@ -22,6 +22,7 @@ import '../widgets/local_button.dart';
|
||||
import 'carton_package_editor.dart';
|
||||
import 'mix_carton/mix_carton_editor.dart';
|
||||
import 'model/carton_model.dart';
|
||||
import 'print_qr_code_page.dart';
|
||||
|
||||
class CartonInfo extends StatefulWidget {
|
||||
final Carton carton;
|
||||
@@ -100,7 +101,16 @@ class _CartonInfoState extends State<CartonInfo> {
|
||||
labelTextKey: "box.number",
|
||||
);
|
||||
|
||||
final cartonQrBox = DisplayText(iconData: AntDesign.qrcode);
|
||||
final cartonQrBox = IconButton(
|
||||
onPressed: () {
|
||||
Navigator.push(
|
||||
context,
|
||||
CupertinoPageRoute(
|
||||
builder: (context) => PrintQrCodePage(carton: _carton)),
|
||||
);
|
||||
},
|
||||
icon: Icon(AntDesign.qrcode, color: Colors.black));
|
||||
|
||||
final cartonSubTypeBox = DisplayText(
|
||||
text: _carton.cartonType == carton_from_packages
|
||||
? "Carton for packages"
|
||||
@@ -315,8 +325,8 @@ class _CartonInfoState extends State<CartonInfo> {
|
||||
child: LocalText(context, "box.imageupload.title",
|
||||
color: Colors.white, fontSize: 14)),
|
||||
);
|
||||
|
||||
final deleteBtn = Padding(
|
||||
|
||||
final deleteBtn = Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 30),
|
||||
child: LocalButton(
|
||||
color: dangerColor,
|
||||
@@ -400,7 +410,7 @@ class _CartonInfoState extends State<CartonInfo> {
|
||||
const SizedBox(height: 30),
|
||||
img,
|
||||
const SizedBox(height: 40),
|
||||
deleteBtn,
|
||||
deleteBtn,
|
||||
const SizedBox(height: 20)
|
||||
]))));
|
||||
}
|
||||
@@ -446,7 +456,8 @@ class _CartonInfoState extends State<CartonInfo> {
|
||||
_init();
|
||||
}
|
||||
}
|
||||
_delete() {
|
||||
|
||||
_delete() {
|
||||
showConfirmDialog(context, "box.delete.confirm", () {
|
||||
_deleteCarton();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user