update new features and flutter 3.13
This commit is contained in:
@ -1,31 +1,31 @@
|
|||||||
buildscript {
|
buildscript {
|
||||||
ext.kotlin_version = '1.6.10'
|
ext.kotlin_version = '1.7.10'
|
||||||
repositories {
|
repositories {
|
||||||
google()
|
google()
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:4.1.0'
|
classpath 'com.android.tools.build:gradle:7.3.0'
|
||||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
allprojects {
|
allprojects {
|
||||||
repositories {
|
repositories {
|
||||||
google()
|
google()
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
rootProject.buildDir = '../build'
|
rootProject.buildDir = '../build'
|
||||||
subprojects {
|
subprojects {
|
||||||
project.buildDir = "${rootProject.buildDir}/${project.name}"
|
project.buildDir = "${rootProject.buildDir}/${project.name}"
|
||||||
}
|
}
|
||||||
subprojects {
|
subprojects {
|
||||||
project.evaluationDependsOn(':app')
|
project.evaluationDependsOn(':app')
|
||||||
}
|
}
|
||||||
|
|
||||||
task clean(type: Delete) {
|
tasks.register("clean", Delete) {
|
||||||
delete rootProject.buildDir
|
delete rootProject.buildDir
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
|
|||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip
|
||||||
|
|||||||
115
ios/Podfile.lock
115
ios/Podfile.lock
@ -4,47 +4,11 @@ PODS:
|
|||||||
- connectivity_plus (0.0.1):
|
- connectivity_plus (0.0.1):
|
||||||
- Flutter
|
- Flutter
|
||||||
- ReachabilitySwift
|
- ReachabilitySwift
|
||||||
- DKImagePickerController/Core (4.3.4):
|
|
||||||
- DKImagePickerController/ImageDataManager
|
|
||||||
- DKImagePickerController/Resource
|
|
||||||
- DKImagePickerController/ImageDataManager (4.3.4)
|
|
||||||
- DKImagePickerController/PhotoGallery (4.3.4):
|
|
||||||
- DKImagePickerController/Core
|
|
||||||
- DKPhotoGallery
|
|
||||||
- DKImagePickerController/Resource (4.3.4)
|
|
||||||
- DKPhotoGallery (0.0.17):
|
|
||||||
- DKPhotoGallery/Core (= 0.0.17)
|
|
||||||
- DKPhotoGallery/Model (= 0.0.17)
|
|
||||||
- DKPhotoGallery/Preview (= 0.0.17)
|
|
||||||
- DKPhotoGallery/Resource (= 0.0.17)
|
|
||||||
- SDWebImage
|
|
||||||
- SwiftyGif
|
|
||||||
- DKPhotoGallery/Core (0.0.17):
|
|
||||||
- DKPhotoGallery/Model
|
|
||||||
- DKPhotoGallery/Preview
|
|
||||||
- SDWebImage
|
|
||||||
- SwiftyGif
|
|
||||||
- DKPhotoGallery/Model (0.0.17):
|
|
||||||
- SDWebImage
|
|
||||||
- SwiftyGif
|
|
||||||
- DKPhotoGallery/Preview (0.0.17):
|
|
||||||
- DKPhotoGallery/Model
|
|
||||||
- DKPhotoGallery/Resource
|
|
||||||
- SDWebImage
|
|
||||||
- SwiftyGif
|
|
||||||
- DKPhotoGallery/Resource (0.0.17):
|
|
||||||
- SDWebImage
|
|
||||||
- SwiftyGif
|
|
||||||
- file_picker (0.0.1):
|
|
||||||
- DKImagePickerController/PhotoGallery
|
|
||||||
- Flutter
|
|
||||||
- Flutter (1.0.0)
|
- Flutter (1.0.0)
|
||||||
- flutter_compass (0.0.1):
|
- flutter_compass (0.0.1):
|
||||||
- Flutter
|
- Flutter
|
||||||
- flutter_keyboard_visibility (0.0.1):
|
- flutter_keyboard_visibility (0.0.1):
|
||||||
- Flutter
|
- Flutter
|
||||||
- flutter_local_notifications (0.0.1):
|
|
||||||
- Flutter
|
|
||||||
- FMDB (2.7.5):
|
- FMDB (2.7.5):
|
||||||
- FMDB/standard (= 2.7.5)
|
- FMDB/standard (= 2.7.5)
|
||||||
- FMDB/standard (2.7.5)
|
- FMDB/standard (2.7.5)
|
||||||
@ -52,7 +16,7 @@ PODS:
|
|||||||
- Flutter
|
- Flutter
|
||||||
- google_maps_flutter_ios (0.0.1):
|
- google_maps_flutter_ios (0.0.1):
|
||||||
- Flutter
|
- Flutter
|
||||||
- GoogleMaps
|
- GoogleMaps (< 8.0)
|
||||||
- GoogleMaps (5.2.0):
|
- GoogleMaps (5.2.0):
|
||||||
- GoogleMaps/Maps (= 5.2.0)
|
- GoogleMaps/Maps (= 5.2.0)
|
||||||
- GoogleMaps/Base (5.2.0)
|
- GoogleMaps/Base (5.2.0)
|
||||||
@ -60,124 +24,93 @@ PODS:
|
|||||||
- GoogleMaps/Base
|
- GoogleMaps/Base
|
||||||
- image_picker_ios (0.0.1):
|
- image_picker_ios (0.0.1):
|
||||||
- Flutter
|
- Flutter
|
||||||
- is_lock_screen (2.0.0):
|
- isar_flutter_libs (1.0.0):
|
||||||
- Flutter
|
- Flutter
|
||||||
- move_to_background (0.0.1):
|
- path_provider_foundation (0.0.1):
|
||||||
- Flutter
|
- Flutter
|
||||||
- path_provider_ios (0.0.1):
|
- FlutterMacOS
|
||||||
- Flutter
|
- permission_handler_apple (9.1.1):
|
||||||
- permission_handler_apple (9.0.4):
|
|
||||||
- Flutter
|
- Flutter
|
||||||
- ReachabilitySwift (5.0.0)
|
- ReachabilitySwift (5.0.0)
|
||||||
- SDWebImage (5.15.5):
|
|
||||||
- SDWebImage/Core (= 5.15.5)
|
|
||||||
- SDWebImage/Core (5.15.5)
|
|
||||||
- share_plus (0.0.1):
|
|
||||||
- Flutter
|
|
||||||
- shared_preferences_foundation (0.0.1):
|
- shared_preferences_foundation (0.0.1):
|
||||||
- Flutter
|
- Flutter
|
||||||
- FlutterMacOS
|
- FlutterMacOS
|
||||||
- sqflite (0.0.2):
|
- sqflite (0.0.3):
|
||||||
- Flutter
|
- Flutter
|
||||||
- FMDB (>= 2.7.5)
|
- FMDB (>= 2.7.5)
|
||||||
- SwiftyGif (5.4.4)
|
|
||||||
- url_launcher_ios (0.0.1):
|
- url_launcher_ios (0.0.1):
|
||||||
- Flutter
|
- Flutter
|
||||||
|
|
||||||
DEPENDENCIES:
|
DEPENDENCIES:
|
||||||
- camera_avfoundation (from `.symlinks/plugins/camera_avfoundation/ios`)
|
- camera_avfoundation (from `.symlinks/plugins/camera_avfoundation/ios`)
|
||||||
- connectivity_plus (from `.symlinks/plugins/connectivity_plus/ios`)
|
- connectivity_plus (from `.symlinks/plugins/connectivity_plus/ios`)
|
||||||
- file_picker (from `.symlinks/plugins/file_picker/ios`)
|
|
||||||
- Flutter (from `Flutter`)
|
- Flutter (from `Flutter`)
|
||||||
- flutter_compass (from `.symlinks/plugins/flutter_compass/ios`)
|
- flutter_compass (from `.symlinks/plugins/flutter_compass/ios`)
|
||||||
- flutter_keyboard_visibility (from `.symlinks/plugins/flutter_keyboard_visibility/ios`)
|
- flutter_keyboard_visibility (from `.symlinks/plugins/flutter_keyboard_visibility/ios`)
|
||||||
- flutter_local_notifications (from `.symlinks/plugins/flutter_local_notifications/ios`)
|
|
||||||
- geolocator_apple (from `.symlinks/plugins/geolocator_apple/ios`)
|
- geolocator_apple (from `.symlinks/plugins/geolocator_apple/ios`)
|
||||||
- google_maps_flutter_ios (from `.symlinks/plugins/google_maps_flutter_ios/ios`)
|
- google_maps_flutter_ios (from `.symlinks/plugins/google_maps_flutter_ios/ios`)
|
||||||
- image_picker_ios (from `.symlinks/plugins/image_picker_ios/ios`)
|
- image_picker_ios (from `.symlinks/plugins/image_picker_ios/ios`)
|
||||||
- is_lock_screen (from `.symlinks/plugins/is_lock_screen/ios`)
|
- isar_flutter_libs (from `.symlinks/plugins/isar_flutter_libs/ios`)
|
||||||
- move_to_background (from `.symlinks/plugins/move_to_background/ios`)
|
- path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`)
|
||||||
- path_provider_ios (from `.symlinks/plugins/path_provider_ios/ios`)
|
|
||||||
- permission_handler_apple (from `.symlinks/plugins/permission_handler_apple/ios`)
|
- permission_handler_apple (from `.symlinks/plugins/permission_handler_apple/ios`)
|
||||||
- share_plus (from `.symlinks/plugins/share_plus/ios`)
|
- shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`)
|
||||||
- shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/ios`)
|
|
||||||
- sqflite (from `.symlinks/plugins/sqflite/ios`)
|
- sqflite (from `.symlinks/plugins/sqflite/ios`)
|
||||||
- url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`)
|
- url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`)
|
||||||
|
|
||||||
SPEC REPOS:
|
SPEC REPOS:
|
||||||
trunk:
|
trunk:
|
||||||
- DKImagePickerController
|
|
||||||
- DKPhotoGallery
|
|
||||||
- FMDB
|
- FMDB
|
||||||
- GoogleMaps
|
- GoogleMaps
|
||||||
- ReachabilitySwift
|
- ReachabilitySwift
|
||||||
- SDWebImage
|
|
||||||
- SwiftyGif
|
|
||||||
|
|
||||||
EXTERNAL SOURCES:
|
EXTERNAL SOURCES:
|
||||||
camera_avfoundation:
|
camera_avfoundation:
|
||||||
:path: ".symlinks/plugins/camera_avfoundation/ios"
|
:path: ".symlinks/plugins/camera_avfoundation/ios"
|
||||||
connectivity_plus:
|
connectivity_plus:
|
||||||
:path: ".symlinks/plugins/connectivity_plus/ios"
|
:path: ".symlinks/plugins/connectivity_plus/ios"
|
||||||
file_picker:
|
|
||||||
:path: ".symlinks/plugins/file_picker/ios"
|
|
||||||
Flutter:
|
Flutter:
|
||||||
:path: Flutter
|
:path: Flutter
|
||||||
flutter_compass:
|
flutter_compass:
|
||||||
:path: ".symlinks/plugins/flutter_compass/ios"
|
:path: ".symlinks/plugins/flutter_compass/ios"
|
||||||
flutter_keyboard_visibility:
|
flutter_keyboard_visibility:
|
||||||
:path: ".symlinks/plugins/flutter_keyboard_visibility/ios"
|
:path: ".symlinks/plugins/flutter_keyboard_visibility/ios"
|
||||||
flutter_local_notifications:
|
|
||||||
:path: ".symlinks/plugins/flutter_local_notifications/ios"
|
|
||||||
geolocator_apple:
|
geolocator_apple:
|
||||||
:path: ".symlinks/plugins/geolocator_apple/ios"
|
:path: ".symlinks/plugins/geolocator_apple/ios"
|
||||||
google_maps_flutter_ios:
|
google_maps_flutter_ios:
|
||||||
:path: ".symlinks/plugins/google_maps_flutter_ios/ios"
|
:path: ".symlinks/plugins/google_maps_flutter_ios/ios"
|
||||||
image_picker_ios:
|
image_picker_ios:
|
||||||
:path: ".symlinks/plugins/image_picker_ios/ios"
|
:path: ".symlinks/plugins/image_picker_ios/ios"
|
||||||
is_lock_screen:
|
isar_flutter_libs:
|
||||||
:path: ".symlinks/plugins/is_lock_screen/ios"
|
:path: ".symlinks/plugins/isar_flutter_libs/ios"
|
||||||
move_to_background:
|
path_provider_foundation:
|
||||||
:path: ".symlinks/plugins/move_to_background/ios"
|
:path: ".symlinks/plugins/path_provider_foundation/darwin"
|
||||||
path_provider_ios:
|
|
||||||
:path: ".symlinks/plugins/path_provider_ios/ios"
|
|
||||||
permission_handler_apple:
|
permission_handler_apple:
|
||||||
:path: ".symlinks/plugins/permission_handler_apple/ios"
|
:path: ".symlinks/plugins/permission_handler_apple/ios"
|
||||||
share_plus:
|
|
||||||
:path: ".symlinks/plugins/share_plus/ios"
|
|
||||||
shared_preferences_foundation:
|
shared_preferences_foundation:
|
||||||
:path: ".symlinks/plugins/shared_preferences_foundation/ios"
|
:path: ".symlinks/plugins/shared_preferences_foundation/darwin"
|
||||||
sqflite:
|
sqflite:
|
||||||
:path: ".symlinks/plugins/sqflite/ios"
|
:path: ".symlinks/plugins/sqflite/ios"
|
||||||
url_launcher_ios:
|
url_launcher_ios:
|
||||||
:path: ".symlinks/plugins/url_launcher_ios/ios"
|
:path: ".symlinks/plugins/url_launcher_ios/ios"
|
||||||
|
|
||||||
SPEC CHECKSUMS:
|
SPEC CHECKSUMS:
|
||||||
camera_avfoundation: 07c77549ea54ad95d8581be86617c094a46280d9
|
camera_avfoundation: 3125e8cd1a4387f6f31c6c63abb8a55892a9eeeb
|
||||||
connectivity_plus: 413a8857dd5d9f1c399a39130850d02fe0feaf7e
|
connectivity_plus: 07c49e96d7fc92bc9920617b83238c4d178b446a
|
||||||
DKImagePickerController: b512c28220a2b8ac7419f21c491fc8534b7601ac
|
|
||||||
DKPhotoGallery: fdfad5125a9fdda9cc57df834d49df790dbb4179
|
|
||||||
file_picker: ce3938a0df3cc1ef404671531facef740d03f920
|
|
||||||
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
|
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
|
||||||
flutter_compass: cbbd285cea1584c7ac9c4e0c3e1f17cbea55e855
|
flutter_compass: cbbd285cea1584c7ac9c4e0c3e1f17cbea55e855
|
||||||
flutter_keyboard_visibility: 0339d06371254c3eb25eeb90ba8d17dca8f9c069
|
flutter_keyboard_visibility: 0339d06371254c3eb25eeb90ba8d17dca8f9c069
|
||||||
flutter_local_notifications: 0c0b1ae97e741e1521e4c1629a459d04b9aec743
|
|
||||||
FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a
|
FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a
|
||||||
geolocator_apple: cc556e6844d508c95df1e87e3ea6fa4e58c50401
|
geolocator_apple: cc556e6844d508c95df1e87e3ea6fa4e58c50401
|
||||||
google_maps_flutter_ios: 66201f392bf62d500f07670a30488a247b9bb5b9
|
google_maps_flutter_ios: abdac20d6ce8931f6ebc5f46616df241bfaa2cfd
|
||||||
GoogleMaps: 025272d5876d3b32604e5c080dc25eaf68764693
|
GoogleMaps: 025272d5876d3b32604e5c080dc25eaf68764693
|
||||||
image_picker_ios: b786a5dcf033a8336a657191401bfdf12017dabb
|
image_picker_ios: 4a8aadfbb6dc30ad5141a2ce3832af9214a705b5
|
||||||
is_lock_screen: 8ae6397a49b2fde58fd80a6ed30fbaf2be9418d6
|
isar_flutter_libs: b69f437aeab9c521821c3f376198c4371fa21073
|
||||||
move_to_background: 39a5b79b26d577b0372cbe8a8c55e7aa9fcd3a2d
|
path_provider_foundation: 29f094ae23ebbca9d3d0cec13889cd9060c0e943
|
||||||
path_provider_ios: 14f3d2fd28c4fdb42f44e0f751d12861c43cee02
|
permission_handler_apple: e76247795d700c14ea09e3a2d8855d41ee80a2e6
|
||||||
permission_handler_apple: 44366e37eaf29454a1e7b1b7d736c2cceaeb17ce
|
|
||||||
ReachabilitySwift: 985039c6f7b23a1da463388634119492ff86c825
|
ReachabilitySwift: 985039c6f7b23a1da463388634119492ff86c825
|
||||||
SDWebImage: fd7e1a22f00303e058058278639bf6196ee431fe
|
shared_preferences_foundation: 5b919d13b803cadd15ed2dc053125c68730e5126
|
||||||
share_plus: 056a1e8ac890df3e33cb503afffaf1e9b4fbae68
|
sqflite: 31f7eba61e3074736dff8807a9b41581e4f7f15a
|
||||||
shared_preferences_foundation: 986fc17f3d3251412d18b0265f9c64113a8c2472
|
url_launcher_ios: 08a3dfac5fb39e8759aeb0abbd5d9480f30fc8b4
|
||||||
sqflite: 6d358c025f5b867b29ed92fc697fd34924e11904
|
|
||||||
SwiftyGif: 93a1cc87bf3a51916001cf8f3d63835fb64c819f
|
|
||||||
url_launcher_ios: 839c58cdb4279282219f5e248c3321761ff3c4de
|
|
||||||
|
|
||||||
PODFILE CHECKSUM: a1c2f8dde3796ecc1697a15e7c75eb5205d8a740
|
PODFILE CHECKSUM: a1c2f8dde3796ecc1697a15e7c75eb5205d8a740
|
||||||
|
|
||||||
|
|||||||
@ -156,7 +156,7 @@
|
|||||||
97C146E61CF9000F007C117D /* Project object */ = {
|
97C146E61CF9000F007C117D /* Project object */ = {
|
||||||
isa = PBXProject;
|
isa = PBXProject;
|
||||||
attributes = {
|
attributes = {
|
||||||
LastUpgradeCheck = 1300;
|
LastUpgradeCheck = 1430;
|
||||||
ORGANIZATIONNAME = "";
|
ORGANIZATIONNAME = "";
|
||||||
TargetAttributes = {
|
TargetAttributes = {
|
||||||
97C146ED1CF9000F007C117D = {
|
97C146ED1CF9000F007C117D = {
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<Scheme
|
<Scheme
|
||||||
LastUpgradeVersion = "1300"
|
LastUpgradeVersion = "1430"
|
||||||
version = "1.3">
|
version = "1.3">
|
||||||
<BuildAction
|
<BuildAction
|
||||||
parallelizeBuildables = "YES"
|
parallelizeBuildables = "YES"
|
||||||
|
|||||||
@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_map_tile_caching/flutter_map_tile_caching.dart';
|
import 'package:flutter_map_tile_caching/flutter_map_tile_caching.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
@ -6,33 +5,32 @@ import 'package:rogapp/pages/destination/destination_controller.dart';
|
|||||||
import 'package:rogapp/pages/index/index_binding.dart';
|
import 'package:rogapp/pages/index/index_binding.dart';
|
||||||
import 'package:rogapp/routes/app_pages.dart';
|
import 'package:rogapp/routes/app_pages.dart';
|
||||||
import 'package:rogapp/utils/string_values.dart';
|
import 'package:rogapp/utils/string_values.dart';
|
||||||
import 'package:is_lock_screen/is_lock_screen.dart';
|
// import 'package:is_lock_screen/is_lock_screen.dart';
|
||||||
|
|
||||||
void main() async {
|
void main() async {
|
||||||
|
|
||||||
WidgetsFlutterBinding.ensureInitialized();
|
WidgetsFlutterBinding.ensureInitialized();
|
||||||
|
|
||||||
FlutterMapTileCaching.initialise(await RootDirectory.normalCache);
|
await FlutterMapTileCaching.initialise();
|
||||||
final StoreDirectory instanceA = FMTC.instance('OpenStreetMap (A)');
|
final StoreDirectory instanceA = FMTC.instance('OpenStreetMap (A)');
|
||||||
await instanceA.manage.createAsync();
|
await instanceA.manage.createAsync();
|
||||||
await instanceA.metadata.addAsync(
|
await instanceA.metadata.addAsync(
|
||||||
key: 'sourceURL',
|
key: 'sourceURL',
|
||||||
value: 'https://cyberjapandata.gsi.go.jp/xyz/std/{z}/{x}/{y}.png',
|
value: 'https://cyberjapandata.gsi.go.jp/xyz/std/{z}/{x}/{y}.png',
|
||||||
);
|
);
|
||||||
await instanceA.metadata.addAsync(
|
await instanceA.metadata.addAsync(
|
||||||
key: 'validDuration',
|
key: 'validDuration',
|
||||||
value: '14',
|
value: '14',
|
||||||
);
|
);
|
||||||
await instanceA.metadata.addAsync(
|
await instanceA.metadata.addAsync(
|
||||||
key: 'behaviour',
|
key: 'behaviour',
|
||||||
value: 'cacheFirst',
|
value: 'cacheFirst',
|
||||||
);
|
);
|
||||||
|
|
||||||
runApp(const MyApp());
|
runApp(const MyApp());
|
||||||
}
|
}
|
||||||
|
|
||||||
class MyApp extends StatefulWidget {
|
class MyApp extends StatefulWidget {
|
||||||
const MyApp({Key? key}) : super(key: key);
|
const MyApp({Key? key}) : super(key: key);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<MyApp> createState() => _MyAppState();
|
State<MyApp> createState() => _MyAppState();
|
||||||
@ -44,22 +42,38 @@ class _MyAppState extends State<MyApp> with WidgetsBindingObserver {
|
|||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
WidgetsBinding.instance?.addObserver(this);
|
WidgetsBinding.instance.addObserver(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void didChangeAppLifecycleState(AppLifecycleState state) async {
|
void dispose() {
|
||||||
super.didChangeAppLifecycleState(state);
|
WidgetsBinding.instance.removeObserver(this);
|
||||||
if (state == AppLifecycleState.inactive) {
|
super.dispose();
|
||||||
print('app inactive, is lock screen: ${await isLockScreen()}');
|
|
||||||
} else if (state == AppLifecycleState.resumed) {
|
|
||||||
DestinationController destinationController = Get.find<DestinationController>();
|
|
||||||
destinationController.initGPS();
|
|
||||||
print('app resumed');
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void didChangeAppLifecycleState(AppLifecycleState state) {
|
||||||
|
switch (state) {
|
||||||
|
case AppLifecycleState.resumed:
|
||||||
|
print("RESUMED");
|
||||||
|
DestinationController destinationController = Get.find<DestinationController>();
|
||||||
|
destinationController.initGPS();
|
||||||
|
break;
|
||||||
|
case AppLifecycleState.inactive:
|
||||||
|
print("INACTIVE");
|
||||||
|
break;
|
||||||
|
case AppLifecycleState.paused:
|
||||||
|
print("PAUSED");
|
||||||
|
break;
|
||||||
|
case AppLifecycleState.detached:
|
||||||
|
print("DETACHED");
|
||||||
|
break;
|
||||||
|
case AppLifecycleState.hidden:
|
||||||
|
print("DETACHED");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
@ -70,8 +84,9 @@ class _MyAppState extends State<MyApp> with WidgetsBindingObserver {
|
|||||||
fallbackLocale: const Locale('en', 'US'),
|
fallbackLocale: const Locale('en', 'US'),
|
||||||
title: 'ROGAINING',
|
title: 'ROGAINING',
|
||||||
theme: ThemeData(
|
theme: ThemeData(
|
||||||
primarySwatch: Colors.blue,
|
colorScheme:
|
||||||
visualDensity: VisualDensity.adaptivePlatformDensity,
|
ColorScheme.fromSeed(seedColor: Color.fromARGB(255, 36, 135, 221)),
|
||||||
|
useMaterial3: true,
|
||||||
),
|
),
|
||||||
debugShowCheckedModeBanner: false,
|
debugShowCheckedModeBanner: false,
|
||||||
defaultTransition: Transition.cupertino,
|
defaultTransition: Transition.cupertino,
|
||||||
|
|||||||
@ -112,7 +112,7 @@ class ChangePasswordPage extends StatelessWidget {
|
|||||||
)
|
)
|
||||||
),
|
),
|
||||||
const SizedBox(height: 20,),
|
const SizedBox(height: 20,),
|
||||||
Row(
|
const Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
65
lib/pages/history/history_page.dart
Normal file
65
lib/pages/history/history_page.dart
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
import 'dart:io';
|
||||||
|
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:rogapp/model/destination.dart';
|
||||||
|
import 'package:rogapp/utils/database_helper.dart';
|
||||||
|
|
||||||
|
class HistoryPage extends StatefulWidget {
|
||||||
|
const HistoryPage({super.key});
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<HistoryPage> createState() => _HistoryPageState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _HistoryPageState extends State<HistoryPage> {
|
||||||
|
DatabaseHelper db = DatabaseHelper.instance;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Scaffold(
|
||||||
|
appBar: AppBar(
|
||||||
|
title: Text("History"),
|
||||||
|
),
|
||||||
|
body: SingleChildScrollView(
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
FutureBuilder(
|
||||||
|
future: db.getDestinations(),
|
||||||
|
builder: (BuildContext context,
|
||||||
|
AsyncSnapshot<List<Destination>> snapshot) {
|
||||||
|
if (snapshot.connectionState == ConnectionState.done) {
|
||||||
|
if (snapshot.hasError) {
|
||||||
|
return Center(
|
||||||
|
child: Text(
|
||||||
|
'${snapshot.error} occurred',
|
||||||
|
style: TextStyle(fontSize: 18),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
} else if (snapshot.hasData) {
|
||||||
|
final dests = snapshot.data;
|
||||||
|
if (dests!.length > 0) {
|
||||||
|
return Center(
|
||||||
|
child: ListView.builder(itemBuilder:(ctx, index){
|
||||||
|
return ListTile(
|
||||||
|
title: Text(dests[index].name?? ""),
|
||||||
|
subtitle: Text(dests[index].address ?? ""),
|
||||||
|
leading: dests[0].photos != null ? Image.file(File(dests[0].photos!)) : Container(),
|
||||||
|
);
|
||||||
|
}),
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
return Center(child: Text("No checkin yet"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if(snapshot.connectionState == ConnectionState.waiting){
|
||||||
|
return Center(child: CircularProgressIndicator(),);
|
||||||
|
}
|
||||||
|
return Container();
|
||||||
|
}),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -20,6 +20,7 @@ import 'package:rogapp/services/cat_service.dart';
|
|||||||
import 'package:rogapp/services/location_service.dart';
|
import 'package:rogapp/services/location_service.dart';
|
||||||
import 'package:rogapp/services/perfecture_service.dart';
|
import 'package:rogapp/services/perfecture_service.dart';
|
||||||
import 'package:rogapp/utils/database_helper.dart';
|
import 'package:rogapp/utils/database_helper.dart';
|
||||||
|
import 'package:shared_preferences/shared_preferences.dart';
|
||||||
|
|
||||||
class IndexController extends GetxController {
|
class IndexController extends GetxController {
|
||||||
List<GeoJsonFeatureCollection> locations = <GeoJsonFeatureCollection>[].obs;
|
List<GeoJsonFeatureCollection> locations = <GeoJsonFeatureCollection>[].obs;
|
||||||
@ -51,6 +52,8 @@ class IndexController extends GetxController {
|
|||||||
MapController mapController = MapController();
|
MapController mapController = MapController();
|
||||||
MapController rogMapController = MapController();
|
MapController rogMapController = MapController();
|
||||||
|
|
||||||
|
String? userToken;
|
||||||
|
|
||||||
var mode = 0.obs;
|
var mode = 0.obs;
|
||||||
|
|
||||||
// master mode, rog or selection
|
// master mode, rog or selection
|
||||||
@ -191,50 +194,27 @@ List<LatLng> getLocationsList(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void login(String email, String password, BuildContext context){
|
void login(String email, String password, BuildContext context) {
|
||||||
AuthService.login(email, password).then((value){
|
AuthService.login(email, password).then((value) {
|
||||||
print("------- logged in user details ######## $value ###### --------");
|
print("------- logged in user details ######## $value ###### --------");
|
||||||
if(value.isNotEmpty){
|
if (value.isNotEmpty) {
|
||||||
currentUser.clear();
|
Navigator.pop(context);
|
||||||
currentUser.add(value);
|
print("--------- user details login ----- $value");
|
||||||
is_loading.value = false;
|
changeUser(value);
|
||||||
Navigator.pop(context);
|
} else {
|
||||||
loadUserDetails();
|
|
||||||
loadLocationsBound();
|
|
||||||
cats.clear();
|
|
||||||
if(currentFeature.isNotEmpty){
|
|
||||||
getAction();
|
|
||||||
}
|
|
||||||
|
|
||||||
if(currentUser.isNotEmpty){
|
|
||||||
rog_mode.value = 0 ;
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
rog_mode.value = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(rog_mode.value == 1){
|
|
||||||
switchPage(AppPages.TRAVEL);
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
switchPage(AppPages.INITIAL);
|
|
||||||
}
|
|
||||||
//Get.toNamed(AppPages.INITIAL);
|
|
||||||
}else{
|
|
||||||
is_loading.value = false;
|
is_loading.value = false;
|
||||||
Get.snackbar(
|
Get.snackbar(
|
||||||
"Failed",
|
"Failed",
|
||||||
"User login failed, please try again.",
|
"User login failed, please try again.",
|
||||||
icon: const Icon(Icons.error, size: 40.0, color: Colors.blue),
|
icon: const Icon(Icons.error, size: 40.0, color: Colors.blue),
|
||||||
snackPosition: SnackPosition.TOP,
|
snackPosition: SnackPosition.TOP,
|
||||||
duration: const Duration(milliseconds: 800),
|
duration: const Duration(milliseconds: 800),
|
||||||
backgroundColor: Colors.yellow,
|
backgroundColor: Colors.yellow,
|
||||||
//icon:Image(image:AssetImage("assets/images/dora.png"))
|
//icon:Image(image:AssetImage("assets/images/dora.png"))
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
});
|
||||||
});
|
}
|
||||||
}
|
|
||||||
|
|
||||||
void changePassword(String oldpassword, String newpassword, BuildContext context){
|
void changePassword(String oldpassword, String newpassword, BuildContext context){
|
||||||
String _token = currentUser[0]['token'];
|
String _token = currentUser[0]['token'];
|
||||||
@ -407,6 +387,58 @@ void login(String email, String password, BuildContext context){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void saveToDevice(String val) async {
|
||||||
|
final SharedPreferences prefs = await SharedPreferences.getInstance();
|
||||||
|
await prefs.setString("user_token", val);
|
||||||
|
}
|
||||||
|
|
||||||
|
void changeUser(Map<String, dynamic> value, {bool replace = true}) {
|
||||||
|
print("---- change user to ${value} -----");
|
||||||
|
currentUser.clear();
|
||||||
|
currentUser.add(value);
|
||||||
|
if(replace){
|
||||||
|
saveToDevice(currentUser[0]["token"]);
|
||||||
|
}
|
||||||
|
is_loading.value = false;
|
||||||
|
loadUserDetails();
|
||||||
|
loadLocationsBound();
|
||||||
|
cats.clear();
|
||||||
|
if (currentFeature.isNotEmpty) {
|
||||||
|
getAction();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (currentUser.isNotEmpty) {
|
||||||
|
rog_mode.value = 0;
|
||||||
|
} else {
|
||||||
|
rog_mode.value = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (rog_mode.value == 1) {
|
||||||
|
switchPage(AppPages.TRAVEL);
|
||||||
|
} else {
|
||||||
|
switchPage(AppPages.INITIAL);
|
||||||
|
}
|
||||||
|
//Get.toNamed(AppPages.INITIAL);
|
||||||
|
}
|
||||||
|
|
||||||
|
loadUserDetailsForToken(String token) async {
|
||||||
|
AuthService.userForToken(token).then((value) {
|
||||||
|
print("----token val-- $value ------");
|
||||||
|
if(value![0]["user"].isEmpty){
|
||||||
|
Get.toNamed(AppPages.LOGIN);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
changeUser(value[0], replace:false);
|
||||||
|
print("--------- user details ----- $value");
|
||||||
|
// if (value != null && value.isNotEmpty) {
|
||||||
|
// bool paid = value[0]["paid"] as bool;
|
||||||
|
// if (paid) {
|
||||||
|
// loadCustomAreas();
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void loadCustomAreas(){
|
void loadCustomAreas(){
|
||||||
customAreas.clear();
|
customAreas.clear();
|
||||||
|
|||||||
@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:rogapp/pages/destination/destination_controller.dart';
|
import 'package:rogapp/pages/destination/destination_controller.dart';
|
||||||
@ -8,12 +7,12 @@ import 'package:rogapp/routes/app_pages.dart';
|
|||||||
import 'package:rogapp/widgets/list_widget.dart';
|
import 'package:rogapp/widgets/list_widget.dart';
|
||||||
import 'package:rogapp/widgets/map_widget.dart';
|
import 'package:rogapp/widgets/map_widget.dart';
|
||||||
|
|
||||||
|
|
||||||
class IndexPage extends GetView<IndexController> {
|
class IndexPage extends GetView<IndexController> {
|
||||||
IndexPage({Key? key}) : super(key: key);
|
IndexPage({Key? key}) : super(key: key);
|
||||||
|
|
||||||
final IndexController indexController = Get.find<IndexController>();
|
final IndexController indexController = Get.find<IndexController>();
|
||||||
final DestinationController destinationController = Get.find<DestinationController>();
|
final DestinationController destinationController =
|
||||||
|
Get.find<DestinationController>();
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
@ -21,39 +20,47 @@ class IndexPage extends GetView<IndexController> {
|
|||||||
onWillPop: () async => false,
|
onWillPop: () async => false,
|
||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
drawer: DrawerPage(),
|
drawer: DrawerPage(),
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
// automaticallyImplyLeading: false,
|
// automaticallyImplyLeading: false,
|
||||||
// leading: IconButton(
|
// leading: IconButton(
|
||||||
// icon: Icon(Icons.arrow_back_ios),
|
// icon: Icon(Icons.arrow_back_ios),
|
||||||
// onPressed: (){
|
// onPressed: (){
|
||||||
// indexController.switchPage(AppPages.TRAVEL);
|
// indexController.switchPage(AppPages.TRAVEL);
|
||||||
// },
|
// },
|
||||||
// ),
|
// ),
|
||||||
//automaticallyImplyLeading: false,
|
//automaticallyImplyLeading: false,
|
||||||
title: Text("add_location".tr),
|
title: Text("add_location".tr),
|
||||||
actions: [
|
actions: [
|
||||||
IconButton(
|
IconButton(
|
||||||
onPressed: (){
|
onPressed: () {
|
||||||
destinationController.fixMapBound();
|
Get.toNamed(AppPages.HISTORY);
|
||||||
},
|
},
|
||||||
icon: const Icon(Icons.refresh)
|
icon: const Icon(Icons.history)),
|
||||||
),
|
IconButton(
|
||||||
InkWell(
|
onPressed: () {
|
||||||
onTap: (){
|
final tk = indexController.currentUser[0]["token"];
|
||||||
Get.toNamed(AppPages.SEARCH);
|
if (tk != null) {
|
||||||
},
|
destinationController.fixMapBound(tk);
|
||||||
child: Container(
|
}
|
||||||
height: 32,
|
},
|
||||||
width: 75,
|
icon: const Icon(Icons.refresh)),
|
||||||
decoration: BoxDecoration(
|
InkWell(
|
||||||
color: Colors.blue,
|
onTap: () {
|
||||||
borderRadius: BorderRadius.circular(25),
|
Get.toNamed(AppPages.SEARCH);
|
||||||
|
},
|
||||||
),
|
child: Container(
|
||||||
child: const Center(child: Icon(Icons.search),),
|
height: 32,
|
||||||
),
|
width: 75,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: Colors.blue,
|
||||||
|
borderRadius: BorderRadius.circular(25),
|
||||||
),
|
),
|
||||||
//CatWidget(indexController: indexController,),
|
child: const Center(
|
||||||
|
child: Icon(Icons.search),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
//CatWidget(indexController: indexController,),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
bottomNavigationBar: BottomAppBar(
|
bottomNavigationBar: BottomAppBar(
|
||||||
@ -61,49 +68,57 @@ class IndexPage extends GetView<IndexController> {
|
|||||||
mainAxisAlignment: MainAxisAlignment.end,
|
mainAxisAlignment: MainAxisAlignment.end,
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.only(right: 10.0, top: 4.0, bottom: 4.0),
|
padding:
|
||||||
|
const EdgeInsets.only(right: 10.0, top: 4.0, bottom: 4.0),
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
child:
|
child:
|
||||||
Obx(() =>
|
Obx(() => destinationController.is_gps_selected == true
|
||||||
destinationController.is_gps_selected == true ?
|
? Padding(
|
||||||
Padding(
|
padding: const EdgeInsets.only(
|
||||||
padding: const EdgeInsets.only(right: 10.0, top: 4.0, bottom: 4.0),
|
right: 10.0, top: 4.0, bottom: 4.0),
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
child: const Image(image: AssetImage('assets/images/route3_off.png'), width: 35, height: 35,),
|
child: const Image(
|
||||||
onTap: (){
|
image: AssetImage(
|
||||||
//indexController.switchPage(AppPages.TRAVEL);
|
'assets/images/route3_off.png'),
|
||||||
},
|
width: 35,
|
||||||
),
|
height: 35,
|
||||||
) :
|
),
|
||||||
Padding(
|
onTap: () {
|
||||||
padding: const EdgeInsets.only(right: 10.0, top: 4.0, bottom: 4.0),
|
//indexController.switchPage(AppPages.TRAVEL);
|
||||||
child: InkWell(
|
},
|
||||||
child: const Image(image: AssetImage('assets/images/route2_on.png'),width: 35, height: 35,),
|
),
|
||||||
onTap: (){
|
)
|
||||||
//indexController.switchPage(AppPages.TRAVEL);
|
: Padding(
|
||||||
},
|
padding: const EdgeInsets.only(
|
||||||
),
|
right: 10.0, top: 4.0, bottom: 4.0),
|
||||||
)
|
child: InkWell(
|
||||||
)
|
child: const Image(
|
||||||
),
|
image: AssetImage(
|
||||||
|
'assets/images/route2_on.png'),
|
||||||
|
width: 35,
|
||||||
|
height: 35,
|
||||||
|
),
|
||||||
|
onTap: () {
|
||||||
|
//indexController.switchPage(AppPages.TRAVEL);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
))),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
floatingActionButton: FloatingActionButton(
|
floatingActionButton: FloatingActionButton(
|
||||||
onPressed: (){
|
onPressed: () {
|
||||||
indexController.toggleMode();
|
indexController.toggleMode();
|
||||||
if(indexController.currentCat.isNotEmpty){
|
if (indexController.currentCat.isNotEmpty) {
|
||||||
print(indexController.currentCat[0].toString());
|
print(indexController.currentCat[0].toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
tooltip: 'Increment',
|
tooltip: 'Increment',
|
||||||
child: Obx(() =>
|
child: Obx(
|
||||||
indexController.mode == 0 ?
|
() => indexController.mode == 0
|
||||||
const Image(image: AssetImage('assets/images/list2.png'))
|
? const Image(image: AssetImage('assets/images/list2.png'))
|
||||||
:
|
: const Image(image: AssetImage('assets/images/map.png')),
|
||||||
const Image(image: AssetImage('assets/images/map.png')),
|
|
||||||
),
|
),
|
||||||
elevation: 4.0,
|
elevation: 4.0,
|
||||||
),
|
),
|
||||||
@ -129,11 +144,11 @@ class IndexPage extends GetView<IndexController> {
|
|||||||
// // ),
|
// // ),
|
||||||
// child: SingleChildScrollView(
|
// child: SingleChildScrollView(
|
||||||
// scrollDirection: Axis.horizontal,
|
// scrollDirection: Axis.horizontal,
|
||||||
// child: Obx(() =>
|
// child: Obx(() =>
|
||||||
// Row(
|
// Row(
|
||||||
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
// children: [
|
// children: [
|
||||||
// indexController.is_mapController_loaded.value == false ?
|
// indexController.is_mapController_loaded.value == false ?
|
||||||
// Center(child: CircularProgressIndicator())
|
// Center(child: CircularProgressIndicator())
|
||||||
// :
|
// :
|
||||||
// BreadCrumbWidget(mapController: indexController.mapController),
|
// BreadCrumbWidget(mapController: indexController.mapController),
|
||||||
@ -146,7 +161,7 @@ class IndexPage extends GetView<IndexController> {
|
|||||||
// // onPressed: (){
|
// // onPressed: (){
|
||||||
// // indexController.currentCat.clear();
|
// // indexController.currentCat.clear();
|
||||||
// // indexController.loadLocationsBound();
|
// // indexController.loadLocationsBound();
|
||||||
// // },
|
// // },
|
||||||
// // icon: Icon(Icons.cancel, color: Colors.red,)
|
// // icon: Icon(Icons.cancel, color: Colors.red,)
|
||||||
// // ) :
|
// // ) :
|
||||||
// // Container(width: 0, height: 0,)
|
// // Container(width: 0, height: 0,)
|
||||||
@ -158,18 +173,15 @@ class IndexPage extends GetView<IndexController> {
|
|||||||
// ),
|
// ),
|
||||||
// ),
|
// ),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Obx(() =>
|
child: Obx(
|
||||||
indexController.mode == 0 ?
|
() => indexController.mode == 0
|
||||||
MapWidget() :
|
? MapWidget()
|
||||||
const ListWidget(),
|
: const ListWidget(),
|
||||||
)
|
))
|
||||||
|
|
||||||
)
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
|
||||||
|
|||||||
@ -20,8 +20,8 @@ class _PermissionHandlerScreenState extends State<PermissionHandlerScreen> {
|
|||||||
barrierDismissible: false, // user must tap button!
|
barrierDismissible: false, // user must tap button!
|
||||||
builder: (BuildContext context) {
|
builder: (BuildContext context) {
|
||||||
return AlertDialog(
|
return AlertDialog(
|
||||||
title: Text('ロケーション許可'),
|
title: const Text('ロケーション許可'),
|
||||||
content: SingleChildScrollView(
|
content: const SingleChildScrollView(
|
||||||
child: ListBody(
|
child: ListBody(
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Text( 'このアプリでは、位置情報の収集を行います。'),
|
Text( 'このアプリでは、位置情報の収集を行います。'),
|
||||||
@ -160,8 +160,8 @@ class _PermissionHandlerScreenState extends State<PermissionHandlerScreen> {
|
|||||||
showDialog(
|
showDialog(
|
||||||
context: context,
|
context: context,
|
||||||
builder: (_) => AlertDialog(
|
builder: (_) => AlertDialog(
|
||||||
title: Text('無効'),
|
title: const Text('無効'),
|
||||||
content: SingleChildScrollView(
|
content: const SingleChildScrollView(
|
||||||
child: ListBody(
|
child: ListBody(
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Text( '位置情報が無効になっています'),
|
Text( '位置情報が無効になっています'),
|
||||||
@ -187,8 +187,8 @@ class _PermissionHandlerScreenState extends State<PermissionHandlerScreen> {
|
|||||||
showDialog(
|
showDialog(
|
||||||
context: context,
|
context: context,
|
||||||
builder: (_) => AlertDialog(
|
builder: (_) => AlertDialog(
|
||||||
title: Text('ロケーション許可'),
|
title: const Text('ロケーション許可'),
|
||||||
content: SingleChildScrollView(
|
content: const SingleChildScrollView(
|
||||||
child: ListBody(
|
child: ListBody(
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Text( 'このアプリでは、位置情報の収集を行います。'),
|
Text( 'このアプリでは、位置情報の収集を行います。'),
|
||||||
|
|||||||
@ -6,6 +6,7 @@ import 'package:rogapp/pages/changepassword/change_password_page.dart';
|
|||||||
import 'package:rogapp/pages/city/city_page.dart';
|
import 'package:rogapp/pages/city/city_page.dart';
|
||||||
import 'package:rogapp/pages/destination/destination_binding.dart';
|
import 'package:rogapp/pages/destination/destination_binding.dart';
|
||||||
import 'package:rogapp/pages/destination/destination_page.dart';
|
import 'package:rogapp/pages/destination/destination_page.dart';
|
||||||
|
import 'package:rogapp/pages/history/history_page.dart';
|
||||||
import 'package:rogapp/pages/home/home_binding.dart';
|
import 'package:rogapp/pages/home/home_binding.dart';
|
||||||
import 'package:rogapp/pages/home/home_page.dart';
|
import 'package:rogapp/pages/home/home_page.dart';
|
||||||
|
|
||||||
@ -48,6 +49,7 @@ class AppPages {
|
|||||||
static const CHANGE_PASSWORD = Routes.CHANGE_PASSWORD;
|
static const CHANGE_PASSWORD = Routes.CHANGE_PASSWORD;
|
||||||
static const CAMERA_PAGE = Routes.CAMERA_PAGE;
|
static const CAMERA_PAGE = Routes.CAMERA_PAGE;
|
||||||
static const PROGRESS = Routes.PROGRESS;
|
static const PROGRESS = Routes.PROGRESS;
|
||||||
|
static const HISTORY = Routes.HISTORY;
|
||||||
|
|
||||||
static final routes = [
|
static final routes = [
|
||||||
// GetPage(
|
// GetPage(
|
||||||
@ -141,6 +143,10 @@ class AppPages {
|
|||||||
GetPage(
|
GetPage(
|
||||||
name: Routes.PROGRESS,
|
name: Routes.PROGRESS,
|
||||||
page: () => const ProgressPage(),
|
page: () => const ProgressPage(),
|
||||||
|
),
|
||||||
|
GetPage(
|
||||||
|
name: Routes.HISTORY,
|
||||||
|
page: () => const HistoryPage(),
|
||||||
)
|
)
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
@ -24,4 +24,5 @@ abstract class Routes {
|
|||||||
static const CHANGE_PASSWORD = '/change_password';
|
static const CHANGE_PASSWORD = '/change_password';
|
||||||
static const CAMERA_PAGE = '/camera_page';
|
static const CAMERA_PAGE = '/camera_page';
|
||||||
static const PROGRESS = '/progress';
|
static const PROGRESS = '/progress';
|
||||||
|
static const HISTORY = '/history';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -118,6 +118,26 @@ class AuthService{
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
static Future<List<dynamic>?> userForToken(String token) async {
|
||||||
|
Map<String, dynamic> cats = {};
|
||||||
|
String serverUrl = ConstValues.currentServer();
|
||||||
|
String url = '$serverUrl/api/user/';
|
||||||
|
print('++++++++$url');
|
||||||
|
print("---- UserDetails url is $url");
|
||||||
|
final response = await http.get(Uri.parse(url),
|
||||||
|
headers: <String, String>{
|
||||||
|
'Content-Type': 'application/json; charset=UTF-8',
|
||||||
|
'Authorization': 'Token $token'
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|
||||||
|
if (response.statusCode == 200) {
|
||||||
|
|
||||||
|
cats = json.decode(utf8.decode(response.bodyBytes));
|
||||||
|
print("--- eeeeee $cats ----");
|
||||||
|
}
|
||||||
|
return [{"user":cats}];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -369,7 +369,7 @@ class BottomSheetWidget extends StatelessWidget {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Row(
|
const Row(
|
||||||
children: [
|
children: [
|
||||||
SizedBox(height: 60.0,),
|
SizedBox(height: 60.0,),
|
||||||
],
|
],
|
||||||
|
|||||||
@ -113,7 +113,7 @@ class DestinationWidget extends StatelessWidget {
|
|||||||
buttonColor: Colors.white,
|
buttonColor: Colors.white,
|
||||||
barrierDismissible: false,
|
barrierDismissible: false,
|
||||||
radius: 10,
|
radius: 10,
|
||||||
content: Column(
|
content: const Column(
|
||||||
children: [
|
children: [
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|||||||
714
pubspec.lock
714
pubspec.lock
File diff suppressed because it is too large
Load Diff
20
pubspec.yaml
20
pubspec.yaml
@ -18,7 +18,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
|
|||||||
version: 1.0.16+16
|
version: 1.0.16+16
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: ">=2.16.0 <3.0.0"
|
sdk: '>=3.1.0 <4.0.0'
|
||||||
|
|
||||||
# Dependencies specify other packages that your package needs in order to work.
|
# Dependencies specify other packages that your package needs in order to work.
|
||||||
# To automatically upgrade your package dependencies to the latest versions
|
# To automatically upgrade your package dependencies to the latest versions
|
||||||
@ -39,7 +39,7 @@ dependencies:
|
|||||||
flutter_map: any
|
flutter_map: any
|
||||||
geolocator: ^9.0.1
|
geolocator: ^9.0.1
|
||||||
permission_handler: ^10.0.0
|
permission_handler: ^10.0.0
|
||||||
google_api_availability: ^3.0.1
|
google_api_availability: ^5.0.0
|
||||||
tuple: ^2.0.0
|
tuple: ^2.0.0
|
||||||
latlong2: ^0.8.1
|
latlong2: ^0.8.1
|
||||||
positioned_tap_detector_2: ^1.0.4
|
positioned_tap_detector_2: ^1.0.4
|
||||||
@ -53,9 +53,9 @@ dependencies:
|
|||||||
path_provider: ^2.0.8
|
path_provider: ^2.0.8
|
||||||
flutter_map_location_marker: any
|
flutter_map_location_marker: any
|
||||||
flutter_map_marker_cluster: any
|
flutter_map_marker_cluster: any
|
||||||
material_design_icons_flutter: ^5.0.6595
|
material_design_icons_flutter: ^7.0.7296
|
||||||
#google_fonts: ^2.1.1
|
#google_fonts: ^2.1.1
|
||||||
image_picker: ^0.8.4+4
|
image_picker: ^1.0.4
|
||||||
#geojson_vi: ^2.0.7
|
#geojson_vi: ^2.0.7
|
||||||
geojson: ^1.0.0
|
geojson: ^1.0.0
|
||||||
url_launcher: ^6.0.20
|
url_launcher: ^6.0.20
|
||||||
@ -66,16 +66,16 @@ dependencies:
|
|||||||
flutter_polyline_points: ^1.0.0
|
flutter_polyline_points: ^1.0.0
|
||||||
google_maps_webservice: ^0.0.19
|
google_maps_webservice: ^0.0.19
|
||||||
flutter_typeahead: ^4.0.0
|
flutter_typeahead: ^4.0.0
|
||||||
flutter_launcher_icons: ^0.10.0
|
flutter_launcher_icons: ^0.13.1
|
||||||
rename: ^2.0.1
|
rename: ^2.0.1
|
||||||
circular_menu: ^2.0.1
|
circular_menu: ^2.0.1
|
||||||
camera_camera: ^3.0.0-dev
|
camera_camera: ^3.0.0-dev
|
||||||
intl: ^0.17.0
|
intl: ^0.18.1
|
||||||
modal_bottom_sheet: ^3.0.0-pre
|
modal_bottom_sheet: ^3.0.0-pre
|
||||||
connectivity_plus: ^3.0.2
|
connectivity_plus: ^4.0.2
|
||||||
flutter_map_tile_caching: ^6.2.0
|
flutter_map_tile_caching: ^8.0.1
|
||||||
shared_preferences: ^2.0.15
|
shared_preferences: ^2.0.15
|
||||||
is_lock_screen: ^2.0.0
|
|
||||||
|
|
||||||
flutter_icons:
|
flutter_icons:
|
||||||
android: true
|
android: true
|
||||||
@ -92,7 +92,7 @@ dev_dependencies:
|
|||||||
# activated in the `analysis_options.yaml` file located at the root of your
|
# activated in the `analysis_options.yaml` file located at the root of your
|
||||||
# package. See that file for information about deactivating specific lint
|
# package. See that file for information about deactivating specific lint
|
||||||
# rules and activating additional ones.
|
# rules and activating additional ones.
|
||||||
flutter_lints: ^1.0.0
|
flutter_lints: ^2.0.3
|
||||||
|
|
||||||
# For information on the generic Dart part of this file, see the
|
# For information on the generic Dart part of this file, see the
|
||||||
# following page: https://dart.dev/tools/pub/pubspec
|
# following page: https://dart.dev/tools/pub/pubspec
|
||||||
|
|||||||
@ -7,20 +7,23 @@
|
|||||||
#include "generated_plugin_registrant.h"
|
#include "generated_plugin_registrant.h"
|
||||||
|
|
||||||
#include <connectivity_plus/connectivity_plus_windows_plugin.h>
|
#include <connectivity_plus/connectivity_plus_windows_plugin.h>
|
||||||
|
#include <file_selector_windows/file_selector_windows.h>
|
||||||
#include <geolocator_windows/geolocator_windows.h>
|
#include <geolocator_windows/geolocator_windows.h>
|
||||||
|
#include <isar_flutter_libs/isar_flutter_libs_plugin.h>
|
||||||
#include <permission_handler_windows/permission_handler_windows_plugin.h>
|
#include <permission_handler_windows/permission_handler_windows_plugin.h>
|
||||||
#include <share_plus/share_plus_windows_plugin_c_api.h>
|
|
||||||
#include <url_launcher_windows/url_launcher_windows.h>
|
#include <url_launcher_windows/url_launcher_windows.h>
|
||||||
|
|
||||||
void RegisterPlugins(flutter::PluginRegistry* registry) {
|
void RegisterPlugins(flutter::PluginRegistry* registry) {
|
||||||
ConnectivityPlusWindowsPluginRegisterWithRegistrar(
|
ConnectivityPlusWindowsPluginRegisterWithRegistrar(
|
||||||
registry->GetRegistrarForPlugin("ConnectivityPlusWindowsPlugin"));
|
registry->GetRegistrarForPlugin("ConnectivityPlusWindowsPlugin"));
|
||||||
|
FileSelectorWindowsRegisterWithRegistrar(
|
||||||
|
registry->GetRegistrarForPlugin("FileSelectorWindows"));
|
||||||
GeolocatorWindowsRegisterWithRegistrar(
|
GeolocatorWindowsRegisterWithRegistrar(
|
||||||
registry->GetRegistrarForPlugin("GeolocatorWindows"));
|
registry->GetRegistrarForPlugin("GeolocatorWindows"));
|
||||||
|
IsarFlutterLibsPluginRegisterWithRegistrar(
|
||||||
|
registry->GetRegistrarForPlugin("IsarFlutterLibsPlugin"));
|
||||||
PermissionHandlerWindowsPluginRegisterWithRegistrar(
|
PermissionHandlerWindowsPluginRegisterWithRegistrar(
|
||||||
registry->GetRegistrarForPlugin("PermissionHandlerWindowsPlugin"));
|
registry->GetRegistrarForPlugin("PermissionHandlerWindowsPlugin"));
|
||||||
SharePlusWindowsPluginCApiRegisterWithRegistrar(
|
|
||||||
registry->GetRegistrarForPlugin("SharePlusWindowsPluginCApi"));
|
|
||||||
UrlLauncherWindowsRegisterWithRegistrar(
|
UrlLauncherWindowsRegisterWithRegistrar(
|
||||||
registry->GetRegistrarForPlugin("UrlLauncherWindows"));
|
registry->GetRegistrarForPlugin("UrlLauncherWindows"));
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,9 +4,10 @@
|
|||||||
|
|
||||||
list(APPEND FLUTTER_PLUGIN_LIST
|
list(APPEND FLUTTER_PLUGIN_LIST
|
||||||
connectivity_plus
|
connectivity_plus
|
||||||
|
file_selector_windows
|
||||||
geolocator_windows
|
geolocator_windows
|
||||||
|
isar_flutter_libs
|
||||||
permission_handler_windows
|
permission_handler_windows
|
||||||
share_plus
|
|
||||||
url_launcher_windows
|
url_launcher_windows
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user