Mzansi Business Profile No data message enhanced
This commit is contained in:
@@ -3,6 +3,7 @@ import 'package:flutter/material.dart';
|
|||||||
import 'package:mzansi_innovation_hub/main.dart';
|
import 'package:mzansi_innovation_hub/main.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_components/mih_objects/business.dart';
|
import 'package:mzansi_innovation_hub/mih_components/mih_objects/business.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_components/mih_objects/business_review.dart';
|
import 'package:mzansi_innovation_hub/mih_components/mih_objects/business_review.dart';
|
||||||
|
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_icons.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_components/mih_pop_up_messages/mih_loading_circle.dart';
|
import 'package:mzansi_innovation_hub/mih_components/mih_pop_up_messages/mih_loading_circle.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart';
|
import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_packages/mzansi_profile/business_profile/components/mih_review_business_window.dart';
|
import 'package:mzansi_innovation_hub/mih_packages/mzansi_profile/business_profile/components/mih_review_business_window.dart';
|
||||||
@@ -60,25 +61,99 @@ class _MihBusinessReviewsState extends State<MihBusinessReviews> {
|
|||||||
List<BusinessReview> reviews = asyncSnapshot.data!;
|
List<BusinessReview> reviews = asyncSnapshot.data!;
|
||||||
print("Reviews: ${reviews.length}");
|
print("Reviews: ${reviews.length}");
|
||||||
if (reviews.isEmpty) {
|
if (reviews.isEmpty) {
|
||||||
return Column(
|
return Padding(
|
||||||
children: [
|
padding: const EdgeInsets.symmetric(horizontal: 10.0),
|
||||||
const SizedBox(height: 50),
|
child: Column(
|
||||||
Icon(
|
// mainAxisAlignment: MainAxisAlignment.center,
|
||||||
Icons.star_rate_rounded,
|
// crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
size: 150,
|
children: [
|
||||||
color:
|
const SizedBox(height: 50),
|
||||||
MzansiInnovationHub.of(context)!.theme.secondaryColor(),
|
Stack(
|
||||||
),
|
alignment: AlignmentDirectional.center,
|
||||||
Text(
|
children: [
|
||||||
"No reviews yet, be the first the review\n${widget.business.Name}",
|
Padding(
|
||||||
textAlign: TextAlign.center,
|
padding: const EdgeInsets.only(top: 10.0),
|
||||||
style: TextStyle(
|
child: Icon(
|
||||||
fontSize: 18,
|
MihIcons.mihRing,
|
||||||
fontWeight: FontWeight.bold,
|
size: 165,
|
||||||
|
color: MzansiInnovationHub.of(context)!
|
||||||
|
.theme
|
||||||
|
.secondaryColor(),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Icon(
|
||||||
|
Icons.star_rate_rounded,
|
||||||
|
size: 150,
|
||||||
|
color: MzansiInnovationHub.of(context)!
|
||||||
|
.theme
|
||||||
|
.secondaryColor(),
|
||||||
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
),
|
const SizedBox(height: 10),
|
||||||
],
|
Text(
|
||||||
|
"No reviews yet, be the first the review ${widget.business.Name}",
|
||||||
|
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: "Press "),
|
||||||
|
// WidgetSpan(
|
||||||
|
// alignment: PlaceholderAlignment.middle,
|
||||||
|
// child: Icon(
|
||||||
|
// Icons.menu,
|
||||||
|
// size: 20,
|
||||||
|
// color: MzansiInnovationHub.of(context)!
|
||||||
|
// .theme
|
||||||
|
// .secondaryColor(),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// TextSpan(text: " to add your first loyalty card"),
|
||||||
|
// ],
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
],
|
||||||
|
),
|
||||||
);
|
);
|
||||||
|
// return Column(
|
||||||
|
// children: [
|
||||||
|
// const SizedBox(height: 50),
|
||||||
|
// Icon(
|
||||||
|
// Icons.star_rate_rounded,
|
||||||
|
// size: 150,
|
||||||
|
// color:
|
||||||
|
// MzansiInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
|
// ),
|
||||||
|
// Text(
|
||||||
|
// "No reviews yet, be the first the review\n${widget.business.Name}",
|
||||||
|
// textAlign: TextAlign.center,
|
||||||
|
// style: TextStyle(
|
||||||
|
// fontSize: 18,
|
||||||
|
// fontWeight: FontWeight.bold,
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ],
|
||||||
|
// );
|
||||||
} else {
|
} else {
|
||||||
int descriptionDisplayCOunt = 75;
|
int descriptionDisplayCOunt = 75;
|
||||||
return ListView.separated(
|
return ListView.separated(
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import 'package:mzansi_innovation_hub/main.dart';
|
import 'package:mzansi_innovation_hub/main.dart';
|
||||||
|
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_icons.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_single_child_scroll.dart';
|
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_single_child_scroll.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_package_tool_body.dart';
|
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_package_tool_body.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_search_bar.dart';
|
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_search_bar.dart';
|
||||||
@@ -61,15 +62,69 @@ class _MihBusinessUserSearchState extends State<MihBusinessUserSearch> {
|
|||||||
arguments: widget.arguments,
|
arguments: widget.arguments,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return Center(
|
return Padding(
|
||||||
child: Text(
|
padding: const EdgeInsets.symmetric(horizontal: 10.0),
|
||||||
"Enter Username or Email to search",
|
child: Column(
|
||||||
style: TextStyle(
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
fontSize: 25,
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
color: MzansiInnovationHub.of(context)!.theme.messageTextColor()),
|
children: [
|
||||||
textAlign: TextAlign.center,
|
const SizedBox(height: 50),
|
||||||
|
Icon(
|
||||||
|
MihIcons.personalProfile,
|
||||||
|
size: 165,
|
||||||
|
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
|
),
|
||||||
|
const SizedBox(height: 10),
|
||||||
|
Text(
|
||||||
|
"Search for a Member of Mzansi to add to your team",
|
||||||
|
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: "Press "),
|
||||||
|
// WidgetSpan(
|
||||||
|
// alignment: PlaceholderAlignment.middle,
|
||||||
|
// child: Icon(
|
||||||
|
// Icons.menu,
|
||||||
|
// size: 20,
|
||||||
|
// color: MzansiInnovationHub.of(context)!
|
||||||
|
// .theme
|
||||||
|
// .secondaryColor(),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// TextSpan(text: " to add your first loyalty card"),
|
||||||
|
// ],
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
// return Center(
|
||||||
|
// child: Text(
|
||||||
|
// "Enter Username or Email to search",
|
||||||
|
// style: TextStyle(
|
||||||
|
// fontSize: 25,
|
||||||
|
// color: MzansiInnovationHub.of(context)!.theme.messageTextColor()),
|
||||||
|
// textAlign: TextAlign.center,
|
||||||
|
// ),
|
||||||
|
// );
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|||||||
Reference in New Issue
Block a user