Release 4.8.0 - 2024-05-26
This commit is contained in:
@ -398,11 +398,11 @@
|
|||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
CODE_SIGN_IDENTITY = "Apple Development";
|
CODE_SIGN_IDENTITY = "Apple Development";
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
CURRENT_PROJECT_VERSION = 469;
|
CURRENT_PROJECT_VERSION = 480;
|
||||||
DEVELOPMENT_TEAM = UMNEWT25JR;
|
DEVELOPMENT_TEAM = UMNEWT25JR;
|
||||||
ENABLE_BITCODE = NO;
|
ENABLE_BITCODE = NO;
|
||||||
FLUTTER_BUILD_NAME = 4.5.3;
|
FLUTTER_BUILD_NAME = 4.8.0;
|
||||||
FLUTTER_BUILD_NUMBER = 469;
|
FLUTTER_BUILD_NUMBER = 480;
|
||||||
INFOPLIST_FILE = Runner/Info.plist;
|
INFOPLIST_FILE = Runner/Info.plist;
|
||||||
INFOPLIST_KEY_CFBundleDisplayName = "岐阜ナビ";
|
INFOPLIST_KEY_CFBundleDisplayName = "岐阜ナビ";
|
||||||
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.healthcare-fitness";
|
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.healthcare-fitness";
|
||||||
@ -411,7 +411,7 @@
|
|||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 4.5.3;
|
MARKETING_VERSION = 4.8.0;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.dvox.gifunavi;
|
PRODUCT_BUNDLE_IDENTIFIER = com.dvox.gifunavi;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||||
@ -539,11 +539,11 @@
|
|||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
CODE_SIGN_IDENTITY = "Apple Development";
|
CODE_SIGN_IDENTITY = "Apple Development";
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
CURRENT_PROJECT_VERSION = 469;
|
CURRENT_PROJECT_VERSION = 480;
|
||||||
DEVELOPMENT_TEAM = UMNEWT25JR;
|
DEVELOPMENT_TEAM = UMNEWT25JR;
|
||||||
ENABLE_BITCODE = NO;
|
ENABLE_BITCODE = NO;
|
||||||
FLUTTER_BUILD_NAME = 4.5.3;
|
FLUTTER_BUILD_NAME = 4.8.0;
|
||||||
FLUTTER_BUILD_NUMBER = 469;
|
FLUTTER_BUILD_NUMBER = 480;
|
||||||
INFOPLIST_FILE = Runner/Info.plist;
|
INFOPLIST_FILE = Runner/Info.plist;
|
||||||
INFOPLIST_KEY_CFBundleDisplayName = "岐阜ナビ";
|
INFOPLIST_KEY_CFBundleDisplayName = "岐阜ナビ";
|
||||||
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.healthcare-fitness";
|
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.healthcare-fitness";
|
||||||
@ -552,7 +552,7 @@
|
|||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 4.5.3;
|
MARKETING_VERSION = 4.8.0;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.dvox.gifunavi;
|
PRODUCT_BUNDLE_IDENTIFIER = com.dvox.gifunavi;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||||
@ -571,11 +571,11 @@
|
|||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
CODE_SIGN_IDENTITY = "Apple Development";
|
CODE_SIGN_IDENTITY = "Apple Development";
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
CURRENT_PROJECT_VERSION = 469;
|
CURRENT_PROJECT_VERSION = 480;
|
||||||
DEVELOPMENT_TEAM = UMNEWT25JR;
|
DEVELOPMENT_TEAM = UMNEWT25JR;
|
||||||
ENABLE_BITCODE = NO;
|
ENABLE_BITCODE = NO;
|
||||||
FLUTTER_BUILD_NAME = 4.5.3;
|
FLUTTER_BUILD_NAME = 4.8.0;
|
||||||
FLUTTER_BUILD_NUMBER = 469;
|
FLUTTER_BUILD_NUMBER = 480;
|
||||||
INFOPLIST_FILE = Runner/Info.plist;
|
INFOPLIST_FILE = Runner/Info.plist;
|
||||||
INFOPLIST_KEY_CFBundleDisplayName = "岐阜ナビ";
|
INFOPLIST_KEY_CFBundleDisplayName = "岐阜ナビ";
|
||||||
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.healthcare-fitness";
|
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.healthcare-fitness";
|
||||||
@ -584,7 +584,7 @@
|
|||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 4.5.3;
|
MARKETING_VERSION = 4.8.0;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.dvox.gifunavi;
|
PRODUCT_BUNDLE_IDENTIFIER = com.dvox.gifunavi;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||||
|
|||||||
@ -59,6 +59,13 @@
|
|||||||
ReferencedContainer = "container:Runner.xcodeproj">
|
ReferencedContainer = "container:Runner.xcodeproj">
|
||||||
</BuildableReference>
|
</BuildableReference>
|
||||||
</BuildableProductRunnable>
|
</BuildableProductRunnable>
|
||||||
|
<EnvironmentVariables>
|
||||||
|
<EnvironmentVariable
|
||||||
|
key = "IDEPreferLogStreaming"
|
||||||
|
value = "YES"
|
||||||
|
isEnabled = "YES">
|
||||||
|
</EnvironmentVariable>
|
||||||
|
</EnvironmentVariables>
|
||||||
</LaunchAction>
|
</LaunchAction>
|
||||||
<ProfileAction
|
<ProfileAction
|
||||||
buildConfiguration = "Profile"
|
buildConfiguration = "Profile"
|
||||||
|
|||||||
@ -1,8 +1,10 @@
|
|||||||
import UIKit
|
import UIKit
|
||||||
|
import CoreLocation
|
||||||
import Flutter
|
import Flutter
|
||||||
|
|
||||||
@UIApplicationMain
|
@UIApplicationMain
|
||||||
@objc class AppDelegate: FlutterAppDelegate {
|
@objc class AppDelegate: FlutterAppDelegate, CLLocationManagerDelegate {
|
||||||
|
var locationManager: CLLocationManager?
|
||||||
override func application(
|
override func application(
|
||||||
_ application: UIApplication,
|
_ application: UIApplication,
|
||||||
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
|
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
|
||||||
@ -12,6 +14,7 @@ import Flutter
|
|||||||
let controller : FlutterViewController = window?.rootViewController as! FlutterViewController
|
let controller : FlutterViewController = window?.rootViewController as! FlutterViewController
|
||||||
let locationServiceChannel = FlutterMethodChannel(name: "location",
|
let locationServiceChannel = FlutterMethodChannel(name: "location",
|
||||||
binaryMessenger: controller.binaryMessenger)
|
binaryMessenger: controller.binaryMessenger)
|
||||||
|
/*
|
||||||
locationServiceChannel.setMethodCallHandler { (call: FlutterMethodCall, result: @escaping FlutterResult) -> Void in
|
locationServiceChannel.setMethodCallHandler { (call: FlutterMethodCall, result: @escaping FlutterResult) -> Void in
|
||||||
if call.method == "isLocationServiceRunning" {
|
if call.method == "isLocationServiceRunning" {
|
||||||
result(self.isLocationServiceRunning())
|
result(self.isLocationServiceRunning())
|
||||||
@ -19,6 +22,18 @@ import Flutter
|
|||||||
result(FlutterMethodNotImplemented)
|
result(FlutterMethodNotImplemented)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
locationServiceChannel.setMethodCallHandler { [weak self] (call: FlutterMethodCall, result: @escaping FlutterResult) -> Void in
|
||||||
|
if call.method == "startLocationService" {
|
||||||
|
//self?.startLocationService()
|
||||||
|
result(nil)
|
||||||
|
} else if call.method == "isLocationServiceRunning" {
|
||||||
|
result(self?.isLocationServiceRunning() ?? false)
|
||||||
|
} else {
|
||||||
|
result(FlutterMethodNotImplemented)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
locationManager = CLLocationManager()
|
locationManager = CLLocationManager()
|
||||||
locationManager?.delegate = self
|
locationManager?.delegate = self
|
||||||
|
|||||||
@ -24,8 +24,6 @@
|
|||||||
<string>????</string>
|
<string>????</string>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>$(FLUTTER_BUILD_NUMBER)</string>
|
<string>$(FLUTTER_BUILD_NUMBER)</string>
|
||||||
<key>FLTEnableImpeller</key>
|
|
||||||
<false/>
|
|
||||||
<key>LSRequiresIPhoneOS</key>
|
<key>LSRequiresIPhoneOS</key>
|
||||||
<true/>
|
<true/>
|
||||||
<key>NSCameraUsageDescription</key>
|
<key>NSCameraUsageDescription</key>
|
||||||
@ -38,6 +36,8 @@
|
|||||||
<string>このアプリはチェックポイントへのチェックインや走行履歴を記録するために、位置情報にアクセスします。</string>
|
<string>このアプリはチェックポイントへのチェックインや走行履歴を記録するために、位置情報にアクセスします。</string>
|
||||||
<key>NSPhotoLibraryUsageDescription</key>
|
<key>NSPhotoLibraryUsageDescription</key>
|
||||||
<string>撮影した写真はデバイスのアルバムに保存されます。これにより、不具合時の通過記録を安全に担保することができます。</string>
|
<string>撮影した写真はデバイスのアルバムに保存されます。これにより、不具合時の通過記録を安全に担保することができます。</string>
|
||||||
|
<key>NSMicrophoneUsageDescription</key>
|
||||||
|
<string>このアプリではカメラは使用しますが、マイクの使用は当面行いません。</string>
|
||||||
<key>UIApplicationSupportsIndirectInputEvents</key>
|
<key>UIApplicationSupportsIndirectInputEvents</key>
|
||||||
<true/>
|
<true/>
|
||||||
<key>LSApplicationCategoryType</key>
|
<key>LSApplicationCategoryType</key>
|
||||||
|
|||||||
@ -3,11 +3,13 @@ import 'package:camera/camera.dart';
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:path/path.dart' as path;
|
import 'package:path/path.dart' as path;
|
||||||
import 'package:path_provider/path_provider.dart';
|
import 'package:path_provider/path_provider.dart';
|
||||||
|
import 'package:rogapp/model/destination.dart';
|
||||||
|
|
||||||
class CustomCameraView extends StatefulWidget {
|
class CustomCameraView extends StatefulWidget {
|
||||||
final Function(String) onImageCaptured;
|
final Function(String) onImageCaptured;
|
||||||
|
final Destination? destination;
|
||||||
|
|
||||||
const CustomCameraView({Key? key, required this.onImageCaptured}) : super(key: key);
|
const CustomCameraView({Key? key, required this.onImageCaptured, required this.destination}) : super(key: key);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
_CustomCameraViewState createState() => _CustomCameraViewState();
|
_CustomCameraViewState createState() => _CustomCameraViewState();
|
||||||
@ -19,11 +21,13 @@ class _CustomCameraViewState extends State<CustomCameraView> {
|
|||||||
int _selectedCameraIndex = 0;
|
int _selectedCameraIndex = 0;
|
||||||
double _currentScale = 1.0;
|
double _currentScale = 1.0;
|
||||||
FlashMode _currentFlashMode = FlashMode.off;
|
FlashMode _currentFlashMode = FlashMode.off;
|
||||||
|
Destination? destination;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
_initializeCamera();
|
_initializeCamera();
|
||||||
|
destination = widget.destination;
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> _initializeCamera() async {
|
Future<void> _initializeCamera() async {
|
||||||
@ -98,7 +102,25 @@ class _CustomCameraViewState extends State<CustomCameraView> {
|
|||||||
|
|
||||||
return Stack(
|
return Stack(
|
||||||
children: [
|
children: [
|
||||||
CameraPreview(_controller!),
|
Padding(
|
||||||
|
padding: const EdgeInsets.only(top: 60.0), // 上部に60ピクセルのパディングを追加
|
||||||
|
child: CameraPreview(_controller!),
|
||||||
|
),
|
||||||
|
Positioned(
|
||||||
|
bottom: 120.0,
|
||||||
|
left: 16.0,
|
||||||
|
right: 16.0,
|
||||||
|
child: Center(
|
||||||
|
child: Text(
|
||||||
|
destination?.tags ?? '',
|
||||||
|
style: const TextStyle(
|
||||||
|
color: Colors.white,
|
||||||
|
fontSize: 18,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
Positioned(
|
Positioned(
|
||||||
bottom: 16.0,
|
bottom: 16.0,
|
||||||
left: 16.0,
|
left: 16.0,
|
||||||
|
|||||||
@ -764,6 +764,7 @@ class DestinationController extends GetxController {
|
|||||||
onImageCaptured: (imagePath) {
|
onImageCaptured: (imagePath) {
|
||||||
photos.add(File(imagePath));
|
photos.add(File(imagePath));
|
||||||
},
|
},
|
||||||
|
destination: destination,
|
||||||
),
|
),
|
||||||
/*
|
/*
|
||||||
builder: (_) => CameraCamera(
|
builder: (_) => CameraCamera(
|
||||||
@ -973,7 +974,7 @@ class DestinationController extends GetxController {
|
|||||||
is_checkin: isCheckin,
|
is_checkin: isCheckin,
|
||||||
created_at: DateTime.now().millisecondsSinceEpoch);
|
created_at: DateTime.now().millisecondsSinceEpoch);
|
||||||
var res = await db.insertGps(gps_data);
|
var res = await db.insertGps(gps_data);
|
||||||
debugPrint("Saved GPS data into DB...:${gps_data}");
|
//debugPrint("Saved GPS data into DB...:${gps_data}");
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
print("errr ready gps ${err}");
|
print("errr ready gps ${err}");
|
||||||
|
|||||||
@ -41,7 +41,7 @@ class _HistoryPageState extends State<HistoryPage> {
|
|||||||
} else if (snapshot.hasData) {
|
} else if (snapshot.hasData) {
|
||||||
final dests = snapshot.data;
|
final dests = snapshot.data;
|
||||||
if (dests!.isNotEmpty) {
|
if (dests!.isNotEmpty) {
|
||||||
debugPrint("----- history -----");
|
debugPrint("----- 通過履歴表示 -----");
|
||||||
return SizedBox(
|
return SizedBox(
|
||||||
width: MediaQuery.of(context).size.width,
|
width: MediaQuery.of(context).size.width,
|
||||||
height: MediaQuery.of(context).size.height,
|
height: MediaQuery.of(context).size.height,
|
||||||
|
|||||||
@ -21,13 +21,13 @@ class PermissionController {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
static Future<bool> checkStoragePermission() async {
|
static Future<bool> checkStoragePermission() async {
|
||||||
debugPrint("(gifunavi)== checkStoragePermission ==");
|
//debugPrint("(gifunavi)== checkStoragePermission ==");
|
||||||
final storagePermission = await Permission.storage.status;
|
final storagePermission = await Permission.storage.status;
|
||||||
return storagePermission == PermissionStatus.granted;
|
return storagePermission == PermissionStatus.granted;
|
||||||
}
|
}
|
||||||
|
|
||||||
static Future<void> requestStoragePermission() async {
|
static Future<void> requestStoragePermission() async {
|
||||||
debugPrint("(gifunavi)== requestStoragePermission ==");
|
//debugPrint("(gifunavi)== requestStoragePermission ==");
|
||||||
final storagePermission = await Permission.storage.request();
|
final storagePermission = await Permission.storage.request();
|
||||||
|
|
||||||
if (storagePermission == PermissionStatus.granted) {
|
if (storagePermission == PermissionStatus.granted) {
|
||||||
@ -43,26 +43,26 @@ class PermissionController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static Future<bool> checkLocationBasicPermission() async {
|
static Future<bool> checkLocationBasicPermission() async {
|
||||||
debugPrint("(gifunavi)== checkLocationBasicPermission ==");
|
//debugPrint("(gifunavi)== checkLocationBasicPermission ==");
|
||||||
final locationPermission = await Permission.location.status;
|
final locationPermission = await Permission.location.status;
|
||||||
return locationPermission == PermissionStatus.granted;
|
return locationPermission == PermissionStatus.granted;
|
||||||
}
|
}
|
||||||
|
|
||||||
static Future<bool> checkLocationWhenInUsePermission() async {
|
static Future<bool> checkLocationWhenInUsePermission() async {
|
||||||
debugPrint("(gifunavi)== checkLocationWhenInUsePermission ==");
|
//debugPrint("(gifunavi)== checkLocationWhenInUsePermission ==");
|
||||||
final whenInUsePermission = await Permission.locationWhenInUse.status;
|
final whenInUsePermission = await Permission.locationWhenInUse.status;
|
||||||
return whenInUsePermission == PermissionStatus.granted;
|
return whenInUsePermission == PermissionStatus.granted;
|
||||||
}
|
}
|
||||||
|
|
||||||
static Future<bool> checkLocationAlwaysPermission() async {
|
static Future<bool> checkLocationAlwaysPermission() async {
|
||||||
debugPrint("(gifunavi)== checkLocationAlwaysPermission ==");
|
//debugPrint("(gifunavi)== checkLocationAlwaysPermission ==");
|
||||||
final alwaysPermission = await Permission.locationAlways.status;
|
final alwaysPermission = await Permission.locationAlways.status;
|
||||||
return alwaysPermission == PermissionStatus.granted;
|
return alwaysPermission == PermissionStatus.granted;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool isBasicPermission=false;
|
static bool isBasicPermission=false;
|
||||||
static Future<void> requestLocationBasicPermissions() async {
|
static Future<void> requestLocationBasicPermissions() async {
|
||||||
debugPrint("(gifunavi)== requestLocationBasicPermissions ==");
|
//debugPrint("(gifunavi)== requestLocationBasicPermissions ==");
|
||||||
try{
|
try{
|
||||||
if(!isBasicPermission){
|
if(!isBasicPermission){
|
||||||
isBasicPermission=true;
|
isBasicPermission=true;
|
||||||
@ -84,7 +84,7 @@ class PermissionController {
|
|||||||
static bool isRequestedWhenInUsePermission = false;
|
static bool isRequestedWhenInUsePermission = false;
|
||||||
|
|
||||||
static Future<void> requestLocationWhenInUsePermissions() async {
|
static Future<void> requestLocationWhenInUsePermissions() async {
|
||||||
debugPrint("(gifunavi)== requestLocationWhenInUsePermissions ==");
|
//debugPrint("(gifunavi)== requestLocationWhenInUsePermissions ==");
|
||||||
|
|
||||||
try{
|
try{
|
||||||
if(!isRequestedWhenInUsePermission){
|
if(!isRequestedWhenInUsePermission){
|
||||||
@ -116,7 +116,7 @@ class PermissionController {
|
|||||||
static bool isRequestedAlwaysPermission = false;
|
static bool isRequestedAlwaysPermission = false;
|
||||||
|
|
||||||
static Future<void> requestLocationAlwaysPermissions() async {
|
static Future<void> requestLocationAlwaysPermissions() async {
|
||||||
debugPrint("(gifunavi)== requestLocationAlwaysPermissions ==");
|
//debugPrint("(gifunavi)== requestLocationAlwaysPermissions ==");
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if( !isRequestedAlwaysPermission ){
|
if( !isRequestedAlwaysPermission ){
|
||||||
|
|||||||
@ -75,7 +75,7 @@ class BottomSheetNew extends GetView<BottomSheetController> {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
GeoJSONFeature gf = indexController.currentFeature[0];
|
GeoJSONFeature gf = indexController.currentFeature[0];
|
||||||
print("=== photo sss ${gf.properties!["photos"]}");
|
//print("=== photo sss ${gf.properties!["photos"]}");
|
||||||
if (gf.properties!["photos"] == null || gf.properties!["photos"] == "") {
|
if (gf.properties!["photos"] == null || gf.properties!["photos"] == "") {
|
||||||
return const Image(image: AssetImage('assets/images/empty_image.png'));
|
return const Image(image: AssetImage('assets/images/empty_image.png'));
|
||||||
} else {
|
} else {
|
||||||
@ -170,6 +170,7 @@ class BottomSheetNew extends GetView<BottomSheetController> {
|
|||||||
(destination.cp == -1 || destination.cp == 0 ) &&
|
(destination.cp == -1 || destination.cp == 0 ) &&
|
||||||
destinationController.rogainingCounted.value == false) {
|
destinationController.rogainingCounted.value == false) {
|
||||||
// ゲームが始まってなければ
|
// ゲームが始まってなければ
|
||||||
|
// ロゲ開始している && (開始地点から100m以内 又は 電波が弱い) && CP番号が 1 or 0 && rogainingCounted==false(どこにもチェックインしていない) なら
|
||||||
return Obx(() {
|
return Obx(() {
|
||||||
final isInRog = destinationController.isInRog.value;
|
final isInRog = destinationController.isInRog.value;
|
||||||
|
|
||||||
@ -196,6 +197,7 @@ class BottomSheetNew extends GetView<BottomSheetController> {
|
|||||||
// ダイアログをキャンセルした場合はボタンを再度有効化
|
// ダイアログをキャンセルした場合はボタンを再度有効化
|
||||||
destinationController.isInRog.value = false;
|
destinationController.isInRog.value = false;
|
||||||
Get.back(); // Close the dialog
|
Get.back(); // Close the dialog
|
||||||
|
Get.back(); // Close the bottom sheet
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
TextButton(
|
TextButton(
|
||||||
@ -215,6 +217,7 @@ class BottomSheetNew extends GetView<BottomSheetController> {
|
|||||||
|
|
||||||
saveGameState();
|
saveGameState();
|
||||||
await ExternalService().startRogaining();
|
await ExternalService().startRogaining();
|
||||||
|
Get.back();
|
||||||
Get.back();// Close the dialog and potentially navigate away
|
Get.back();// Close the dialog and potentially navigate away
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
@ -240,7 +243,11 @@ class BottomSheetNew extends GetView<BottomSheetController> {
|
|||||||
(destination.cp == 0 || destination.cp == -2 || destination.cp == -1) &&
|
(destination.cp == 0 || destination.cp == -2 || destination.cp == -1) &&
|
||||||
// (destination.cp == 0 || destination.cp == -2 ) &&
|
// (destination.cp == 0 || destination.cp == -2 ) &&
|
||||||
DestinationController.ready_for_goal == true) {
|
DestinationController.ready_for_goal == true) {
|
||||||
|
|
||||||
|
// ready_for_goal && (開始地点から500m以内 又は 電波が弱い) && CP番号が -1 or -2 or 0 && rogainingCounted==true なら
|
||||||
|
// Goal ボタン
|
||||||
//goal
|
//goal
|
||||||
|
|
||||||
return ElevatedButton(
|
return ElevatedButton(
|
||||||
style: ElevatedButton.styleFrom(backgroundColor: Colors.red),
|
style: ElevatedButton.styleFrom(backgroundColor: Colors.red),
|
||||||
onPressed: destinationController.rogainingCounted.value == true &&
|
onPressed: destinationController.rogainingCounted.value == true &&
|
||||||
@ -268,8 +275,10 @@ class BottomSheetNew extends GetView<BottomSheetController> {
|
|||||||
"finish_rogaining".tr,
|
"finish_rogaining".tr,
|
||||||
style: TextStyle(color: Colors.white),
|
style: TextStyle(color: Colors.white),
|
||||||
));
|
));
|
||||||
|
|
||||||
} else if (distanceToDest <=
|
} else if (distanceToDest <=
|
||||||
destinationController.getForcedChckinDistance(destination)) {
|
destinationController.getForcedChckinDistance(destination)) {
|
||||||
|
// cpごとの強制チェックイン以内にいれば
|
||||||
//start
|
//start
|
||||||
return ElevatedButton(
|
return ElevatedButton(
|
||||||
style: ElevatedButton.styleFrom(
|
style: ElevatedButton.styleFrom(
|
||||||
@ -281,6 +290,8 @@ class BottomSheetNew extends GetView<BottomSheetController> {
|
|||||||
try{
|
try{
|
||||||
destinationController.isCheckingIn.value = true; // ここを追加
|
destinationController.isCheckingIn.value = true; // ここを追加
|
||||||
Get.back();
|
Get.back();
|
||||||
|
Get.back();
|
||||||
|
await Future.delayed(Duration(milliseconds: 500));
|
||||||
await destinationController.callforCheckin(destination);
|
await destinationController.callforCheckin(destination);
|
||||||
destinationController.isCheckingIn.value = false;
|
destinationController.isCheckingIn.value = false;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
@ -296,62 +307,6 @@ class BottomSheetNew extends GetView<BottomSheetController> {
|
|||||||
print('Error processing check-in: $e');
|
print('Error processing check-in: $e');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
/*
|
|
||||||
// Check conditions to show confirmation dialog
|
|
||||||
if (destinationController.isInRog.value == false &&
|
|
||||||
(destinationController.distanceToStart() <= 500 || destinationController.isGpsSignalWeak() ) && //追加 Akira 2024-4-5
|
|
||||||
destination.cp == -1 &&
|
|
||||||
destinationController.rogainingCounted.value == false) {
|
|
||||||
print("counted ${destinationController.rogainingCounted.value}");
|
|
||||||
|
|
||||||
// Show confirmation dialog
|
|
||||||
Get.dialog(
|
|
||||||
AlertDialog(
|
|
||||||
title: const Text("確認"), //confirm
|
|
||||||
content: const Text(
|
|
||||||
"ロゲを開始すると、今までのロゲデータが全てクリアされます。本当に開始しますか?"), //are you sure
|
|
||||||
actions: <Widget>[
|
|
||||||
TextButton(
|
|
||||||
child: const Text("いいえ"), //no
|
|
||||||
onPressed: () {
|
|
||||||
Get.back(); // Close the dialog
|
|
||||||
},
|
|
||||||
),
|
|
||||||
TextButton(
|
|
||||||
child: const Text("はい"), //yes
|
|
||||||
onPressed: () async {
|
|
||||||
// Clear data and start game logic here
|
|
||||||
destinationController.isInRog.value = true;
|
|
||||||
destinationController.resetRogaining();
|
|
||||||
destinationController.addToRogaining(
|
|
||||||
destinationController.currentLat,
|
|
||||||
destinationController.currentLon,
|
|
||||||
destination.location_id!,
|
|
||||||
);
|
|
||||||
saveGameState();
|
|
||||||
await ExternalService().startRogaining();
|
|
||||||
Get.back(); // Close the dialog and potentially navigate away
|
|
||||||
},
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
barrierDismissible:
|
|
||||||
false, // User must tap a button to close the dialog
|
|
||||||
);
|
|
||||||
} else if (destinationController.isInRog.value == true &&
|
|
||||||
destination.cp != -1) {
|
|
||||||
//print("counted ${destinationController.rogainingCounted.value}");
|
|
||||||
// Existing logic for other conditions
|
|
||||||
|
|
||||||
Get.back();
|
|
||||||
await destinationController.callforCheckin(destination);
|
|
||||||
} else {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
child: Text(
|
child: Text(
|
||||||
destination.cp == -1 &&
|
destination.cp == -1 &&
|
||||||
destinationController.isInRog.value == false &&
|
destinationController.isInRog.value == false &&
|
||||||
@ -418,23 +373,23 @@ class BottomSheetNew extends GetView<BottomSheetController> {
|
|||||||
destinationController.currentLat, destinationController.currentLon),
|
destinationController.currentLat, destinationController.currentLon),
|
||||||
LatLng(cdest.lat!, cdest.lon!));
|
LatLng(cdest.lat!, cdest.lon!));
|
||||||
|
|
||||||
LogManager().addLog("Distance from current point : $distanceToDest");
|
debugPrint("Distance from current point : $distanceToDest");
|
||||||
LogManager().addLog(
|
debugPrint(
|
||||||
"forced distance for point : ${destinationController.getForcedChckinDistance(destination)}");
|
"forced distance for point : ${destinationController.getForcedChckinDistance(destination)}");
|
||||||
LogManager().addLog(
|
debugPrint(
|
||||||
"current point : ${destinationController.currentLat}, ${destinationController.currentLon} - ${DateTime.now().hour}:${DateTime.now().minute}:${DateTime.now().second}:${DateTime.now().microsecond}");
|
"current point : ${destinationController.currentLat}, ${destinationController.currentLon} - ${DateTime.now().hour}:${DateTime.now().minute}:${DateTime.now().second}:${DateTime.now().microsecond}");
|
||||||
|
|
||||||
LogManager().addLog("Checkin radius : ${destination.checkin_radious}");
|
debugPrint("Checkin radius : ${destination.checkin_radious}");
|
||||||
LogManager().addLog("--${destination.cp}--");
|
debugPrint("--${destination.cp}--");
|
||||||
|
|
||||||
return SingleChildScrollView(
|
return SingleChildScrollView(
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
Padding(
|
Padding( // 1行目
|
||||||
padding: const EdgeInsets.all(8.0),
|
padding: const EdgeInsets.all(8.0),
|
||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
MaterialButton(
|
MaterialButton( // キャンセルボタン
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
Get.back();
|
Get.back();
|
||||||
},
|
},
|
||||||
@ -447,7 +402,7 @@ class BottomSheetNew extends GetView<BottomSheetController> {
|
|||||||
size: 14,
|
size: 14,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Expanded(
|
Expanded( // チェックポイント番号+ポイント名
|
||||||
child: Container(
|
child: Container(
|
||||||
alignment: Alignment.centerLeft,
|
alignment: Alignment.centerLeft,
|
||||||
child: Obx(() => Text(
|
child: Obx(() => Text(
|
||||||
@ -462,7 +417,7 @@ class BottomSheetNew extends GetView<BottomSheetController> {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Row(
|
Row( // 2行目 チェックポイント写真
|
||||||
children: [
|
children: [
|
||||||
Expanded(
|
Expanded(
|
||||||
child: SizedBox(
|
child: SizedBox(
|
||||||
@ -471,31 +426,37 @@ class BottomSheetNew extends GetView<BottomSheetController> {
|
|||||||
)),
|
)),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
Obx(() => Padding(
|
Obx(() => Padding( // 3行め ボタン類
|
||||||
padding: const EdgeInsets.all(8.0),
|
padding: const EdgeInsets.all(8.0),
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
Row(
|
Row( // 開始・ゴールボタン
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||||
children: [
|
children: [
|
||||||
// Finish or Goal
|
// Finish or Goal
|
||||||
(destination.cp == -1 || destination.cp == 0)
|
(destination.cp == -1 || destination.cp == 0 || destination.cp == -2)
|
||||||
? getActionButton(context, destination)
|
? getActionButton(context, destination)
|
||||||
: Container(),
|
: Container(), // 一般CPは空
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
Row(
|
Row( // 2列目 チェックインボタン
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||||
children: [
|
children: [
|
||||||
//checkin or remove checkin
|
//checkin or remove checkin
|
||||||
destinationController.isInRog.value == true && destination.cp != 0 && destination.cp != -1 && destination.cp != -2
|
destinationController.isInRog.value == true
|
||||||
|
&& (distanceToDest <=
|
||||||
|
destinationController.getForcedChckinDistance(destination) || destination.checkin_radious==-1 )
|
||||||
|
&& destination.cp != 0 && destination.cp != -1 && destination.cp != -2
|
||||||
? (isAlreadyCheckedIn == false
|
? (isAlreadyCheckedIn == false
|
||||||
? ElevatedButton(
|
? ElevatedButton( // まだチェックインしていなければ、チェックインボタンを表示
|
||||||
style: ElevatedButton.styleFrom(
|
style: ElevatedButton.styleFrom(
|
||||||
backgroundColor: Colors.red),
|
backgroundColor: Colors.red),
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
try {
|
try {
|
||||||
|
Get.back();
|
||||||
|
|
||||||
await destinationController.callforCheckin(destination);
|
await destinationController.callforCheckin(destination);
|
||||||
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
// エラーハンドリング
|
// エラーハンドリング
|
||||||
Get.snackbar(
|
Get.snackbar(
|
||||||
@ -512,16 +473,14 @@ class BottomSheetNew extends GetView<BottomSheetController> {
|
|||||||
child: Text(
|
child: Text(
|
||||||
"checkin".tr,
|
"checkin".tr,
|
||||||
style: TextStyle(color: Colors.white),
|
style: TextStyle(color: Colors.white),
|
||||||
))
|
)
|
||||||
: ElevatedButton(
|
)
|
||||||
style: ElevatedButton.styleFrom(
|
: ElevatedButton( // チェックインしていれば、チェックイン取消ボタン
|
||||||
backgroundColor: Colors.grey[300]),
|
style: ElevatedButton.styleFrom(backgroundColor: Colors.grey[300]),
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
try {
|
try {
|
||||||
await destinationController
|
await destinationController.removeCheckin(destination.cp!.toInt());
|
||||||
.removeCheckin(destination.cp!.toInt());
|
destinationController.deleteDestination(destination);
|
||||||
destinationController
|
|
||||||
.deleteDestination(destination);
|
|
||||||
Get.back();
|
Get.back();
|
||||||
Get.snackbar(
|
Get.snackbar(
|
||||||
'チェックイン取り消し',
|
'チェックイン取り消し',
|
||||||
@ -546,8 +505,9 @@ class BottomSheetNew extends GetView<BottomSheetController> {
|
|||||||
child: Text(
|
child: Text(
|
||||||
"cancel_checkin".tr,
|
"cancel_checkin".tr,
|
||||||
style: TextStyle(color: Colors.black),
|
style: TextStyle(color: Colors.black),
|
||||||
)))
|
)
|
||||||
: Container(),
|
)
|
||||||
|
) : Container(), // 近くにいなければ空
|
||||||
// go here or cancel route
|
// go here or cancel route
|
||||||
Obx(() => ElevatedButton(
|
Obx(() => ElevatedButton(
|
||||||
style: ElevatedButton.styleFrom(
|
style: ElevatedButton.styleFrom(
|
||||||
@ -557,6 +517,7 @@ class BottomSheetNew extends GetView<BottomSheetController> {
|
|||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
if (destinationController.isRouteShowing.value) {
|
if (destinationController.isRouteShowing.value) {
|
||||||
destinationController.clearRoute();
|
destinationController.clearRoute();
|
||||||
|
Get.back();
|
||||||
} else {
|
} else {
|
||||||
Get.back();
|
Get.back();
|
||||||
Position position =
|
Position position =
|
||||||
@ -575,14 +536,16 @@ class BottomSheetNew extends GetView<BottomSheetController> {
|
|||||||
.destinationMatrixFromCurrentPoint([ds, tp]);
|
.destinationMatrixFromCurrentPoint([ds, tp]);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
child: Text(
|
child: Text( //ルート表示 or ルート消去
|
||||||
destinationController.isRouteShowing.value
|
destinationController.isRouteShowing.value
|
||||||
? "cancel_route".tr
|
? "cancel_route".tr
|
||||||
: "go_here".tr,
|
: "go_here".tr,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color:
|
color:
|
||||||
Theme.of(context).colorScheme.onPrimary),
|
Theme.of(context).colorScheme.onPrimary),
|
||||||
))),
|
)
|
||||||
|
)
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
Row(
|
Row(
|
||||||
|
|||||||
@ -15,7 +15,7 @@ publish_to: "none" # Remove this line if you wish to publish to pub.dev
|
|||||||
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
|
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
|
||||||
# Read more about iOS versioning at
|
# Read more about iOS versioning at
|
||||||
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
|
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
|
||||||
version: 4.5.3+469
|
version: 4.8.0+480
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: ">=3.2.0 <4.0.0"
|
sdk: ">=3.2.0 <4.0.0"
|
||||||
|
|||||||
Reference in New Issue
Block a user