fix when there is data and you are serching
This commit is contained in:
@@ -140,97 +140,31 @@ class _MihFavouriteBusinessesState extends State<MihFavouriteBusinesses> {
|
||||
// Display message if no results after search
|
||||
if (businesses.isEmpty &&
|
||||
businessSearchController.text.isNotEmpty) {
|
||||
return Padding(
|
||||
padding:
|
||||
const EdgeInsets.symmetric(horizontal: 10.0),
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
const SizedBox(height: 50),
|
||||
Icon(
|
||||
MihIcons.businessProfile,
|
||||
size: 165,
|
||||
return Column(
|
||||
children: [
|
||||
const SizedBox(height: 50),
|
||||
Icon(
|
||||
MihIcons.iDontKnow,
|
||||
size: 165,
|
||||
color: MzansiInnovationHub.of(context)!
|
||||
.theme
|
||||
.secondaryColor(),
|
||||
),
|
||||
const SizedBox(height: 10),
|
||||
Text(
|
||||
"Let's Try Refining Your Search",
|
||||
textAlign: TextAlign.center,
|
||||
overflow: TextOverflow.visible,
|
||||
style: TextStyle(
|
||||
fontSize: 25,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: MzansiInnovationHub.of(context)!
|
||||
.theme
|
||||
.secondaryColor(),
|
||||
),
|
||||
const SizedBox(height: 10),
|
||||
Text(
|
||||
"No Businesses added to your Favourites",
|
||||
textAlign: TextAlign.center,
|
||||
overflow: TextOverflow.visible,
|
||||
style: TextStyle(
|
||||
fontSize: 25,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: MzansiInnovationHub.of(context)!
|
||||
.theme
|
||||
.secondaryColor(),
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 10),
|
||||
Center(
|
||||
child: RichText(
|
||||
textAlign: TextAlign.center,
|
||||
text: TextSpan(
|
||||
style: TextStyle(
|
||||
fontSize: 20,
|
||||
fontWeight: FontWeight.normal,
|
||||
color: MzansiInnovationHub.of(context)!
|
||||
.theme
|
||||
.secondaryColor(),
|
||||
),
|
||||
children: [
|
||||
TextSpan(text: "Use the Mzansi Search"),
|
||||
// WidgetSpan(
|
||||
// alignment:
|
||||
// PlaceholderAlignment.middle,
|
||||
// child: Icon(
|
||||
// Icons.search,
|
||||
// size: 20,
|
||||
// color:
|
||||
// MzansiInnovationHub.of(context)!
|
||||
// .theme
|
||||
// .secondaryColor(),
|
||||
// ),
|
||||
// ),
|
||||
TextSpan(
|
||||
text:
|
||||
" to find Businesses of Mzansi"),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
// return Column(
|
||||
// children: [
|
||||
// const SizedBox(height: 50),
|
||||
// Icon(
|
||||
// Icons.business_center_rounded,
|
||||
// size: 150,
|
||||
// color: MzansiInnovationHub.of(context)!
|
||||
// .theme
|
||||
// .secondaryColor(),
|
||||
// ),
|
||||
// Padding(
|
||||
// padding: const EdgeInsets.symmetric(
|
||||
// horizontal: 10.0),
|
||||
// child: SizedBox(
|
||||
// width: 500,
|
||||
// child: Text(
|
||||
// "No favourites yet, use Mzansi Search to find and bookmark businesses you like",
|
||||
// textAlign: TextAlign.center,
|
||||
// style: TextStyle(
|
||||
// fontSize: 18,
|
||||
// fontWeight: FontWeight.bold,
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ],
|
||||
// );
|
||||
}
|
||||
return BuildFavouriteBusinessesList(
|
||||
favouriteBusinesses:
|
||||
@@ -241,6 +175,7 @@ class _MihFavouriteBusinessesState extends State<MihFavouriteBusinesses> {
|
||||
);
|
||||
} else {
|
||||
// This block handles the case where there are no bookmarked businesses initially
|
||||
|
||||
return Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 10.0),
|
||||
child: Column(
|
||||
@@ -303,32 +238,6 @@ class _MihFavouriteBusinessesState extends State<MihFavouriteBusinesses> {
|
||||
],
|
||||
),
|
||||
);
|
||||
// return Column(
|
||||
// children: [
|
||||
// const SizedBox(height: 50),
|
||||
// Icon(
|
||||
// Icons.business_center_rounded,
|
||||
// size: 150,
|
||||
// color: MzansiInnovationHub.of(context)!
|
||||
// .theme
|
||||
// .secondaryColor(),
|
||||
// ),
|
||||
// Padding(
|
||||
// padding: const EdgeInsets.symmetric(horizontal: 10.0),
|
||||
// child: SizedBox(
|
||||
// width: 500,
|
||||
// child: Text(
|
||||
// "No favourites yet, use Mzansi Search to find and bookmark businesses you like",
|
||||
// textAlign: TextAlign.center,
|
||||
// style: TextStyle(
|
||||
// fontSize: 18,
|
||||
// fontWeight: FontWeight.bold,
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ],
|
||||
// );
|
||||
}
|
||||
} else if (snapshot.hasError) {
|
||||
return Center(
|
||||
|
||||
Reference in New Issue
Block a user