Set 'There is no item to show' to all menu screens

This commit is contained in:
fhkhd
2024-01-11 20:39:00 +03:30
parent 4cb3a921f1
commit 80b9fd33b2
9 changed files with 226 additions and 154 deletions
+24 -11
View File
@@ -72,7 +72,12 @@ class _LabelResultScreenState extends State<LabelResultScreen> {
),
appBar: AppBar(
titleSpacing: -10,
title: Text('Home', style: TextStyle(color: Colors.white,),),
title: Text(
'Home',
style: TextStyle(
color: Colors.white,
),
),
backgroundColor: Colors.black,
leading: IconButton(
icon: Icon(
@@ -171,16 +176,24 @@ class _LabelResultScreenState extends State<LabelResultScreen> {
color: Colors.black,
),
)
: ListView.builder(
controller: sc,
itemBuilder: (context, index) =>
LabelItemBox(
deviceBlockSize: _deviceBlockSize,
item: labelResults.items?[index],
),
itemCount: labelResults.items?.length,
shrinkWrap: true,
);
: labelResults.items?.length != null
? ListView.builder(
controller: sc,
itemBuilder: (context, index) =>
LabelItemBox(
deviceBlockSize: _deviceBlockSize,
item: labelResults.items?[index],
),
itemCount:
labelResults.items?.length,
shrinkWrap: true,
)
: Container(
child: Center(
child: Text(
"There is no item to show."),
),
);
},
),
),