magae state badly
This commit is contained in:
@@ -42,7 +42,7 @@ class _BuildBusinessSearchResultsListState
|
|||||||
'/business-profile/view',
|
'/business-profile/view',
|
||||||
arguments: BusinessViewArguments(
|
arguments: BusinessViewArguments(
|
||||||
widget.businessList[index],
|
widget.businessList[index],
|
||||||
widget.startUpSearch,
|
widget.businessList[index].Name,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -94,7 +94,16 @@ class _MihReviewBusinessWindowState extends State<MihReviewBusinessWindow> {
|
|||||||
Navigator.of(context).pop(); //Remove loading dialog
|
Navigator.of(context).pop(); //Remove loading dialog
|
||||||
Navigator.of(context).pop(); //Remove delete dialog
|
Navigator.of(context).pop(); //Remove delete dialog
|
||||||
if (statusCode == 200) {
|
if (statusCode == 200) {
|
||||||
Navigator.of(context).pop();
|
Navigator.of(context).pop(); //Remove window
|
||||||
|
Navigator.of(context).pop(); //Remove profile
|
||||||
|
Navigator.of(context).pop(); //Remove directory
|
||||||
|
Navigator.of(context).pushNamed(
|
||||||
|
'/mzansi-directory',
|
||||||
|
arguments: MzansiDirectoryArguments(
|
||||||
|
widget.startUpSearch, // startUpSearch
|
||||||
|
false, // personalSearch
|
||||||
|
),
|
||||||
|
);
|
||||||
MihAlertServices().successAlert(
|
MihAlertServices().successAlert(
|
||||||
"Successfully Deleted Review!",
|
"Successfully Deleted Review!",
|
||||||
"Your review has successfully been delete and will no longer appear under the business.",
|
"Your review has successfully been delete and will no longer appear under the business.",
|
||||||
@@ -211,7 +220,16 @@ class _MihReviewBusinessWindowState extends State<MihReviewBusinessWindow> {
|
|||||||
.then((statusCode) {
|
.then((statusCode) {
|
||||||
Navigator.of(context).pop(); //Remove loading dialog
|
Navigator.of(context).pop(); //Remove loading dialog
|
||||||
if (statusCode == 201) {
|
if (statusCode == 201) {
|
||||||
Navigator.of(context).pop();
|
Navigator.of(context).pop(); // pop window
|
||||||
|
Navigator.of(context).pop(); // pop business profile
|
||||||
|
Navigator.of(context).pop(); // pop directory
|
||||||
|
Navigator.of(context).pushNamed(
|
||||||
|
'/mzansi-directory',
|
||||||
|
arguments: MzansiDirectoryArguments(
|
||||||
|
widget.startUpSearch, // startUpSearch
|
||||||
|
false, // personalSearch
|
||||||
|
),
|
||||||
|
);
|
||||||
MihAlertServices().successAlert(
|
MihAlertServices().successAlert(
|
||||||
"Successfully Added Review!",
|
"Successfully Added Review!",
|
||||||
"Your review has successfully been added and will now appear under the business.",
|
"Your review has successfully been added and will now appear under the business.",
|
||||||
@@ -333,30 +351,56 @@ class _MihReviewBusinessWindowState extends State<MihReviewBusinessWindow> {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
const SizedBox(height: 4),
|
const SizedBox(height: 4),
|
||||||
RatingBar(
|
widget.readOnly
|
||||||
size: 50,
|
? RatingBar.readOnly(
|
||||||
alignment: Alignment.centerLeft,
|
size: 50,
|
||||||
filledIcon: Icons.star,
|
alignment: Alignment.centerLeft,
|
||||||
emptyIcon: Icons.star_border,
|
filledIcon: Icons.star,
|
||||||
halfFilledIcon: Icons.star_half,
|
emptyIcon: Icons.star_border,
|
||||||
filledColor:
|
halfFilledIcon: Icons.star_half,
|
||||||
MzansiInnovationHub.of(context)!.theme.secondaryColor(),
|
filledColor: MzansiInnovationHub.of(context)!
|
||||||
emptyColor:
|
.theme
|
||||||
MzansiInnovationHub.of(context)!.theme.secondaryColor(),
|
.secondaryColor(),
|
||||||
halfFilledColor:
|
emptyColor: MzansiInnovationHub.of(context)!
|
||||||
MzansiInnovationHub.of(context)!.theme.secondaryColor(),
|
.theme
|
||||||
isHalfAllowed: true,
|
.secondaryColor(),
|
||||||
initialRating: widget.businessReview != null
|
halfFilledColor: MzansiInnovationHub.of(context)!
|
||||||
? double.parse(_reviewScoreController.text)
|
.theme
|
||||||
: 1,
|
.secondaryColor(),
|
||||||
maxRating: 5,
|
isHalfAllowed: true,
|
||||||
onRatingChanged: (double) {
|
initialRating: widget.businessReview != null
|
||||||
setState(() {
|
? double.parse(_reviewScoreController.text)
|
||||||
_reviewScoreController.text = double.toStringAsFixed(1);
|
: 1,
|
||||||
});
|
maxRating: 5,
|
||||||
print(_reviewScoreController.text);
|
)
|
||||||
},
|
: RatingBar(
|
||||||
),
|
size: 50,
|
||||||
|
alignment: Alignment.centerLeft,
|
||||||
|
filledIcon: Icons.star,
|
||||||
|
emptyIcon: Icons.star_border,
|
||||||
|
halfFilledIcon: Icons.star_half,
|
||||||
|
filledColor: MzansiInnovationHub.of(context)!
|
||||||
|
.theme
|
||||||
|
.secondaryColor(),
|
||||||
|
emptyColor: MzansiInnovationHub.of(context)!
|
||||||
|
.theme
|
||||||
|
.secondaryColor(),
|
||||||
|
halfFilledColor: MzansiInnovationHub.of(context)!
|
||||||
|
.theme
|
||||||
|
.secondaryColor(),
|
||||||
|
isHalfAllowed: true,
|
||||||
|
initialRating: widget.businessReview != null
|
||||||
|
? double.parse(_reviewScoreController.text)
|
||||||
|
: 1,
|
||||||
|
maxRating: 5,
|
||||||
|
onRatingChanged: (double) {
|
||||||
|
setState(() {
|
||||||
|
_reviewScoreController.text =
|
||||||
|
double.toStringAsFixed(1);
|
||||||
|
});
|
||||||
|
print(_reviewScoreController.text);
|
||||||
|
},
|
||||||
|
),
|
||||||
Visibility(
|
Visibility(
|
||||||
visible: widget.readOnly,
|
visible: widget.readOnly,
|
||||||
child: const SizedBox(height: 10),
|
child: const SizedBox(height: 10),
|
||||||
|
|||||||
Reference in New Issue
Block a user