mirror of
https://git.meshkee.com/applications/cssd.git
synced 2026-10-13 10:58:56 +03:30
Fix items bug in add package screen
This commit is contained in:
@@ -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(
|
||||||
@@ -203,32 +208,32 @@ class _PackageAddScreenState extends State<PackageAddScreen> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
Consumer<PackageProvider>(
|
Consumer<PackageProvider>(
|
||||||
builder: (ctx, packageProvider, _) =>
|
builder: (ctx, packageProvider, _) =>
|
||||||
ListView.builder(
|
ListView.builder(
|
||||||
physics: NeverScrollableScrollPhysics(),
|
physics: NeverScrollableScrollPhysics(),
|
||||||
shrinkWrap: true,
|
shrinkWrap: true,
|
||||||
itemBuilder: (ctx, index) => AddItemBox(
|
itemBuilder: (ctx, index) => AddItemBox(
|
||||||
text: 'Select Items Included',
|
text: 'Select Items Included',
|
||||||
iconColor: kPurpleSub,
|
iconColor: kPurpleSub,
|
||||||
deviceBlockSize: _deviceBlockSize,
|
deviceBlockSize: _deviceBlockSize,
|
||||||
values:
|
values:
|
||||||
packageProvider.itemValues[index],
|
packageProvider.itemValues[index],
|
||||||
vals: packageProvider.itemVals,
|
vals: packageProvider.itemVals,
|
||||||
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
|
||||||
? true
|
? true
|
||||||
: false,
|
: false,
|
||||||
),
|
),
|
||||||
itemCount:
|
itemCount:
|
||||||
packageProvider.itemValues.length,
|
packageProvider.itemValues.length,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
|
||||||
SizedBox(
|
SizedBox(
|
||||||
height: 30,
|
height: 30,
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -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,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user