updated and fix checking, buy point

This commit is contained in:
Mohamed Nouffer
2023-09-14 22:53:51 +05:30
parent aa7b13b76a
commit b54c29eb4b
10 changed files with 247 additions and 95 deletions

View File

@ -17,11 +17,12 @@ import 'package:rogapp/widgets/bottom_sheet_controller.dart';
import 'package:url_launcher/url_launcher.dart';
class BottomSheetNew extends GetView<BottomSheetController> {
BottomSheetNew({Key? key}) : super(key: key);
BottomSheetNew({Key? key, required this.destination}) : super(key: key);
final IndexController indexController = Get.find<IndexController>();
final DestinationController destinationController =
Get.find<DestinationController>();
Destination destination;
Image getImage() {
String serverUrl = ConstValues.currentServer();
@ -108,7 +109,7 @@ class BottomSheetNew extends GetView<BottomSheetController> {
print('---- rog_mode ----- ${indexController.rog_mode} -----');
return indexController.rog_mode == 0
? detailsSheet(context)
: Container(width: 200, height: 250, color: Colors.purple,); //destinationSheet(context);
: destinationSheet(context);
}
// Show destination detais
@ -555,22 +556,18 @@ class BottomSheetNew extends GetView<BottomSheetController> {
backgroundColor:
Theme.of(context).colorScheme.secondary),
onPressed: () async {
final Destination dd =
destinationController.festuretoDestination(
indexController.currentFeature[0]);
print("----- name of dest ${dd.name} ----");
if (dd.cp == -1) {
if (destination.cp == -1) {
destinationController.is_in_rog.value = true;
destinationController.addToRogaining(
destinationController.current_lat,
destinationController.current_lon,
dd.location_id!);
destination.location_id!);
saveGameState();
ExternalService()
.StartRogaining()
.then((value) => Get.back());
} else {
destinationController.CallforCheckin(dd);
await destinationController.CallforCheckin(destination);
}
},
child: Text(