update new features and flutter 3.13

This commit is contained in:
Mohamed Nouffer
2023-09-04 22:46:53 +05:30
parent 2ab96cc3d0
commit 3f157d7ddf
22 changed files with 2160 additions and 1703 deletions

View File

@ -1,12 +1,12 @@
buildscript {
ext.kotlin_version = '1.6.10'
ext.kotlin_version = '1.7.10'
repositories {
google()
mavenCentral()
}
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"
}
}
@ -26,6 +26,6 @@ subprojects {
project.evaluationDependsOn(':app')
}
task clean(type: Delete) {
tasks.register("clean", Delete) {
delete rootProject.buildDir
}

View File

@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
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

View File

@ -4,47 +4,11 @@ PODS:
- connectivity_plus (0.0.1):
- Flutter
- 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_compass (0.0.1):
- Flutter
- flutter_keyboard_visibility (0.0.1):
- Flutter
- flutter_local_notifications (0.0.1):
- Flutter
- FMDB (2.7.5):
- FMDB/standard (= 2.7.5)
- FMDB/standard (2.7.5)
@ -52,7 +16,7 @@ PODS:
- Flutter
- google_maps_flutter_ios (0.0.1):
- Flutter
- GoogleMaps
- GoogleMaps (< 8.0)
- GoogleMaps (5.2.0):
- GoogleMaps/Maps (= 5.2.0)
- GoogleMaps/Base (5.2.0)
@ -60,124 +24,93 @@ PODS:
- GoogleMaps/Base
- image_picker_ios (0.0.1):
- Flutter
- is_lock_screen (2.0.0):
- isar_flutter_libs (1.0.0):
- Flutter
- move_to_background (0.0.1):
- path_provider_foundation (0.0.1):
- Flutter
- path_provider_ios (0.0.1):
- Flutter
- permission_handler_apple (9.0.4):
- FlutterMacOS
- permission_handler_apple (9.1.1):
- Flutter
- 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):
- Flutter
- FlutterMacOS
- sqflite (0.0.2):
- sqflite (0.0.3):
- Flutter
- FMDB (>= 2.7.5)
- SwiftyGif (5.4.4)
- url_launcher_ios (0.0.1):
- Flutter
DEPENDENCIES:
- camera_avfoundation (from `.symlinks/plugins/camera_avfoundation/ios`)
- connectivity_plus (from `.symlinks/plugins/connectivity_plus/ios`)
- file_picker (from `.symlinks/plugins/file_picker/ios`)
- Flutter (from `Flutter`)
- flutter_compass (from `.symlinks/plugins/flutter_compass/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`)
- google_maps_flutter_ios (from `.symlinks/plugins/google_maps_flutter_ios/ios`)
- image_picker_ios (from `.symlinks/plugins/image_picker_ios/ios`)
- is_lock_screen (from `.symlinks/plugins/is_lock_screen/ios`)
- move_to_background (from `.symlinks/plugins/move_to_background/ios`)
- path_provider_ios (from `.symlinks/plugins/path_provider_ios/ios`)
- isar_flutter_libs (from `.symlinks/plugins/isar_flutter_libs/ios`)
- path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`)
- 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/ios`)
- shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`)
- sqflite (from `.symlinks/plugins/sqflite/ios`)
- url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`)
SPEC REPOS:
trunk:
- DKImagePickerController
- DKPhotoGallery
- FMDB
- GoogleMaps
- ReachabilitySwift
- SDWebImage
- SwiftyGif
EXTERNAL SOURCES:
camera_avfoundation:
:path: ".symlinks/plugins/camera_avfoundation/ios"
connectivity_plus:
:path: ".symlinks/plugins/connectivity_plus/ios"
file_picker:
:path: ".symlinks/plugins/file_picker/ios"
Flutter:
:path: Flutter
flutter_compass:
:path: ".symlinks/plugins/flutter_compass/ios"
flutter_keyboard_visibility:
:path: ".symlinks/plugins/flutter_keyboard_visibility/ios"
flutter_local_notifications:
:path: ".symlinks/plugins/flutter_local_notifications/ios"
geolocator_apple:
:path: ".symlinks/plugins/geolocator_apple/ios"
google_maps_flutter_ios:
:path: ".symlinks/plugins/google_maps_flutter_ios/ios"
image_picker_ios:
:path: ".symlinks/plugins/image_picker_ios/ios"
is_lock_screen:
:path: ".symlinks/plugins/is_lock_screen/ios"
move_to_background:
:path: ".symlinks/plugins/move_to_background/ios"
path_provider_ios:
:path: ".symlinks/plugins/path_provider_ios/ios"
isar_flutter_libs:
:path: ".symlinks/plugins/isar_flutter_libs/ios"
path_provider_foundation:
:path: ".symlinks/plugins/path_provider_foundation/darwin"
permission_handler_apple:
:path: ".symlinks/plugins/permission_handler_apple/ios"
share_plus:
:path: ".symlinks/plugins/share_plus/ios"
shared_preferences_foundation:
:path: ".symlinks/plugins/shared_preferences_foundation/ios"
:path: ".symlinks/plugins/shared_preferences_foundation/darwin"
sqflite:
:path: ".symlinks/plugins/sqflite/ios"
url_launcher_ios:
:path: ".symlinks/plugins/url_launcher_ios/ios"
SPEC CHECKSUMS:
camera_avfoundation: 07c77549ea54ad95d8581be86617c094a46280d9
connectivity_plus: 413a8857dd5d9f1c399a39130850d02fe0feaf7e
DKImagePickerController: b512c28220a2b8ac7419f21c491fc8534b7601ac
DKPhotoGallery: fdfad5125a9fdda9cc57df834d49df790dbb4179
file_picker: ce3938a0df3cc1ef404671531facef740d03f920
camera_avfoundation: 3125e8cd1a4387f6f31c6c63abb8a55892a9eeeb
connectivity_plus: 07c49e96d7fc92bc9920617b83238c4d178b446a
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
flutter_compass: cbbd285cea1584c7ac9c4e0c3e1f17cbea55e855
flutter_keyboard_visibility: 0339d06371254c3eb25eeb90ba8d17dca8f9c069
flutter_local_notifications: 0c0b1ae97e741e1521e4c1629a459d04b9aec743
FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a
geolocator_apple: cc556e6844d508c95df1e87e3ea6fa4e58c50401
google_maps_flutter_ios: 66201f392bf62d500f07670a30488a247b9bb5b9
google_maps_flutter_ios: abdac20d6ce8931f6ebc5f46616df241bfaa2cfd
GoogleMaps: 025272d5876d3b32604e5c080dc25eaf68764693
image_picker_ios: b786a5dcf033a8336a657191401bfdf12017dabb
is_lock_screen: 8ae6397a49b2fde58fd80a6ed30fbaf2be9418d6
move_to_background: 39a5b79b26d577b0372cbe8a8c55e7aa9fcd3a2d
path_provider_ios: 14f3d2fd28c4fdb42f44e0f751d12861c43cee02
permission_handler_apple: 44366e37eaf29454a1e7b1b7d736c2cceaeb17ce
image_picker_ios: 4a8aadfbb6dc30ad5141a2ce3832af9214a705b5
isar_flutter_libs: b69f437aeab9c521821c3f376198c4371fa21073
path_provider_foundation: 29f094ae23ebbca9d3d0cec13889cd9060c0e943
permission_handler_apple: e76247795d700c14ea09e3a2d8855d41ee80a2e6
ReachabilitySwift: 985039c6f7b23a1da463388634119492ff86c825
SDWebImage: fd7e1a22f00303e058058278639bf6196ee431fe
share_plus: 056a1e8ac890df3e33cb503afffaf1e9b4fbae68
shared_preferences_foundation: 986fc17f3d3251412d18b0265f9c64113a8c2472
sqflite: 6d358c025f5b867b29ed92fc697fd34924e11904
SwiftyGif: 93a1cc87bf3a51916001cf8f3d63835fb64c819f
url_launcher_ios: 839c58cdb4279282219f5e248c3321761ff3c4de
shared_preferences_foundation: 5b919d13b803cadd15ed2dc053125c68730e5126
sqflite: 31f7eba61e3074736dff8807a9b41581e4f7f15a
url_launcher_ios: 08a3dfac5fb39e8759aeb0abbd5d9480f30fc8b4
PODFILE CHECKSUM: a1c2f8dde3796ecc1697a15e7c75eb5205d8a740

View File

@ -156,7 +156,7 @@
97C146E61CF9000F007C117D /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 1300;
LastUpgradeCheck = 1430;
ORGANIZATIONNAME = "";
TargetAttributes = {
97C146ED1CF9000F007C117D = {

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1300"
LastUpgradeVersion = "1430"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"

View File

@ -1,4 +1,3 @@
import 'package:flutter/material.dart';
import 'package:flutter_map_tile_caching/flutter_map_tile_caching.dart';
import 'package:get/get.dart';
@ -6,13 +5,12 @@ import 'package:rogapp/pages/destination/destination_controller.dart';
import 'package:rogapp/pages/index/index_binding.dart';
import 'package:rogapp/routes/app_pages.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 {
WidgetsFlutterBinding.ensureInitialized();
FlutterMapTileCaching.initialise(await RootDirectory.normalCache);
await FlutterMapTileCaching.initialise();
final StoreDirectory instanceA = FMTC.instance('OpenStreetMap (A)');
await instanceA.manage.createAsync();
await instanceA.metadata.addAsync(
@ -44,22 +42,38 @@ class _MyAppState extends State<MyApp> with WidgetsBindingObserver {
@override
void initState() {
super.initState();
WidgetsBinding.instance?.addObserver(this);
WidgetsBinding.instance.addObserver(this);
}
@override
void didChangeAppLifecycleState(AppLifecycleState state) async {
super.didChangeAppLifecycleState(state);
if (state == AppLifecycleState.inactive) {
print('app inactive, is lock screen: ${await isLockScreen()}');
} else if (state == AppLifecycleState.resumed) {
DestinationController destinationController = Get.find<DestinationController>();
destinationController.initGPS();
print('app resumed');
}
void dispose() {
WidgetsBinding.instance.removeObserver(this);
super.dispose();
}
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
Widget build(BuildContext context) {
@ -70,8 +84,9 @@ class _MyAppState extends State<MyApp> with WidgetsBindingObserver {
fallbackLocale: const Locale('en', 'US'),
title: 'ROGAINING',
theme: ThemeData(
primarySwatch: Colors.blue,
visualDensity: VisualDensity.adaptivePlatformDensity,
colorScheme:
ColorScheme.fromSeed(seedColor: Color.fromARGB(255, 36, 135, 221)),
useMaterial3: true,
),
debugShowCheckedModeBanner: false,
defaultTransition: Transition.cupertino,

View File

@ -112,7 +112,7 @@ class ChangePasswordPage extends StatelessWidget {
)
),
const SizedBox(height: 20,),
Row(
const Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [

View File

@ -1,5 +1,3 @@
import 'dart:io';
import 'package:camera_camera/camera_camera.dart';
@ -25,9 +23,9 @@ import 'package:rogapp/widgets/bottom_sheet_new.dart';
import 'dart:async';
import 'package:modal_bottom_sheet/modal_bottom_sheet.dart';
import 'package:shared_preferences/shared_preferences.dart';
class DestinationController extends GetxController {
late LocationSettings locationSettings;
var destinationCount = 0.obs;
@ -58,7 +56,6 @@ class DestinationController extends GetxController {
bool skip_gps = false;
Map<String, dynamic> matrix = {};
final photos = <File>[].obs;
@ -76,7 +73,8 @@ class DestinationController extends GetxController {
Destination festuretoDestination(GeoJsonFeature fs) {
GeoJsonMultiPoint mp = fs.geometry as GeoJsonMultiPoint;
LatLng pt = LatLng(mp.geoSerie!.geoPoints[0].latitude, mp.geoSerie!.geoPoints[0].longitude);
LatLng pt = LatLng(mp.geoSerie!.geoPoints[0].latitude,
mp.geoSerie!.geoPoints[0].longitude);
//print("----- ${indexController.currentFeature[0].properties} -----");
@ -101,8 +99,7 @@ class DestinationController extends GetxController {
buy_point: fs.properties!["buy_point"],
selected: false,
checkedin: false,
hidden_location: fs.properties!["hidden_location"] == true ?1 : 0
);
hidden_location: fs.properties!["hidden_location"] == true ? 1 : 0);
}
void startTimerLocation(GeoJsonFeature fs, double distance) {
@ -140,18 +137,19 @@ class DestinationController extends GetxController {
indexController.currentDestinationFeature.clear();
indexController.currentDestinationFeature.add(d);
print("---- checked in as ${indexController.currentDestinationFeature[0].checkedin.toString()} ----");
}
else {
print(
"---- checked in as ${indexController.currentDestinationFeature[0].checkedin.toString()} ----");
} else {
skip_gps = false;
return;
}
if (is_photo_shoot.value == true) {
photos.clear();
showModalBottomSheet(context: Get.context!, isScrollControlled: true,
builder:((context) => CameraPage())
).whenComplete((){
showModalBottomSheet(
context: Get.context!,
isScrollControlled: true,
builder: ((context) => CameraPage())).whenComplete(() {
skip_gps = false;
chekcs = 0;
is_in_checkin.value = false;
@ -170,23 +168,23 @@ class DestinationController extends GetxController {
chekcs = 1;
is_in_checkin.value = true;
is_at_start.value = true;
showModalBottomSheet(context: Get.context!, isScrollControlled: true,
builder:((context) => BottomSheetNew())
).whenComplete((){
showModalBottomSheet(
context: Get.context!,
isScrollControlled: true,
builder: ((context) => BottomSheetNew())).whenComplete(() {
skip_gps = false;
chekcs = 0;
is_at_start.value = false;
is_in_checkin.value = false;
});
}
else if(is_in_rog.value == true && indexController.rog_mode == 1)
{
} else if (is_in_rog.value == true && indexController.rog_mode == 1) {
print("----- in location popup checkin cp - ${d.cp}----");
chekcs = 2;
is_in_checkin.value = true;
showModalBottomSheet(context: Get.context!, isScrollControlled: true,
builder:((context) => BottomSheetNew())
).whenComplete((){
showModalBottomSheet(
context: Get.context!,
isScrollControlled: true,
builder: ((context) => BottomSheetNew())).whenComplete(() {
skip_gps = false;
chekcs = 0;
is_in_checkin.value = false;
@ -196,42 +194,48 @@ class DestinationController extends GetxController {
print("---- location checkin radious ${d.checkin_radious} ----");
print("---- already checked in $locationAlreadyCheckedIn ----");
if(checkinRadious >= distance && locationAlreadyCheckedIn == false && is_in_rog.value == true){
if (checkinRadious >= distance &&
locationAlreadyCheckedIn == false &&
is_in_rog.value == true) {
if (autoCheckin) {
if (!checking_in) {
print("@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ make checkin ${d.sub_loc_id}@@@@@@@@@@@");
print(
"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ make checkin ${d.sub_loc_id}@@@@@@@@@@@");
makeCheckin(d, true, "");
if (d.cp != -1) {
rogaining_counted.value = true;
}
skip_gps = false;
}
}
else{
} else {
print("--- hidden loc ${d.hidden_location} ----");
// ask for checkin
if(d.hidden_location != null && d.hidden_location == 0 && is_in_rog.value == true && d.cp != -1){
if (d.hidden_location != null &&
d.hidden_location == 0 &&
is_in_rog.value == true &&
d.cp != -1) {
chekcs = 3;
is_in_checkin.value = true;
photos.clear();
showModalBottomSheet(context: Get.context!, isScrollControlled: true,
builder:((context) => CameraPage(destination: d,))
).whenComplete((){
showModalBottomSheet(
context: Get.context!,
isScrollControlled: true,
builder: ((context) => CameraPage(
destination: d,
))).whenComplete(() {
skip_gps = false;
rogaining_counted.value = true;
chekcs = 0;
is_in_checkin.value = false;
});
}
else if(is_in_rog.value == true && d.cp != -1){
} else if (is_in_rog.value == true && d.cp != -1) {
chekcs = 4;
is_in_checkin.value = true;
showMaterialModalBottomSheet(
expand: true,
context: Get.context!,
backgroundColor: Colors.transparent,
builder: (context) => BottomSheetNew()
).whenComplete(() {
builder: (context) => BottomSheetNew()).whenComplete(() {
skip_gps = false;
chekcs = 0;
is_in_checkin.value = false;
@ -244,15 +248,18 @@ class DestinationController extends GetxController {
// is_in_checkin.value = false;
// });
}
}
}
print("---- cp --- ${d.cp} -----");
print("--- at goal $is_at_goal ---");
print("--- rog counted $rogaining_counted ---");
print("--- loc already checked in $locationAlreadyCheckedIn ---");
print("==== date diff is ${DateTime.now().difference(last_goal_at).inHours} ====");
if(isuserLoggedIn && d.cp == -1 && locationAlreadyCheckedIn && skip_10s == false){
print(
"==== date diff is ${DateTime.now().difference(last_goal_at).inHours} ====");
if (isuserLoggedIn &&
d.cp == -1 &&
locationAlreadyCheckedIn &&
skip_10s == false) {
//check for rogaining
if (is_at_goal.value == false && rogaining_counted.value) {
//goal
@ -260,22 +267,27 @@ class DestinationController extends GetxController {
chekcs = 5;
is_at_goal.value = true;
photos.clear();
showModalBottomSheet(context: Get.context!, isScrollControlled: true,
builder:((context) => CameraPage(destination: d,))
).whenComplete((){
showModalBottomSheet(
context: Get.context!,
isScrollControlled: true,
builder: ((context) => CameraPage(
destination: d,
))).whenComplete(() {
skip_gps = false;
chekcs = 0;
is_at_goal.value = false;
});
}
else if(is_in_rog.value == false && indexController.rog_mode == 1 && DateTime.now().difference(last_goal_at).inHours >= 24){
} else if (is_in_rog.value == false &&
indexController.rog_mode == 1 &&
DateTime.now().difference(last_goal_at).inHours >= 24) {
//start
print("---- in start -----");
chekcs = 6;
is_at_start.value = true;
showModalBottomSheet(context: Get.context!, isScrollControlled: true,
builder:((context) => BottomSheetNew())
).whenComplete((){
showModalBottomSheet(
context: Get.context!,
isScrollControlled: true,
builder: ((context) => BottomSheetNew())).whenComplete(() {
print("----- finished start -------");
skip_gps = false;
chekcs = 0;
@ -299,8 +311,6 @@ class DestinationController extends GetxController {
is_gps_selected.value = true;
skip_gps = false;
_start = 0;
chekcs = 0;
rogaining_counted.value = false;
@ -312,7 +322,6 @@ class DestinationController extends GetxController {
print("===== last goal : $last_goal_at =====");
}
db.deleteAllDestinations().then((value) {
PopulateDestinations();
initGPS();
@ -338,18 +347,17 @@ class DestinationController extends GetxController {
)));
}
void getRoutePoints() {
indexController.routePoints = [];
indexController.routePointLenght.value = 0;
DestinationService.getDestinationLine(destinations, matrix)?.then((value) {
indexController.routePoints = value;
indexController.routePointLenght.value = indexController.routePoints.length;
indexController.routePointLenght.value =
indexController.routePoints.length;
});
}
Future<Destination?> getDestinationForLatLong(double lat, double long) async {
for (final d in destinations) {
if (lat == d.lat && long == d.lon) {
return d;
@ -358,12 +366,49 @@ class DestinationController extends GetxController {
return null;
}
void checkForCheckin(double la, double ln){
void CallforCheckin(Destination d) {
bool autoCheckin = d.auto_checkin == 0 ? false : true;
if (autoCheckin) {
if (!checking_in) {
print(
"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ make checkin ${d.sub_loc_id}@@@@@@@@@@@");
makeCheckin(d, true, "");
if (d.cp != -1) {
rogaining_counted.value = true;
}
skip_gps = false;
}
} else {
print("--- hidden loc ${d.hidden_location} ----");
// ask for checkin
if (d.hidden_location != null &&
d.hidden_location == 0 &&
is_in_rog.value == true &&
d.cp != -1) {
chekcs = 3;
is_in_checkin.value = true;
photos.clear();
showModalBottomSheet(
context: Get.context!,
isScrollControlled: true,
builder: ((context) => CameraPage(
destination: d,
))).whenComplete(() {
skip_gps = false;
rogaining_counted.value = true;
chekcs = 0;
is_in_checkin.value = false;
});
} else {
Get.snackbar("始まっていない", "ロゲイニングを始める必要があります");
}
}
}
void checkForCheckin(double la, double ln) {
print("--- skip_gps ---- $skip_gps----");
for (final d in destinations) {
print("--- check checkin for--loc_id- ${d.sub_loc_id}----");
double lat = d.lat!;
@ -371,7 +416,8 @@ class DestinationController extends GetxController {
LatLng p = LatLng(lat, lon);
getDestinationForLatLong(lat, lon).then((value) {
var distance = const Distance();
double dist = distance.as(LengthUnit.Meter, LatLng(lat, lon), LatLng(la, ln));
double dist =
distance.as(LengthUnit.Meter, LatLng(lat, lon), LatLng(la, ln));
//double checkin_radious = value!.checkin_radious ?? double.infinity;
//bool auto_checkin = value.auto_checkin == 0 ? false : true;
//bool location_already_checked_id = d.checkedin ?? false;
@ -386,24 +432,23 @@ class DestinationController extends GetxController {
print("---- time with ${d.location_id} ----");
startTimer(d, dist);
}
});
}
if (indexController.locations.isEmpty) return;
//check for location in bounds
for (GeoJsonFeature fs in indexController.locations[0].collection) {
GeoJsonMultiPoint mp = fs.geometry as GeoJsonMultiPoint;
LatLng pt = LatLng(mp.geoSerie!.geoPoints[0].latitude, mp.geoSerie!.geoPoints[0].longitude);
LatLng pt = LatLng(mp.geoSerie!.geoPoints[0].latitude,
mp.geoSerie!.geoPoints[0].longitude);
double latFs = pt.latitude;
double lonFs = pt.longitude;
LatLng pFs = LatLng(latFs, lonFs);
var distanceFs = const Distance();
double distFs = distanceFs.as(LengthUnit.Meter, LatLng(latFs, lonFs), LatLng(la, ln));
double distFs =
distanceFs.as(LengthUnit.Meter, LatLng(latFs, lonFs), LatLng(la, ln));
if (distFs <= 250 && skip_gps == false) {
//near a location
@ -424,10 +469,13 @@ class DestinationController extends GetxController {
is_in_rog.value = true;
}
void makeCheckin(Destination destination, bool action, String imageurl) async {
print("@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ ressssss ${destination.sub_loc_id}@@@@@@@@@@@");
void makeCheckin(
Destination destination, bool action, String imageurl) async {
print(
"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ ressssss ${destination.sub_loc_id}@@@@@@@@@@@");
DatabaseHelper db = DatabaseHelper.instance;
List<Destination> ddd = await db.getDestinationByLatLon(destination.lat!, destination.lon!);
List<Destination> ddd =
await db.getDestinationByLatLon(destination.lat!, destination.lon!);
if (ddd.isEmpty) {
destination.checkedin = true;
@ -452,11 +500,13 @@ class DestinationController extends GetxController {
String formattedDate = DateFormat('yyyy-MM-dd HH:mm:ss').format(now);
print("------ checkin event $_event_code ------");
ExternalService().makeCheckpoint(userId, _token, formattedDate, _team,cpNum.round(), _event_code, imageurl).then((value){
ExternalService()
.makeCheckpoint(userId, _token, formattedDate, _team, cpNum.round(),
_event_code, imageurl)
.then((value) {
print("------Ext service check point $value ------");
});
}
}
void initGPS() {
@ -478,17 +528,16 @@ class DestinationController extends GetxController {
"Example app will continue to receive your location even when you aren't using it",
notificationTitle: "Running in Background",
enableWakeLock: true,
)
);
} else if (defaultTargetPlatform == TargetPlatform.iOS || defaultTargetPlatform == TargetPlatform.macOS) {
));
} else if (defaultTargetPlatform == TargetPlatform.iOS ||
defaultTargetPlatform == TargetPlatform.macOS) {
locationSettings = AppleSettings(
accuracy: LocationAccuracy.bestForNavigation,
activityType: ActivityType.fitness,
distanceFilter: 0,
pauseLocationUpdatesAutomatically: false,
// Only set to true if our app will be started up in the background.
showBackgroundLocationIndicator: true
);
showBackgroundLocationIndicator: true);
} else {
locationSettings = const LocationSettings(
accuracy: LocationAccuracy.high,
@ -497,31 +546,32 @@ class DestinationController extends GetxController {
}
try {
StreamSubscription<Position> positionStream = Geolocator.getPositionStream(locationSettings: locationSettings).listen(
(Position? position) {
StreamSubscription<Position> positionStream =
Geolocator.getPositionStream(locationSettings: locationSettings)
.listen((Position? position) {
current_lat = position != null ? position.latitude : 0;
current_lon = position != null ? position.longitude : 0;
indexController.current_lat = position != null ? position.latitude : 0;
current_lon = position != null ? position.longitude : 0;
print("==== gps skip is : ${skip_gps.toString()}, selected is $is_gps_selected , $current_lat");
print(
"==== gps skip is : ${skip_gps.toString()}, selected is $is_gps_selected , $current_lat");
if (is_gps_selected.value) {
double czoom = indexController.rogMapController.zoom;
indexController.rogMapController.move(LatLng(position!.latitude, position.longitude), czoom);
indexController.rogMapController
.move(LatLng(position!.latitude, position.longitude), czoom);
//String user_id = indexController.currentUser[0]["user"]["id"].toString();
//TrackingService.addTrack(user_id, position!.latitude, position.longitude).then((val){
//print("---- postion is ${position.latitude}, ${position.longitude}");
gps.clear();
gps.add("-- lat : ${position.latitude}, lon : ${position.longitude} --");
gps.add(
"-- lat : ${position.latitude}, lon : ${position.longitude} --");
checkForCheckin(position.latitude, position.longitude);
print("--- call check checkin");
print("---- skip gps is ${skip_gps.toString()} ----");
//});
}
//print(position == null ? 'Unknown' : 'current position is ${position.latitude.toString()}, ${position.longitude.toString()}');
});
@ -533,28 +583,40 @@ class DestinationController extends GetxController {
ever(indexController.connectionStatusName, connectionChanged);
}
@override
void onInit() async {
initGPS();
super.onInit();
}
readUserToken() async{
final SharedPreferences prefs = await SharedPreferences.getInstance();
indexController.userToken = prefs.getString("user_token");
}
@override
void onReady() {
void onReady() async {
await readUserToken();
final token = indexController.userToken;
if(token != null && token.isNotEmpty){
await indexController.loadUserDetailsForToken(token);
fixMapBound(token);
return;
}
Get.toNamed(AppPages.LOGIN)!.then((value) {
if (indexController.currentUser.isNotEmpty) {
fixMapBound();
}
else {
final tk = indexController.currentUser[0]["token"];
fixMapBound(tk);
} else {
Get.toNamed(AppPages.TRAVEL);
PerfectureService.getSubExt("9").then((value) {
if (value != null) {
LatLngBounds bnds = LatLngBounds(LatLng(value[1], value[0]), LatLng(value[3], value[2]));
indexController.mapController.fitBounds(bnds); //.centerZoomFitBounds(bnds);
LatLngBounds bnds = LatLngBounds(
LatLng(value[1], value[0]), LatLng(value[3], value[2]));
indexController.mapController
.fitBounds(bnds); //.centerZoomFitBounds(bnds);
}
});
}
@ -562,13 +624,14 @@ class DestinationController extends GetxController {
super.onReady();
}
void fixMapBound(){
String _token = indexController.currentUser[0]["token"];
void fixMapBound(String token) {
//String _token = indexController.currentUser[0]["token"];
indexController.switchPage(AppPages.INITIAL);
LocationService.getLocationsExt(_token).then((value) {
LocationService.getLocationsExt(token).then((value) {
if (value != null) {
print("--- loc ext is - $value ----");
LatLngBounds bnds = LatLngBounds(LatLng(value[1], value[0]), LatLng(value[3], value[2]));
LatLngBounds bnds = LatLngBounds(
LatLng(value[1], value[0]), LatLng(value[3], value[2]));
print("--- bnds is - $bnds ----");
indexController.mapController.fitBounds(
bnds,
@ -590,20 +653,30 @@ class DestinationController extends GetxController {
value.forEach((e) async {
if (e.rog_action_type == 0) {
_res = await ExternalService().StartRogaining();
}
else if(e.rog_action_type == 1){
} else if (e.rog_action_type == 1) {
var datetime = DateTime.fromMicrosecondsSinceEpoch(e.checkintime!);
_res = await ExternalService().makeCheckpoint(e.user_id!, _token, getFormatedTime(datetime), e.team_name!, e.cp_number!, e.event_code!, e.image!);
}
else if(e.rog_action_type == 2){
_res = await ExternalService().makeCheckpoint(
e.user_id!,
_token,
getFormatedTime(datetime),
e.team_name!,
e.cp_number!,
e.event_code!,
e.image!);
} else if (e.rog_action_type == 2) {
var datetime = DateTime.fromMicrosecondsSinceEpoch(e.checkintime!);
_res = await ExternalService().makeGoal(e.user_id!, _token, e.team_name!, e.image!, getFormatedTime(datetime), e.event_code!);
_res = await ExternalService().makeGoal(
e.user_id!,
_token,
e.team_name!,
e.image!,
getFormatedTime(datetime),
e.event_code!);
}
if (_res.isNotEmpty) {
db.deleteRogaining(e.id!);
}
});
});
}
@ -657,27 +730,26 @@ class DestinationController extends GetxController {
// ---------- database ------------------///
void addDestinations(Destination dest) {
print('------ destination controller in add destination ${dest.checkin_radious} ---- :::::');
print(
'------ destination controller in add destination ${dest.checkin_radious} ---- :::::');
DatabaseHelper db = DatabaseHelper.instance;
db.getDestinationByLatLon(dest.lat!, dest.lon!).then((value) {
if (value.isNotEmpty) {
db.deleteDestination(value[0].location_id!).then((value) {
db.insertDestination(dest).then((value) {
print("----- destination controller deleted and inserted destination id $value ---- :::::");
print(
"----- destination controller deleted and inserted destination id $value ---- :::::");
PopulateDestinations();
});
});
}
else {
} else {
db.insertDestination(dest).then((value) {
print("----- destination controller added as new $value--- :::::");
PopulateDestinations();
});
}
});
}
void toggleSelection(Destination dest) async {
@ -721,36 +793,37 @@ class DestinationController extends GetxController {
indexController.routePointLenght.value = 0;
DestinationService.getDestinationLine(points, matrix)?.then((value) {
indexController.routePoints = value;
indexController.routePointLenght.value = indexController.routePoints.length;
indexController.routePointLenght.value =
indexController.routePoints.length;
//Get.toNamed(AppPages.TRAVEL);
});
destinationCount.value = destinations.length;
}
catch(_){
} catch (_) {
skip_gps = false;
return;
}
finally{
} finally {
Get.back();
}
});
}
void PopulateDestinations() {
print("--------- destination controller populsting destinations ----------- ::::::");
print(
"--------- destination controller populsting destinations ----------- ::::::");
DatabaseHelper db = DatabaseHelper.instance;
destinations.clear();
db.getDestinations().then((value) {
destinationCount.value = 0;
for (Destination d in value) {
print("------ destination controller populating destination-------- ${d.checkedin}-------- :::::");
print(
"------ destination controller populating destination-------- ${d.checkedin}-------- :::::");
print("-----populated----- ${d.toMap()}");
destinations.add(d);
}
// destinationCount.value = 0;
print("------ destination controller destinationcount-------- $destinationCount-------- :::::");
print(
"------ destination controller destinationcount-------- $destinationCount-------- :::::");
// MatrixService.getDestinations(value).then((mat){
// print(" matrix is ------- ${mat}");
@ -767,10 +840,8 @@ class DestinationController extends GetxController {
// });
});
}
void makeOrder(Destination d, int dir) {
DatabaseHelper db = DatabaseHelper.instance;
db.updateOrder(d, dir).then((value) {
@ -778,52 +849,42 @@ class DestinationController extends GetxController {
});
}
void makeNext(Destination pt) {
for (int i = 0; i <= destinations.length - 1; i++) {
Destination p = destinations[i];
if (p.lat == pt.lat && p.lon == pt.lon) {
if (indexController.currentDestinationFeature.isNotEmpty) {
indexController.currentDestinationFeature.clear();
}
if (i >= destinations.length - 1) {
indexController.currentDestinationFeature.add(destinations[0]);
//getAction();
}
else{
} else {
indexController.currentDestinationFeature.add(destinations[i + 1]);
//getAction();
}
}
}
}
void makePrevious(Destination pt) {
for (int i = 0; i <= destinations.length - 1; i++) {
Destination p = destinations[i];
if (p.lat == pt.lat && p.lon == pt.lon) {
if (indexController.currentDestinationFeature.isNotEmpty) {
indexController.currentDestinationFeature.clear();
}
if (i <= 0) {
indexController.currentDestinationFeature.add(destinations[destinations.length -1]);
indexController.currentDestinationFeature
.add(destinations[destinations.length - 1]);
//getAction();
}
else{
} else {
indexController.currentDestinationFeature.add(destinations[i - 1]);
//getAction();
}
}
}
}
}

View 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();
}),
],
),
),
);
}
}

View File

@ -20,6 +20,7 @@ import 'package:rogapp/services/cat_service.dart';
import 'package:rogapp/services/location_service.dart';
import 'package:rogapp/services/perfecture_service.dart';
import 'package:rogapp/utils/database_helper.dart';
import 'package:shared_preferences/shared_preferences.dart';
class IndexController extends GetxController {
List<GeoJsonFeatureCollection> locations = <GeoJsonFeatureCollection>[].obs;
@ -51,6 +52,8 @@ class IndexController extends GetxController {
MapController mapController = MapController();
MapController rogMapController = MapController();
String? userToken;
var mode = 0.obs;
// master mode, rog or selection
@ -195,31 +198,9 @@ void login(String email, String password, BuildContext context){
AuthService.login(email, password).then((value) {
print("------- logged in user details ######## $value ###### --------");
if (value.isNotEmpty) {
currentUser.clear();
currentUser.add(value);
is_loading.value = false;
Navigator.pop(context);
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);
print("--------- user details login ----- $value");
changeUser(value);
} else {
is_loading.value = false;
Get.snackbar(
@ -232,7 +213,6 @@ void login(String email, String password, BuildContext context){
//icon:Image(image:AssetImage("assets/images/dora.png"))
);
}
});
}
@ -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(){
customAreas.clear();

View File

@ -1,4 +1,3 @@
import 'package:flutter/material.dart';
import 'package:get/get.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/map_widget.dart';
class IndexPage extends GetView<IndexController> {
IndexPage({Key? key}) : super(key: key);
final IndexController indexController = Get.find<IndexController>();
final DestinationController destinationController = Get.find<DestinationController>();
final DestinationController destinationController =
Get.find<DestinationController>();
@override
Widget build(BuildContext context) {
@ -34,10 +33,17 @@ class IndexPage extends GetView<IndexController> {
actions: [
IconButton(
onPressed: () {
destinationController.fixMapBound();
Get.toNamed(AppPages.HISTORY);
},
icon: const Icon(Icons.refresh)
),
icon: const Icon(Icons.history)),
IconButton(
onPressed: () {
final tk = indexController.currentUser[0]["token"];
if (tk != null) {
destinationController.fixMapBound(tk);
}
},
icon: const Icon(Icons.refresh)),
InkWell(
onTap: () {
Get.toNamed(AppPages.SEARCH);
@ -48,9 +54,10 @@ class IndexPage extends GetView<IndexController> {
decoration: BoxDecoration(
color: Colors.blue,
borderRadius: BorderRadius.circular(25),
),
child: const Center(child: Icon(Icons.search),),
child: const Center(
child: Icon(Icons.search),
),
),
),
//CatWidget(indexController: indexController,),
@ -61,31 +68,41 @@ class IndexPage extends GetView<IndexController> {
mainAxisAlignment: MainAxisAlignment.end,
children: <Widget>[
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:
Obx(() =>
destinationController.is_gps_selected == true ?
Padding(
padding: const EdgeInsets.only(right: 10.0, top: 4.0, bottom: 4.0),
Obx(() => destinationController.is_gps_selected == true
? Padding(
padding: const EdgeInsets.only(
right: 10.0, top: 4.0, bottom: 4.0),
child: InkWell(
child: const Image(image: AssetImage('assets/images/route3_off.png'), width: 35, height: 35,),
onTap: (){
//indexController.switchPage(AppPages.TRAVEL);
},
child: const Image(
image: AssetImage(
'assets/images/route3_off.png'),
width: 35,
height: 35,
),
) :
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);
},
),
)
)
: 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);
},
),
))),
),
],
),
@ -96,14 +113,12 @@ class IndexPage extends GetView<IndexController> {
if (indexController.currentCat.isNotEmpty) {
print(indexController.currentCat[0].toString());
}
},
tooltip: 'Increment',
child: Obx(() =>
indexController.mode == 0 ?
const Image(image: AssetImage('assets/images/list2.png'))
:
const Image(image: AssetImage('assets/images/map.png')),
child: Obx(
() => indexController.mode == 0
? const Image(image: AssetImage('assets/images/list2.png'))
: const Image(image: AssetImage('assets/images/map.png')),
),
elevation: 4.0,
),
@ -158,18 +173,15 @@ class IndexPage extends GetView<IndexController> {
// ),
// ),
Expanded(
child: Obx(() =>
indexController.mode == 0 ?
MapWidget() :
const ListWidget(),
)
)
child: Obx(
() => indexController.mode == 0
? MapWidget()
: const ListWidget(),
))
],
),
),
),
);
}
}

View File

@ -20,8 +20,8 @@ class _PermissionHandlerScreenState extends State<PermissionHandlerScreen> {
barrierDismissible: false, // user must tap button!
builder: (BuildContext context) {
return AlertDialog(
title: Text('ロケーション許可'),
content: SingleChildScrollView(
title: const Text('ロケーション許可'),
content: const SingleChildScrollView(
child: ListBody(
children: <Widget>[
Text( 'このアプリでは、位置情報の収集を行います。'),
@ -160,8 +160,8 @@ class _PermissionHandlerScreenState extends State<PermissionHandlerScreen> {
showDialog(
context: context,
builder: (_) => AlertDialog(
title: Text('無効'),
content: SingleChildScrollView(
title: const Text('無効'),
content: const SingleChildScrollView(
child: ListBody(
children: <Widget>[
Text( '位置情報が無効になっています'),
@ -187,8 +187,8 @@ class _PermissionHandlerScreenState extends State<PermissionHandlerScreen> {
showDialog(
context: context,
builder: (_) => AlertDialog(
title: Text('ロケーション許可'),
content: SingleChildScrollView(
title: const Text('ロケーション許可'),
content: const SingleChildScrollView(
child: ListBody(
children: <Widget>[
Text( 'このアプリでは、位置情報の収集を行います。'),

View File

@ -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/destination/destination_binding.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_page.dart';
@ -48,6 +49,7 @@ class AppPages {
static const CHANGE_PASSWORD = Routes.CHANGE_PASSWORD;
static const CAMERA_PAGE = Routes.CAMERA_PAGE;
static const PROGRESS = Routes.PROGRESS;
static const HISTORY = Routes.HISTORY;
static final routes = [
// GetPage(
@ -141,6 +143,10 @@ class AppPages {
GetPage(
name: Routes.PROGRESS,
page: () => const ProgressPage(),
),
GetPage(
name: Routes.HISTORY,
page: () => const HistoryPage(),
)
];
}

View File

@ -24,4 +24,5 @@ abstract class Routes {
static const CHANGE_PASSWORD = '/change_password';
static const CAMERA_PAGE = '/camera_page';
static const PROGRESS = '/progress';
static const HISTORY = '/history';
}

View File

@ -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

View File

@ -369,7 +369,7 @@ class BottomSheetWidget extends StatelessWidget {
],
),
),
Row(
const Row(
children: [
SizedBox(height: 60.0,),
],

View File

@ -113,7 +113,7 @@ class DestinationWidget extends StatelessWidget {
buttonColor: Colors.white,
barrierDismissible: false,
radius: 10,
content: Column(
content: const Column(
children: [
],
),

File diff suppressed because it is too large Load Diff

View File

@ -18,7 +18,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
version: 1.0.16+16
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.
# To automatically upgrade your package dependencies to the latest versions
@ -39,7 +39,7 @@ dependencies:
flutter_map: any
geolocator: ^9.0.1
permission_handler: ^10.0.0
google_api_availability: ^3.0.1
google_api_availability: ^5.0.0
tuple: ^2.0.0
latlong2: ^0.8.1
positioned_tap_detector_2: ^1.0.4
@ -53,9 +53,9 @@ dependencies:
path_provider: ^2.0.8
flutter_map_location_marker: 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
image_picker: ^0.8.4+4
image_picker: ^1.0.4
#geojson_vi: ^2.0.7
geojson: ^1.0.0
url_launcher: ^6.0.20
@ -66,16 +66,16 @@ dependencies:
flutter_polyline_points: ^1.0.0
google_maps_webservice: ^0.0.19
flutter_typeahead: ^4.0.0
flutter_launcher_icons: ^0.10.0
flutter_launcher_icons: ^0.13.1
rename: ^2.0.1
circular_menu: ^2.0.1
camera_camera: ^3.0.0-dev
intl: ^0.17.0
intl: ^0.18.1
modal_bottom_sheet: ^3.0.0-pre
connectivity_plus: ^3.0.2
flutter_map_tile_caching: ^6.2.0
connectivity_plus: ^4.0.2
flutter_map_tile_caching: ^8.0.1
shared_preferences: ^2.0.15
is_lock_screen: ^2.0.0
flutter_icons:
android: true
@ -92,7 +92,7 @@ dev_dependencies:
# activated in the `analysis_options.yaml` file located at the root of your
# package. See that file for information about deactivating specific lint
# 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
# following page: https://dart.dev/tools/pub/pubspec

View File

@ -7,20 +7,23 @@
#include "generated_plugin_registrant.h"
#include <connectivity_plus/connectivity_plus_windows_plugin.h>
#include <file_selector_windows/file_selector_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 <share_plus/share_plus_windows_plugin_c_api.h>
#include <url_launcher_windows/url_launcher_windows.h>
void RegisterPlugins(flutter::PluginRegistry* registry) {
ConnectivityPlusWindowsPluginRegisterWithRegistrar(
registry->GetRegistrarForPlugin("ConnectivityPlusWindowsPlugin"));
FileSelectorWindowsRegisterWithRegistrar(
registry->GetRegistrarForPlugin("FileSelectorWindows"));
GeolocatorWindowsRegisterWithRegistrar(
registry->GetRegistrarForPlugin("GeolocatorWindows"));
IsarFlutterLibsPluginRegisterWithRegistrar(
registry->GetRegistrarForPlugin("IsarFlutterLibsPlugin"));
PermissionHandlerWindowsPluginRegisterWithRegistrar(
registry->GetRegistrarForPlugin("PermissionHandlerWindowsPlugin"));
SharePlusWindowsPluginCApiRegisterWithRegistrar(
registry->GetRegistrarForPlugin("SharePlusWindowsPluginCApi"));
UrlLauncherWindowsRegisterWithRegistrar(
registry->GetRegistrarForPlugin("UrlLauncherWindows"));
}

View File

@ -4,9 +4,10 @@
list(APPEND FLUTTER_PLUGIN_LIST
connectivity_plus
file_selector_windows
geolocator_windows
isar_flutter_libs
permission_handler_windows
share_plus
url_launcher_windows
)