display message when no packages found
This commit is contained in:
parent
e9b97a4e11
commit
dfb4fb6b77
2 changed files with 87 additions and 29 deletions
|
|
@ -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(),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue