Fix items bug in add package screen

This commit is contained in:
fhkhd
2024-01-20 21:06:01 +03:30
parent ce045465b9
commit 50a75be4fd
2 changed files with 34 additions and 29 deletions
@@ -78,7 +78,12 @@ class _PackageAddScreenState extends State<PackageAddScreen> {
child: Scaffold( child: Scaffold(
appBar: AppBar( appBar: AppBar(
titleSpacing: -10, titleSpacing: -10,
title: Text('Packages', style: TextStyle(color: Colors.white,),), title: Text(
'Packages',
style: TextStyle(
color: Colors.white,
),
),
backgroundColor: Colors.black, backgroundColor: Colors.black,
leading: IconButton( leading: IconButton(
icon: Icon( icon: Icon(
@@ -217,8 +222,8 @@ class _PackageAddScreenState extends State<PackageAddScreen> {
initialItemValue: initialItemValue:
packageProvider.initialItemValue, packageProvider.initialItemValue,
index: index, index: index,
filteredItems: // filteredItems:
packageProvider.filteredItems!, // packageProvider.filteredItems!,
hasRemoveButton: hasRemoveButton:
packageProvider.itemValues.length > packageProvider.itemValues.length >
1 1
@@ -16,7 +16,7 @@ class AddItemBox extends StatelessWidget {
required this.text, required this.text,
// required this.scanUdi, // required this.scanUdi,
this.iconColor, this.iconColor,
required this.filteredItems, // required this.filteredItems,
required this.hasRemoveButton, required this.hasRemoveButton,
}) : _deviceBlockSize = deviceBlockSize, }) : _deviceBlockSize = deviceBlockSize,
super(key: key); super(key: key);
@@ -31,7 +31,7 @@ class AddItemBox extends StatelessWidget {
final String text; final String text;
final Color? iconColor; final Color? iconColor;
final bool hasRemoveButton; final bool hasRemoveButton;
final List<ItemResultObject> filteredItems; // final List<ItemResultObject> filteredItems;
// final String scanUdi; // final String scanUdi;
@override @override
@@ -128,7 +128,7 @@ class AddItemBox extends StatelessWidget {
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
color: Colors.black, color: Colors.black,
fontSize: 5 * _deviceBlockSize, fontSize: 4 * _deviceBlockSize,
), ),
), ),
), ),