add print qr code page
This commit is contained in:
@@ -1,11 +1,14 @@
|
||||
import 'package:fcs/domain/entities/carton.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_vector_icons/flutter_vector_icons.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
|
||||
import '../print_qr_code_page.dart';
|
||||
|
||||
class CartonRow extends StatelessWidget {
|
||||
final Carton box;
|
||||
CartonRow({Key? key, required this.box}) : super(key: key);
|
||||
final Carton carton;
|
||||
CartonRow({Key? key, required this.carton}) : super(key: key);
|
||||
|
||||
final double dotSize = 15.0;
|
||||
final DateFormat dateFormat = new DateFormat("dd MMM yyyy");
|
||||
@@ -23,25 +26,34 @@ class CartonRow extends StatelessWidget {
|
||||
padding: const EdgeInsets.symmetric(vertical: 5.0),
|
||||
child: new Row(
|
||||
children: <Widget>[
|
||||
new Text(box.cartonNumber ?? "",
|
||||
new Text(carton.cartonNumber ?? "",
|
||||
style:
|
||||
new TextStyle(fontSize: 15.0, color: Colors.black)),
|
||||
const SizedBox(width: 15),
|
||||
IconButton(onPressed: () {}, icon: Icon(AntDesign.qrcode)),
|
||||
IconButton(
|
||||
onPressed: () {
|
||||
Navigator.push(
|
||||
context,
|
||||
CupertinoPageRoute(
|
||||
builder: (context) =>
|
||||
PrintQrCodePage(carton: carton)),
|
||||
);
|
||||
},
|
||||
icon: Icon(AntDesign.qrcode)),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
Column(
|
||||
children: <Widget>[
|
||||
box.cartonWeight == 0
|
||||
carton.cartonWeight == 0
|
||||
? Container()
|
||||
: Padding(
|
||||
padding: const EdgeInsets.only(left: 8.0, bottom: 5),
|
||||
child: Row(
|
||||
children: <Widget>[
|
||||
new Text(
|
||||
"${box.cartonWeight.toStringAsFixed(2)} lb",
|
||||
"${carton.cartonWeight.toStringAsFixed(2)} lb",
|
||||
style: new TextStyle(
|
||||
fontSize: 15.0, color: Colors.grey),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user