Files
fcs/lib/pages/carton_search/carton_list_row.dart

112 lines
4.0 KiB
Dart
Raw Normal View History

2020-12-10 20:06:15 +06:30
import 'package:fcs/domain/entities/carton.dart';
import 'package:fcs/helpers/theme.dart';
import 'package:flutter/material.dart';
2021-09-10 12:00:08 +06:30
import 'package:flutter_vector_icons/flutter_vector_icons.dart';
2020-12-10 20:06:15 +06:30
import 'carton_search.dart';
2021-09-10 16:33:52 +06:30
class CartonListRow extends StatelessWidget {
2021-09-10 12:00:08 +06:30
final CallbackCartonSelect? callbackCartonSelect;
2021-09-10 16:33:52 +06:30
final Carton carton;
2021-01-11 19:35:26 +06:30
2021-09-10 16:33:52 +06:30
CartonListRow({Key? key, required this.carton, this.callbackCartonSelect})
2021-01-11 19:35:26 +06:30
: super(key: key);
2020-12-10 20:06:15 +06:30
final double dotSize = 15.0;
@override
Widget build(BuildContext context) {
return Container(
decoration: BoxDecoration(
border: Border(
2021-09-10 12:00:08 +06:30
bottom: BorderSide(color: Colors.grey.shade300),
2020-12-10 20:06:15 +06:30
),
),
child: InkWell(
onTap: () {
Navigator.pop(context);
2021-09-10 16:33:52 +06:30
if (callbackCartonSelect != null) callbackCartonSelect!(carton);
2020-12-10 20:06:15 +06:30
},
2024-02-07 17:26:29 +06:30
child: Container(
padding: EdgeInsets.only(left: 15, right: 15),
child: Row(
children: <Widget>[
Expanded(
child: new Padding(
padding: const EdgeInsets.symmetric(vertical: 7.0),
child: new Row(
children: <Widget>[
Container(
padding: EdgeInsets.only(left: 5),
child: Icon(
MaterialCommunityIcons.package,
color: primaryColor,
size: 30,
),
2020-12-10 20:06:15 +06:30
),
2024-02-07 17:26:29 +06:30
new Expanded(
child: Padding(
padding: const EdgeInsets.only(left: 18.0),
child: Row(
children: [
new Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
new Text(
carton.cartonNumber ?? "",
style: new TextStyle(
fontSize: 15.0, color: Colors.black),
),
Padding(
padding: const EdgeInsets.only(top: 5),
child: new Text(
carton.userName ?? "",
style: new TextStyle(
fontSize: 15.0, color: Colors.grey),
),
),
],
),
const SizedBox(width: 15),
IconButton(
onPressed: () {},
icon: Icon(AntDesign.qrcode,
color: Colors.black))
],
2020-12-10 20:06:15 +06:30
),
2024-02-07 17:26:29 +06:30
),
2020-12-10 20:06:15 +06:30
),
2024-02-07 17:26:29 +06:30
],
),
2020-12-10 20:06:15 +06:30
),
),
2024-02-07 17:26:29 +06:30
Column(
crossAxisAlignment: CrossAxisAlignment.end,
children: <Widget>[
Text(carton.status ?? "",
style: TextStyle(
color: primaryColor,
fontSize: 15,
fontWeight: FontWeight.bold)),
Padding(
padding: const EdgeInsets.only(top: 5),
child: Row(
children: <Widget>[
new Text(
"${carton.cartonWeight.toStringAsFixed(2)} lb",
style:
new TextStyle(fontSize: 15.0, color: Colors.grey),
),
],
),
),
],
)
],
),
2020-12-10 20:06:15 +06:30
),
),
);
}
}