display message when no packages found
This commit is contained in:
@@ -259,6 +259,7 @@ class _MihBusinessHomeState extends State<MihBusinessHome>
|
|||||||
.contains(searchController.text.toLowerCase()))
|
.contains(searchController.text.toLowerCase()))
|
||||||
.map((package) => package.values.first)
|
.map((package) => package.values.first)
|
||||||
.toList();
|
.toList();
|
||||||
|
if (filteredPackages.isNotEmpty) {
|
||||||
return GridView.builder(
|
return GridView.builder(
|
||||||
physics: const NeverScrollableScrollPhysics(),
|
physics: const NeverScrollableScrollPhysics(),
|
||||||
shrinkWrap: true,
|
shrinkWrap: true,
|
||||||
@@ -273,6 +274,34 @@ class _MihBusinessHomeState extends State<MihBusinessHome>
|
|||||||
return filteredPackages[index];
|
return filteredPackages[index];
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
} else {
|
||||||
|
return Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
Icon(
|
||||||
|
MihIcons.mzansiAi,
|
||||||
|
size: 165,
|
||||||
|
color: MzanziInnovationHub.of(context)!
|
||||||
|
.theme
|
||||||
|
.secondaryColor(),
|
||||||
|
),
|
||||||
|
const SizedBox(height: 10),
|
||||||
|
Text(
|
||||||
|
"Mzansi AI is here to help you!",
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
overflow: TextOverflow.visible,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 25,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
color: MzanziInnovationHub.of(context)!
|
||||||
|
.theme
|
||||||
|
.secondaryColor(),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -302,6 +302,7 @@ class _MihPersonalHomeState extends State<MihPersonalHome>
|
|||||||
.contains(searchController.text.toLowerCase()))
|
.contains(searchController.text.toLowerCase()))
|
||||||
.map((package) => package.values.first)
|
.map((package) => package.values.first)
|
||||||
.toList();
|
.toList();
|
||||||
|
if (filteredPackages.isNotEmpty) {
|
||||||
return GridView.builder(
|
return GridView.builder(
|
||||||
physics: const NeverScrollableScrollPhysics(),
|
physics: const NeverScrollableScrollPhysics(),
|
||||||
shrinkWrap: true,
|
shrinkWrap: true,
|
||||||
@@ -317,6 +318,34 @@ class _MihPersonalHomeState extends State<MihPersonalHome>
|
|||||||
// return personalPackages[index];
|
// return personalPackages[index];
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
} else {
|
||||||
|
return Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
Icon(
|
||||||
|
MihIcons.mzansiAi,
|
||||||
|
size: 165,
|
||||||
|
color: MzanziInnovationHub.of(context)!
|
||||||
|
.theme
|
||||||
|
.secondaryColor(),
|
||||||
|
),
|
||||||
|
const SizedBox(height: 10),
|
||||||
|
Text(
|
||||||
|
"Mzansi AI is here to help you!",
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
overflow: TextOverflow.visible,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 25,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
color: MzanziInnovationHub.of(context)!
|
||||||
|
.theme
|
||||||
|
.secondaryColor(),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|||||||
Reference in New Issue
Block a user