user new MIH Colors
This commit is contained in:
@@ -1,10 +1,11 @@
|
|||||||
import 'package:custom_rating_bar/custom_rating_bar.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
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_button.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_package_alert.dart';
|
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_package_alert.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_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';
|
||||||
import 'package:mzansi_innovation_hub/mih_services/mih_mzansi_directory_services.dart';
|
import 'package:mzansi_innovation_hub/mih_services/mih_mzansi_directory_services.dart';
|
||||||
import 'package:supertokens_flutter/supertokens.dart';
|
import 'package:supertokens_flutter/supertokens.dart';
|
||||||
@@ -362,42 +363,12 @@ class _MihBusinessCardState extends State<MihBusinessCard> {
|
|||||||
),
|
),
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
const SizedBox(height: 10),
|
|
||||||
RatingBar.readOnly(
|
|
||||||
size: 50,
|
|
||||||
alignment: Alignment.center,
|
|
||||||
filledIcon: Icons.star,
|
|
||||||
emptyIcon: Icons.star_border,
|
|
||||||
halfFilledIcon: Icons.star_half,
|
|
||||||
filledColor: const Color(0xffe9e8a1),
|
|
||||||
// MzansiInnovationHub.of(context)!.theme.primaryColor(),
|
|
||||||
emptyColor: MzansiInnovationHub.of(context)!.theme.primaryColor(),
|
|
||||||
halfFilledColor: const Color(0xffe9e8a1),
|
|
||||||
// MzansiInnovationHub.of(context)!.theme.primaryColor(),
|
|
||||||
isHalfAllowed: true,
|
|
||||||
initialRating: widget.business.rating.isNotEmpty
|
|
||||||
? double.parse(widget.business.rating)
|
|
||||||
: 0,
|
|
||||||
maxRating: 5,
|
|
||||||
),
|
|
||||||
// Text(
|
|
||||||
// "Rating: ${widget.rating}",
|
|
||||||
// style: TextStyle(
|
|
||||||
// fontSize: 15,
|
|
||||||
// fontWeight: FontWeight.bold,
|
|
||||||
// color: MzansiInnovationHub.of(context)!.theme.primaryColor(),
|
|
||||||
// height: 1.0,
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// Divider(
|
|
||||||
// color: MzansiInnovationHub.of(context)!.theme.primaryColor(),
|
|
||||||
// ),
|
|
||||||
const SizedBox(height: 10),
|
const SizedBox(height: 10),
|
||||||
_buildContactInfo(
|
_buildContactInfo(
|
||||||
"Call",
|
"Call",
|
||||||
"Give us a quick call.",
|
"Give us a quick call.",
|
||||||
Icons.phone,
|
Icons.phone,
|
||||||
const Color(0xffaff0b3),
|
MihColors.getGreenColor(context),
|
||||||
() {
|
() {
|
||||||
// print("Calling ${widget.cellNumber}");
|
// print("Calling ${widget.cellNumber}");
|
||||||
_makePhoneCall(widget.business.contact_no);
|
_makePhoneCall(widget.business.contact_no);
|
||||||
@@ -410,7 +381,7 @@ class _MihBusinessCardState extends State<MihBusinessCard> {
|
|||||||
"Email",
|
"Email",
|
||||||
"Send us an email.",
|
"Send us an email.",
|
||||||
Icons.email,
|
Icons.email,
|
||||||
const Color(0xffdaa2e9),
|
MihColors.getPinkColor(context),
|
||||||
() {
|
() {
|
||||||
// print("Emailing ${widget.email}");
|
// print("Emailing ${widget.email}");
|
||||||
_launchEmail(
|
_launchEmail(
|
||||||
@@ -427,7 +398,7 @@ class _MihBusinessCardState extends State<MihBusinessCard> {
|
|||||||
"Location",
|
"Location",
|
||||||
"Come visit us.",
|
"Come visit us.",
|
||||||
Icons.location_on,
|
Icons.location_on,
|
||||||
const Color(0xffd69d7d),
|
MihColors.getOrangeColor(context),
|
||||||
() {
|
() {
|
||||||
final latitude =
|
final latitude =
|
||||||
double.parse(widget.business.gps_location.split(',')[0]);
|
double.parse(widget.business.gps_location.split(',')[0]);
|
||||||
@@ -453,7 +424,7 @@ class _MihBusinessCardState extends State<MihBusinessCard> {
|
|||||||
"Website",
|
"Website",
|
||||||
"Find out more about us.",
|
"Find out more about us.",
|
||||||
Icons.vpn_lock,
|
Icons.vpn_lock,
|
||||||
const Color(0xffd67d8a),
|
MihColors.getRedColor(context),
|
||||||
() {
|
() {
|
||||||
_launchWebsite(widget.business.website);
|
_launchWebsite(widget.business.website);
|
||||||
},
|
},
|
||||||
@@ -469,7 +440,7 @@ class _MihBusinessCardState extends State<MihBusinessCard> {
|
|||||||
"Rate Us",
|
"Rate Us",
|
||||||
"Let us know how we are doing.",
|
"Let us know how we are doing.",
|
||||||
Icons.star_rate_rounded,
|
Icons.star_rate_rounded,
|
||||||
const Color(0xffe9e8a1),
|
MihColors.getYellowColor(context),
|
||||||
() {
|
() {
|
||||||
businessReviewRatingWindow(true, widget.width);
|
businessReviewRatingWindow(true, widget.width);
|
||||||
},
|
},
|
||||||
@@ -484,10 +455,41 @@ class _MihBusinessCardState extends State<MihBusinessCard> {
|
|||||||
// "Bookmark",
|
// "Bookmark",
|
||||||
// "Save us for later.",
|
// "Save us for later.",
|
||||||
// Icons.bookmark_add_rounded,
|
// Icons.bookmark_add_rounded,
|
||||||
|
// MihColors.getBluishPurpleColor(context),
|
||||||
// const Color(0xff6e7dcc),
|
// const Color(0xff6e7dcc),
|
||||||
// () {
|
// () {
|
||||||
// // _launchWebsite(widget.website);
|
// // _launchWebsite(widget.website);
|
||||||
// print("Saving ${widget.businessName} to Directory");
|
// print("Saving ${widget.business.Name} to Directory");
|
||||||
|
// showDialog(
|
||||||
|
// context: context,
|
||||||
|
// builder: (context) {
|
||||||
|
// return MihPackageAlert(
|
||||||
|
// alertIcon: Icon(
|
||||||
|
// Icons.check_circle_rounded,
|
||||||
|
// size: 100,
|
||||||
|
// color: MzansiInnovationHub.of(context)!
|
||||||
|
// .theme
|
||||||
|
// .successColor(),
|
||||||
|
// ),
|
||||||
|
// alertTitle: "Saved to Directory",
|
||||||
|
// alertBody: Column(
|
||||||
|
// children: [
|
||||||
|
// Text(
|
||||||
|
// "${widget.business.Name} has been saved to your directory.",
|
||||||
|
// style: TextStyle(
|
||||||
|
// color: MzansiInnovationHub.of(context)!
|
||||||
|
// .theme
|
||||||
|
// .secondaryColor(),
|
||||||
|
// fontSize: 15,
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ],
|
||||||
|
// ),
|
||||||
|
// alertColour: MzansiInnovationHub.of(context)!
|
||||||
|
// .theme
|
||||||
|
// .successColor(),
|
||||||
|
// );
|
||||||
|
// });
|
||||||
// },
|
// },
|
||||||
// ),
|
// ),
|
||||||
const SizedBox(height: 10),
|
const SizedBox(height: 10),
|
||||||
@@ -550,4 +552,69 @@ class _MihBusinessCardState extends State<MihBusinessCard> {
|
|||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void showDeleteReviewAlert() {
|
||||||
|
showDialog(
|
||||||
|
context: context,
|
||||||
|
builder: (context) => MihPackageAlert(
|
||||||
|
alertColour: MzansiInnovationHub.of(context)!.theme.errorColor(),
|
||||||
|
alertIcon: Icon(
|
||||||
|
Icons.warning_rounded,
|
||||||
|
size: 100,
|
||||||
|
color: MzansiInnovationHub.of(context)!.theme.errorColor(),
|
||||||
|
),
|
||||||
|
alertTitle: "Bookmark Business",
|
||||||
|
alertBody: Column(
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
"Are you sure you want to save ${widget.business.Name} to your Mzansi Directory?",
|
||||||
|
style: TextStyle(
|
||||||
|
color: MzansiInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
|
fontSize: 15,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const SizedBox(height: 25),
|
||||||
|
Wrap(
|
||||||
|
spacing: 10,
|
||||||
|
runSpacing: 10,
|
||||||
|
children: [
|
||||||
|
MihButton(
|
||||||
|
width: 300,
|
||||||
|
onPressed: () async {
|
||||||
|
Navigator.of(context).pop();
|
||||||
|
},
|
||||||
|
buttonColor:
|
||||||
|
MzansiInnovationHub.of(context)!.theme.errorColor(),
|
||||||
|
child: Text(
|
||||||
|
"Cancel",
|
||||||
|
style: TextStyle(
|
||||||
|
color:
|
||||||
|
MzansiInnovationHub.of(context)!.theme.primaryColor(),
|
||||||
|
fontSize: 20,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
MihButton(
|
||||||
|
width: 300,
|
||||||
|
onPressed: () {},
|
||||||
|
buttonColor:
|
||||||
|
MzansiInnovationHub.of(context)!.theme.successColor(),
|
||||||
|
child: Text(
|
||||||
|
"Save Business",
|
||||||
|
style: TextStyle(
|
||||||
|
color:
|
||||||
|
MzansiInnovationHub.of(context)!.theme.primaryColor(),
|
||||||
|
fontSize: 20,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_
|
|||||||
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_text_form_field.dart';
|
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_text_form_field.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_services/mih_alert_services.dart';
|
import 'package:mzansi_innovation_hub/mih_services/mih_alert_services.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_services/mih_mzansi_directory_services.dart';
|
import 'package:mzansi_innovation_hub/mih_services/mih_mzansi_directory_services.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_services/mih_validation_services.dart';
|
import 'package:mzansi_innovation_hub/mih_services/mih_validation_services.dart';
|
||||||
@@ -358,15 +359,17 @@ class _MihReviewBusinessWindowState extends State<MihReviewBusinessWindow> {
|
|||||||
filledIcon: Icons.star,
|
filledIcon: Icons.star,
|
||||||
emptyIcon: Icons.star_border,
|
emptyIcon: Icons.star_border,
|
||||||
halfFilledIcon: Icons.star_half,
|
halfFilledIcon: Icons.star_half,
|
||||||
filledColor: MzansiInnovationHub.of(context)!
|
filledColor: MihColors.getYellowColor(context),
|
||||||
.theme
|
// filledColor: MzansiInnovationHub.of(context)!
|
||||||
.secondaryColor(),
|
// .theme
|
||||||
|
// .secondaryColor(),
|
||||||
emptyColor: MzansiInnovationHub.of(context)!
|
emptyColor: MzansiInnovationHub.of(context)!
|
||||||
.theme
|
.theme
|
||||||
.secondaryColor(),
|
.secondaryColor(),
|
||||||
halfFilledColor: MzansiInnovationHub.of(context)!
|
halfFilledColor: MihColors.getYellowColor(context),
|
||||||
.theme
|
// MzansiInnovationHub.of(context)!
|
||||||
.secondaryColor(),
|
// .theme
|
||||||
|
// .secondaryColor(),
|
||||||
isHalfAllowed: true,
|
isHalfAllowed: true,
|
||||||
initialRating: widget.businessReview != null
|
initialRating: widget.businessReview != null
|
||||||
? double.parse(_reviewScoreController.text)
|
? double.parse(_reviewScoreController.text)
|
||||||
@@ -379,16 +382,11 @@ class _MihReviewBusinessWindowState extends State<MihReviewBusinessWindow> {
|
|||||||
filledIcon: Icons.star,
|
filledIcon: Icons.star,
|
||||||
emptyIcon: Icons.star_border,
|
emptyIcon: Icons.star_border,
|
||||||
halfFilledIcon: Icons.star_half,
|
halfFilledIcon: Icons.star_half,
|
||||||
filledColor: MzansiInnovationHub.of(context)!
|
filledColor: MihColors.getYellowColor(context),
|
||||||
.theme
|
|
||||||
.secondaryColor(),
|
|
||||||
emptyColor: MzansiInnovationHub.of(context)!
|
emptyColor: MzansiInnovationHub.of(context)!
|
||||||
.theme
|
.theme
|
||||||
.secondaryColor(),
|
.secondaryColor(),
|
||||||
halfFilledColor: MzansiInnovationHub.of(context)!
|
halfFilledColor: MihColors.getYellowColor(context), isHalfAllowed: true,
|
||||||
.theme
|
|
||||||
.secondaryColor(),
|
|
||||||
isHalfAllowed: true,
|
|
||||||
initialRating: widget.businessReview != null
|
initialRating: widget.businessReview != null
|
||||||
? double.parse(_reviewScoreController.text)
|
? double.parse(_reviewScoreController.text)
|
||||||
: 1,
|
: 1,
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ 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_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_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';
|
||||||
import 'package:mzansi_innovation_hub/mih_services/mih_mzansi_directory_services.dart';
|
import 'package:mzansi_innovation_hub/mih_services/mih_mzansi_directory_services.dart';
|
||||||
|
|
||||||
@@ -94,12 +95,12 @@ class _MihBusinessReviewsState extends State<MihBusinessReviews> {
|
|||||||
filledIcon: Icons.star,
|
filledIcon: Icons.star,
|
||||||
emptyIcon: Icons.star_border,
|
emptyIcon: Icons.star_border,
|
||||||
halfFilledIcon: Icons.star_half,
|
halfFilledIcon: Icons.star_half,
|
||||||
filledColor: const Color(0xffe9e8a1),
|
filledColor: MihColors.getYellowColor(context),
|
||||||
// MzansiInnovationHub.of(context)!.theme.primaryColor(),
|
// MzansiInnovationHub.of(context)!.theme.primaryColor(),
|
||||||
emptyColor: MzansiInnovationHub.of(context)!
|
emptyColor: MzansiInnovationHub.of(context)!
|
||||||
.theme
|
.theme
|
||||||
.secondaryColor(),
|
.secondaryColor(),
|
||||||
halfFilledColor: const Color(0xffe9e8a1),
|
halfFilledColor: MihColors.getYellowColor(context),
|
||||||
// MzansiInnovationHub.of(context)!.theme.primaryColor(),
|
// MzansiInnovationHub.of(context)!.theme.primaryColor(),
|
||||||
// filledColor:
|
// filledColor:
|
||||||
// MzansiInnovationHub.of(context)!.theme.secondaryColor(),
|
// MzansiInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
|
|||||||
Reference in New Issue
Block a user