diff --git a/ios/Flutter/AppFrameworkInfo.plist b/ios/Flutter/AppFrameworkInfo.plist
index 80391e4..9625e10 100644
--- a/ios/Flutter/AppFrameworkInfo.plist
+++ b/ios/Flutter/AppFrameworkInfo.plist
@@ -1,26 +1,26 @@
-
-
-
-
- CFBundleDevelopmentRegion
- en
- CFBundleExecutable
- App
- CFBundleIdentifier
- io.flutter.flutter.app
- CFBundleInfoDictionaryVersion
- 6.0
- CFBundleName
- App
- CFBundlePackageType
- FMWK
- CFBundleShortVersionString
- 1.0
- CFBundleSignature
- ????
- CFBundleVersion
- 1.0
- MinimumOSVersion
- 9.0
-
-
+
+
+
+
+ CFBundleDevelopmentRegion
+ en
+ CFBundleExecutable
+ App
+ CFBundleIdentifier
+ io.flutter.flutter.app
+ CFBundleInfoDictionaryVersion
+ 6.0
+ CFBundleName
+ App
+ CFBundlePackageType
+ FMWK
+ CFBundleShortVersionString
+ 1.0
+ CFBundleSignature
+ ????
+ CFBundleVersion
+ 1.0
+ MinimumOSVersion
+ 11.0
+
+
diff --git a/ios/Podfile b/ios/Podfile
index a47d938..c0c99e2 100644
--- a/ios/Podfile
+++ b/ios/Podfile
@@ -1,5 +1,5 @@
# Uncomment this line to define a global platform for your project
-# platform :ios, '9.0'
+# platform :ios, '11.0'
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
@@ -103,4 +103,4 @@ post_install do |installer|
end
# End of the permission_handler configuration
end
-end
\ No newline at end of file
+end
diff --git a/ios/Podfile.lock b/ios/Podfile.lock
index bcddbcf..066e355 100644
--- a/ios/Podfile.lock
+++ b/ios/Podfile.lock
@@ -1,4 +1,6 @@
PODS:
+ - camera_avfoundation (0.0.1):
+ - Flutter
- Flutter (1.0.0)
- flutter_compass (0.0.1):
- Flutter
@@ -30,6 +32,7 @@ PODS:
- Flutter
DEPENDENCIES:
+ - camera_avfoundation (from `.symlinks/plugins/camera_avfoundation/ios`)
- Flutter (from `Flutter`)
- flutter_compass (from `.symlinks/plugins/flutter_compass/ios`)
- flutter_keyboard_visibility (from `.symlinks/plugins/flutter_keyboard_visibility/ios`)
@@ -47,6 +50,8 @@ SPEC REPOS:
- GoogleMaps
EXTERNAL SOURCES:
+ camera_avfoundation:
+ :path: ".symlinks/plugins/camera_avfoundation/ios"
Flutter:
:path: Flutter
flutter_compass:
@@ -69,7 +74,8 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/url_launcher_ios/ios"
SPEC CHECKSUMS:
- Flutter: 50d75fe2f02b26cc09d224853bb45737f8b3214a
+ camera_avfoundation: 07c77549ea54ad95d8581be86617c094a46280d9
+ Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
flutter_compass: cbbd285cea1584c7ac9c4e0c3e1f17cbea55e855
flutter_keyboard_visibility: 0339d06371254c3eb25eeb90ba8d17dca8f9c069
FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a
@@ -82,6 +88,6 @@ SPEC CHECKSUMS:
sqflite: 6d358c025f5b867b29ed92fc697fd34924e11904
url_launcher_ios: 839c58cdb4279282219f5e248c3321761ff3c4de
-PODFILE CHECKSUM: 0793805c7f7ae4910c8f6c28aaed7fe0a31e9dce
+PODFILE CHECKSUM: a1c2f8dde3796ecc1697a15e7c75eb5205d8a740
COCOAPODS: 1.11.2
diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj
index 4d0e5bf..87cdf1e 100644
--- a/ios/Runner.xcodeproj/project.pbxproj
+++ b/ios/Runner.xcodeproj/project.pbxproj
@@ -357,7 +357,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
- IPHONEOS_DEPLOYMENT_TARGET = 9.0;
+ IPHONEOS_DEPLOYMENT_TARGET = 11.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
@@ -435,7 +435,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
- IPHONEOS_DEPLOYMENT_TARGET = 9.0;
+ IPHONEOS_DEPLOYMENT_TARGET = 11.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
@@ -484,7 +484,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
- IPHONEOS_DEPLOYMENT_TARGET = 9.0;
+ IPHONEOS_DEPLOYMENT_TARGET = 11.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
diff --git a/ios/Runner/Info.plist b/ios/Runner/Info.plist
index c6ce34c..cbdb3fc 100644
--- a/ios/Runner/Info.plist
+++ b/ios/Runner/Info.plist
@@ -42,6 +42,10 @@
LaunchScreen
UIMainStoryboardFile
Main
+ NSCameraUsageDescription
+ Need camera to get photo when finish rogaining
+ NSMicrophoneUsageDescription
+ Need to store capture sound.
UISupportedInterfaceOrientations
UIInterfaceOrientationPortrait
diff --git a/lib/model/Rogaining.dart b/lib/model/Rogaining.dart
new file mode 100644
index 0000000..483e22e
--- /dev/null
+++ b/lib/model/Rogaining.dart
@@ -0,0 +1,47 @@
+
+class Rogaining {
+ int? rog_id;
+ int? course_id;
+ int? user_id;
+ int? location_id;
+ double? lat;
+ double? lon;
+ int? time_stamp;
+
+ Rogaining({
+ this.rog_id,
+ this.course_id,
+ this.user_id,
+ this.location_id,
+ this.lat,
+ this.lon,
+ this.time_stamp
+ });
+
+ factory Rogaining.fromMap(Map json) {
+
+ return Rogaining(
+ rog_id: json['rog_id'],
+ course_id: json['course_id'],
+ user_id: json['user_id'],
+ location_id: json['location_id'],
+ lat: json['lat'],
+ lon: json['lon'],
+ time_stamp: json['time_stamp']
+ );
+ }
+
+ Map toMap(){
+ return {
+ 'rog_id':rog_id,
+ 'course_id': course_id,
+ 'user_id': user_id,
+ 'location_id': location_id,
+ 'lat': lat,
+ 'lon': lon,
+ 'time_stamp': time_stamp
+ };
+ }
+}
+
+
diff --git a/lib/pages/camera/camera_page.dart b/lib/pages/camera/camera_page.dart
new file mode 100644
index 0000000..920fa62
--- /dev/null
+++ b/lib/pages/camera/camera_page.dart
@@ -0,0 +1,77 @@
+import 'package:flutter/material.dart';
+import 'package:get/get.dart';
+import 'package:rogapp/pages/destination/destination_controller.dart';
+
+class CameraPage extends StatelessWidget {
+ CameraPage({Key? key}) : super(key: key);
+ DestinationController destinationController = Get.find();
+
+ ImageProvider getFinishImage(){
+ if(destinationController.photos.isNotEmpty){
+ return FileImage(destinationController.photos[0]);
+ }
+ else{
+ return AssetImage('assets/images/empty_image.png');
+ }
+ }
+
+ // void finishRog(){
+ // destinationController.addToRogaining(destinationController.current_lat, destinationController.current_lon, destination_id)
+ // }
+
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ appBar: AppBar(
+ title: Text("finishing_rogaining".tr),
+ ),
+ body: Column(
+ mainAxisAlignment: MainAxisAlignment.spaceAround,
+ children: [
+ Padding(
+ padding: EdgeInsets.all(8.0),
+ child: Center(
+ child: Obx(() =>
+ Container(
+ width: MediaQuery.of(context).size.width,
+ height: 370,
+ decoration: BoxDecoration(
+ image:
+ DecorationImage(
+ image: getFinishImage(),
+ fit: BoxFit.cover
+ )
+ ),
+ ),
+ ),
+ ),
+ ),
+ Row(
+ mainAxisAlignment: MainAxisAlignment.spaceAround,
+ children: [
+ ElevatedButton(
+ onPressed: (){
+ destinationController.openCamera(context);
+ },
+ child: Text("take_photo of the clock".tr)
+ ),
+ Obx(() =>
+ destinationController.photos.isNotEmpty ?
+ ElevatedButton(
+ style: ElevatedButton.styleFrom(
+ primary: Colors.red
+ ),
+ onPressed: (){
+
+ },
+ child: Text("finish_goal".tr)
+ ):
+ Container()
+ )
+ ],
+ )
+ ],
+ ),
+ );
+ }
+}
\ No newline at end of file
diff --git a/lib/pages/changepassword/change_password_page.dart b/lib/pages/changepassword/change_password_page.dart
new file mode 100644
index 0000000..3180ae7
--- /dev/null
+++ b/lib/pages/changepassword/change_password_page.dart
@@ -0,0 +1,163 @@
+import 'package:flutter/material.dart';
+import 'package:get/get.dart';
+import 'package:rogapp/pages/index/index_controller.dart';
+import 'package:rogapp/routes/app_pages.dart';
+
+class ChangePasswordPage extends StatelessWidget {
+ ChangePasswordPage({Key? key}) : super(key: key);
+
+ IndexController indexController = Get.find();
+
+ TextEditingController oldPasswordController = TextEditingController();
+ TextEditingController newPasswordController = TextEditingController();
+
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ resizeToAvoidBottomInset: false,
+ backgroundColor: Colors.white,
+ appBar: AppBar(
+ elevation: 0,
+ brightness: Brightness.light,
+ backgroundColor: Colors.white,
+ leading:
+ IconButton( onPressed: (){
+ Navigator.pop(context);
+ },icon:Icon(Icons.arrow_back_ios,size: 20,color: Colors.black,)),
+ ),
+ body:
+ Container(
+ width: double.infinity,
+ child: Column(
+ mainAxisAlignment: MainAxisAlignment.center,
+ crossAxisAlignment: CrossAxisAlignment.center,
+ children: [
+ Column(
+ children: [
+ Column(
+ children: [
+ Container(
+ child: Text("change_password".tr, style: TextStyle(fontSize: 24.0),),
+ ),
+ SizedBox(height: 30,),
+ ],
+ ),
+ Padding(
+ padding: EdgeInsets.symmetric(
+ horizontal: 40
+ ),
+ child: Column(
+ children: [
+ makeInput(label: "old_password".tr, controller: oldPasswordController),
+ makeInput(label: "new_password".tr, controller: newPasswordController, obsureText: true),
+ ],
+ ),
+ ),
+ Padding(
+ padding: EdgeInsets.symmetric(horizontal: 40),
+ child: Container(
+ padding: EdgeInsets.only(top: 3,left: 3),
+ decoration: BoxDecoration(
+ borderRadius: BorderRadius.circular(40),
+ ),
+ child: Obx((() =>
+ indexController.is_loading == true ? MaterialButton(
+ minWidth: double.infinity,
+ height:60,
+ onPressed: (){
+
+ },
+ color: Colors.grey[400],
+ shape: RoundedRectangleBorder(
+ borderRadius: BorderRadius.circular(40)
+ ),
+ child: CircularProgressIndicator(),
+ ) :
+ Column(
+ children: [
+ MaterialButton(
+ minWidth: double.infinity,
+ height:60,
+ onPressed: (){
+ if(oldPasswordController.text.isEmpty || newPasswordController.text.isEmpty){
+ Get.snackbar(
+ "no_values".tr,
+ "values_required".tr,
+ icon: Icon(Icons.assistant_photo_outlined, size: 40.0, color: Colors.blue),
+ snackPosition: SnackPosition.TOP,
+ duration: Duration(milliseconds: 800),
+ backgroundColor: Colors.yellow,
+ //icon:Image(image:AssetImage("assets/images/dora.png"))
+ );
+ return;
+ }
+ indexController.is_loading.value = true;
+ indexController.changePassword(oldPasswordController.text, newPasswordController.text, context);
+ //indexController.login(oldPasswordController.text, newPasswordController.text, context);
+ },
+ color: Colors.indigoAccent[400],
+ shape: RoundedRectangleBorder(
+ borderRadius: BorderRadius.circular(40)
+ ),
+ child: Text("ログイン",style: TextStyle(
+ fontWeight: FontWeight.w600,fontSize: 16,color: Colors.white70
+ ),
+ ),
+ ),
+ SizedBox(height: 10.0,),
+
+ ],
+ )
+ ),
+ ),
+ )
+ ),
+ SizedBox(height: 20,),
+ Row(
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+
+ ],
+ )
+ ],
+
+ ),
+ ],
+ ),
+ )
+ );
+ }
+
+ Widget makeInput({label, required TextEditingController controller, obsureText = false}){
+ return Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Text(label,style:TextStyle(
+ fontSize: 15,
+ fontWeight: FontWeight.w400,
+ color: Colors.black87
+ ),),
+ SizedBox(height: 5,),
+ TextField(
+ controller: controller,
+ obscureText: obsureText,
+ decoration: InputDecoration(
+ contentPadding: EdgeInsets.symmetric(vertical: 0,horizontal: 10),
+ enabledBorder: OutlineInputBorder(
+ borderSide: BorderSide(
+ color: (Colors.grey[400])!,
+ ),
+ ),
+ border: OutlineInputBorder(
+ borderSide: BorderSide(color: (Colors.grey[400])!
+ ),
+ ),
+ ),
+ ),
+ SizedBox(height: 30.0,)
+ ],
+ );
+}
+
+
+}
\ No newline at end of file
diff --git a/lib/pages/changepassword/change_password_page_controller.dart b/lib/pages/changepassword/change_password_page_controller.dart
new file mode 100644
index 0000000..e69de29
diff --git a/lib/pages/destination/destination_controller.dart b/lib/pages/destination/destination_controller.dart
index 18412a6..c6ed6f4 100644
--- a/lib/pages/destination/destination_controller.dart
+++ b/lib/pages/destination/destination_controller.dart
@@ -1,16 +1,20 @@
import 'dart:convert';
+import 'dart:io';
+import 'package:camera_camera/camera_camera.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:geojson/geojson.dart';
import 'package:geolocator/geolocator.dart';
import 'package:get/get.dart';
import 'package:latlong2/latlong.dart';
+import 'package:rogapp/model/Rogaining.dart';
import 'package:rogapp/model/destination.dart';
import 'package:rogapp/pages/index/index_controller.dart';
import 'package:rogapp/routes/app_pages.dart';
+import 'package:rogapp/services/action_service.dart';
import 'package:rogapp/services/destination_service.dart';
import 'package:rogapp/services/maxtrix_service.dart';
import 'package:rogapp/services/reacking_service.dart';
@@ -18,6 +22,7 @@ import 'package:rogapp/utils/database_helper.dart';
import 'dart:async';
import 'package:rogapp/widgets/bottom_sheet_widget.dart';
+import 'package:sqflite/sqlite_api.dart';
class DestinationController extends GetxController {
@@ -26,9 +31,14 @@ class DestinationController extends GetxController {
var destinationCount = 0.obs;
List destinations = [].obs;
List