20240903 pre release
This commit is contained in:
@ -139,16 +139,23 @@ class BottomSheetNew extends GetView<BottomSheetController> {
|
||||
}
|
||||
|
||||
Future<void> saveTemporaryImage(Destination destination) async {
|
||||
final serverUrl = ConstValues.currentServer();
|
||||
final imagePath = '$serverUrl/media/compressed/${destination.photos}';
|
||||
try {
|
||||
final serverUrl = ConstValues.currentServer();
|
||||
final imagePath = '$serverUrl/media/compressed/${destination.photos}';
|
||||
|
||||
final tempDir = await getTemporaryDirectory();
|
||||
final tempFile = await File('${tempDir.path}/temp_image.jpg').create(recursive: true);
|
||||
final response = await http.get(Uri.parse(imagePath));
|
||||
await tempFile.writeAsBytes(response.bodyBytes);
|
||||
debugPrint("imagePath = $imagePath");
|
||||
|
||||
destinationController.photos.clear();
|
||||
destinationController.photos.add(tempFile);
|
||||
final tempDir = await getTemporaryDirectory();
|
||||
final tempFile = await File('${tempDir.path}/temp_image.jpg').create(
|
||||
recursive: true);
|
||||
final response = await http.get(Uri.parse(imagePath));
|
||||
await tempFile.writeAsBytes(response.bodyBytes);
|
||||
|
||||
destinationController.photos.clear();
|
||||
destinationController.photos.add(tempFile);
|
||||
} catch( e ) {
|
||||
debugPrint("saveTemporaryImage error : $e");
|
||||
}
|
||||
}
|
||||
|
||||
// アクションボタン(チェックイン、ゴールなど)を表示するためのメソッドです。
|
||||
@ -239,12 +246,8 @@ class BottomSheetNew extends GetView<BottomSheetController> {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
destinationController.isInRog.value = true;
|
||||
|
||||
|
||||
// Show confirmation dialog
|
||||
Get.dialog(
|
||||
AlertDialog(
|
||||
@ -270,6 +273,7 @@ class BottomSheetNew extends GetView<BottomSheetController> {
|
||||
// Clear data and start game logic here
|
||||
destinationController.resetRogaining();
|
||||
|
||||
// ここでチェックインもしている。
|
||||
destinationController.addToRogaining(
|
||||
destinationController.currentLat,
|
||||
destinationController.currentLon,
|
||||
@ -996,15 +1000,12 @@ class BottomSheetNew extends GetView<BottomSheetController> {
|
||||
Obx((() => indexController.rogMode.value == 1
|
||||
? ElevatedButton(
|
||||
onPressed: () async {
|
||||
Destination dest =
|
||||
indexController.currentDestinationFeature[0];
|
||||
//print("~~~~ before checking button ~~~~");
|
||||
Destination dest = indexController.currentDestinationFeature[0];
|
||||
print("~~~~ before checking button ~~~~");
|
||||
//print("------ curent destination is ${dest!.checkedIn}-------");
|
||||
destinationController.makeCheckin(
|
||||
dest, !dest.checkedin!, "");
|
||||
destinationController.makeCheckin( dest, !dest.checkedin!, "");
|
||||
},
|
||||
child: indexController
|
||||
.currentDestinationFeature[0].checkedin ==
|
||||
child: indexController.currentDestinationFeature[0].checkedin ==
|
||||
false
|
||||
? const Text("チェックイン")
|
||||
: const Text("チェックアウト"))
|
||||
|
||||
Reference in New Issue
Block a user