removed distance to checkin

This commit is contained in:
2023-11-24 12:08:02 +05:30
parent d8fd352a62
commit 9c66dffe69
2 changed files with 46 additions and 60 deletions

View File

@ -137,12 +137,8 @@ class DrawerPage extends StatelessWidget {
onTap: () { onTap: () {
String token = indexController.currentUser[0]['token']; String token = indexController.currentUser[0]['token'];
AuthService.deleteUser(token).then((value) { AuthService.deleteUser(token).then((value) {
if (value.isNotEmpty) { Get.snackbar("ユーザーデータを削除する",
indexController.logout(); "データを削除するためにユーザーの同意が設定されています アプリとサーバーでユーザーデータが削除されました");
Get.toNamed(AppPages.TRAVEL);
Get.snackbar("ユーザーデータを削除する",
"データを削除するためにユーザーの同意が設定されています アプリとサーバーでユーザーデータが削除されました");
}
}); });
}, },
) )

View File

@ -604,65 +604,55 @@ class BottomSheetNew extends GetView<BottomSheetController> {
), ),
// forced start / checkin // forced start / checkin
Obx( Obx(() => ElevatedButton(
() => distanceToDest <= style: ElevatedButton.styleFrom(
backgroundColor:
Theme.of(context).colorScheme.secondary),
onPressed: () async {
//print("~~~~ manual checkin button ~~~~");
if (destination.cp == -1 &&
destinationController.isInRog.value ==
false &&
destinationController destinationController
.getForcedChckinDistance(destination) .rogainingCounted.value ==
? ElevatedButton( false) {
style: ElevatedButton.styleFrom( destinationController.isInRog.value = true;
backgroundColor: Theme.of(context) destinationController.addToRogaining(
.colorScheme destinationController.currentLat,
.secondary), destinationController.currentLon,
onPressed: () async { destination.location_id!);
//print("~~~~ manual checkin button ~~~~"); saveGameState();
if (destination.cp == -1 && ExternalService()
.startRogaining()
.then((value) => Get.back());
} else {
if (destination.cp == -1) {
return;
}
Get.back();
await destinationController
.callforCheckin(destination);
}
},
child: Text(
destination.cp == -1 &&
destinationController.isInRog.value == destinationController.isInRog.value ==
false && false &&
destinationController destinationController
.rogainingCounted.value == .rogainingCounted.value ==
false) { false
destinationController.isInRog.value = ? "ロゲ開始"
true; : destinationController.isInRog.value ==
destinationController.addToRogaining( true &&
destinationController.currentLat, destination.cp == -1
destinationController.currentLon, ? "ゲーム中"
destination.location_id!); : isAlreadyCheckedIn == true
saveGameState(); ? "ゲーム中"
ExternalService() : "チェックイン",
.startRogaining() style: TextStyle(
.then((value) => Get.back()); color: Theme.of(context)
} else { .colorScheme
if (destination.cp == -1) { .onSecondary))))
return;
}
Get.back();
await destinationController
.callforCheckin(destination);
}
},
child: Text(
destination.cp == -1 &&
destinationController
.isInRog.value ==
false &&
destinationController
.rogainingCounted.value ==
false
? "ロゲ開始"
: destinationController
.isInRog.value ==
true &&
destination.cp == -1
? "ゲーム中"
: isAlreadyCheckedIn == true
? "ゲーム中"
: "チェックイン",
style: TextStyle(
color: Theme.of(context)
.colorScheme
.onSecondary)))
: Container(),
)
// ElevatedButton( // ElevatedButton(
// onPressed: () {}, child: const Text("ゲーム中")), // onPressed: () {}, child: const Text("ゲーム中")),
], ],