update finish and check point message

This commit is contained in:
Mohamed Nouffer
2023-03-03 17:45:03 +05:30
parent 4994660dda
commit 044e5595c2
3 changed files with 11 additions and 4 deletions

View File

@ -3,12 +3,14 @@ import 'dart:async';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import 'package:intl/intl.dart'; import 'package:intl/intl.dart';
import 'package:rogapp/model/destination.dart';
import 'package:rogapp/pages/destination/destination_controller.dart'; import 'package:rogapp/pages/destination/destination_controller.dart';
import 'package:rogapp/pages/index/index_controller.dart'; import 'package:rogapp/pages/index/index_controller.dart';
import 'package:rogapp/services/external_service.dart'; import 'package:rogapp/services/external_service.dart';
class CameraPage extends StatelessWidget { class CameraPage extends StatelessWidget {
CameraPage({Key? key}) : super(key: key); Destination? destination;
CameraPage({Key? key, this.destination}) : super(key: key);
DestinationController destinationController = Get.find<DestinationController>(); DestinationController destinationController = Get.find<DestinationController>();
IndexController indexController = Get.find<IndexController>(); IndexController indexController = Get.find<IndexController>();
@ -133,7 +135,10 @@ class CameraPage extends StatelessWidget {
appBar: appBar:
destinationController.is_in_rog.value && destinationController.rogaining_counted.value == true ? destinationController.is_in_rog.value && destinationController.rogaining_counted.value == true ?
AppBar( AppBar(
title: Text("finishing_rogaining".tr) title: destination!.cp == -1 ?
Text("finishing_rogaining".tr)
:
Text("cp_pls_take_photo".tr)
, ,
leading: IconButton( leading: IconButton(
icon: Text("cancel".tr), icon: Text("cancel".tr),

View File

@ -221,7 +221,7 @@ class DestinationController extends GetxController {
is_in_checkin.value = true; is_in_checkin.value = true;
photos.clear(); photos.clear();
showModalBottomSheet(context: Get.context!, isScrollControlled: true, showModalBottomSheet(context: Get.context!, isScrollControlled: true,
builder:((context) => CameraPage()) builder:((context) => CameraPage(destination: d,))
).whenComplete((){ ).whenComplete((){
skip_gps = false; skip_gps = false;
rogaining_counted.value =true; rogaining_counted.value =true;
@ -267,7 +267,7 @@ class DestinationController extends GetxController {
is_at_goal.value = true; is_at_goal.value = true;
photos.clear(); photos.clear();
showModalBottomSheet(context: Get.context!, isScrollControlled: true, showModalBottomSheet(context: Get.context!, isScrollControlled: true,
builder:((context) => CameraPage()) builder:((context) => CameraPage(destination: d,))
).whenComplete((){ ).whenComplete((){
skip_gps = false; skip_gps = false;
chekcs = 0; chekcs = 0;

View File

@ -53,6 +53,7 @@ class StringValues extends Translations{
'sight_seeing': 'Sight seeing', 'sight_seeing': 'Sight seeing',
'rogaining' : 'Rogaining', 'rogaining' : 'Rogaining',
'finishing_rogaining' : 'Finishing Rogaining', 'finishing_rogaining' : 'Finishing Rogaining',
'cp_pls_take_photo' : "CP please take a photo",
'take_photo of the clock' : 'Take photo of the clock', 'take_photo of the clock' : 'Take photo of the clock',
'finish_goal': 'finish Goal', 'finish_goal': 'finish Goal',
'goal_saved': "Goal Saved", 'goal_saved': "Goal Saved",
@ -126,6 +127,7 @@ class StringValues extends Translations{
'sight_seeing': '観光', 'sight_seeing': '観光',
'rogaining' : 'ロゲイニング', 'rogaining' : 'ロゲイニング',
'finishing_rogaining' : 'ロゲイニングを終えて', 'finishing_rogaining' : 'ロゲイニングを終えて',
'cp_pls_take_photo' : "CPです。撮影してください。",
'take_photo of the clock' : '時計の写真を撮る', 'take_photo of the clock' : '時計の写真を撮る',
'finish_goal': 'フィニッシュゴール', 'finish_goal': 'フィニッシュゴール',
'goal_saved': "目標を保存しました", 'goal_saved': "目標を保存しました",