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:get/get.dart';
import 'package:intl/intl.dart';
import 'package:rogapp/model/destination.dart';
import 'package:rogapp/pages/destination/destination_controller.dart';
import 'package:rogapp/pages/index/index_controller.dart';
import 'package:rogapp/services/external_service.dart';
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>();
IndexController indexController = Get.find<IndexController>();
@ -133,7 +135,10 @@ class CameraPage extends StatelessWidget {
appBar:
destinationController.is_in_rog.value && destinationController.rogaining_counted.value == true ?
AppBar(
title: Text("finishing_rogaining".tr)
title: destination!.cp == -1 ?
Text("finishing_rogaining".tr)
:
Text("cp_pls_take_photo".tr)
,
leading: IconButton(
icon: Text("cancel".tr),

View File

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