added cancel buypoints
This commit is contained in:
@ -150,6 +150,7 @@ class DestinationController extends GetxController {
|
||||
: false;
|
||||
bool buyPointImageAdded =
|
||||
dss != null && dss.buypoint_image != null ? true : false;
|
||||
bool buyPointCanceled = dss != null && dss.buy_point != null && dss.buy_point == 0 ? true : false;
|
||||
bool locationAlreadyCheckedIn =
|
||||
ds.length > 0 && ds[0].checkedin == true ? true : false;
|
||||
bool isuserLoggedIn = indexController.currentUser.isNotEmpty ? true : false;
|
||||
@ -296,6 +297,7 @@ class DestinationController extends GetxController {
|
||||
buyPointImageAdded == false &&
|
||||
ds.isNotEmpty &&
|
||||
buyPoint == true &&
|
||||
buyPointCanceled == false &&
|
||||
is_in_rog.value == true) {
|
||||
chekcs = 5;
|
||||
is_in_checkin.value = true;
|
||||
@ -616,9 +618,14 @@ class DestinationController extends GetxController {
|
||||
saveGameState();
|
||||
}
|
||||
|
||||
Future<void> cancelBuyPoint(Destination destination) async {
|
||||
DatabaseHelper db = DatabaseHelper.instance;
|
||||
await db.updateCancelBuyPoint(destination);
|
||||
PopulateDestinations();
|
||||
}
|
||||
|
||||
Future<void> makeBuyPoint(Destination destination, String imageurl) async {
|
||||
DatabaseHelper db = DatabaseHelper.instance;
|
||||
|
||||
await db.updateBuyPoint(destination, imageurl);
|
||||
PopulateDestinations();
|
||||
await GallerySaver.saveImage(imageurl);
|
||||
|
||||
Reference in New Issue
Block a user