map updated to 6

This commit is contained in:
2023-12-06 11:16:17 +05:30
parent 8d1c84d9fb
commit fa0587178f
19 changed files with 631 additions and 596 deletions

View File

@ -1,6 +1,6 @@
import 'dart:async'; import 'dart:async';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_map/plugin_api.dart'; import 'package:flutter_map/flutter_map.dart';
import 'package:flutter_map_location_marker/flutter_map_location_marker.dart'; import 'package:flutter_map_location_marker/flutter_map_location_marker.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:latlong2/latlong.dart'; import 'package:latlong2/latlong.dart';

View File

@ -1,8 +1,9 @@
import 'dart:io'; import 'dart:io';
import 'dart:typed_data';
import 'package:camera_camera/camera_camera.dart'; import 'package:camera_camera/camera_camera.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_map/flutter_map.dart'; import 'package:flutter_map/flutter_map.dart';
import 'package:geojson/geojson.dart'; import 'package:geojson_vi/geojson_vi.dart';
import 'package:geolocator/geolocator.dart'; import 'package:geolocator/geolocator.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import 'package:intl/intl.dart'; import 'package:intl/intl.dart';
@ -26,7 +27,8 @@ import 'dart:async';
import 'package:modal_bottom_sheet/modal_bottom_sheet.dart'; import 'package:modal_bottom_sheet/modal_bottom_sheet.dart';
import 'package:rogapp/widgets/debug_widget.dart'; import 'package:rogapp/widgets/debug_widget.dart';
import 'package:shared_preferences/shared_preferences.dart'; import 'package:shared_preferences/shared_preferences.dart';
import 'package:gallery_saver/gallery_saver.dart';
import 'package:image_gallery_saver/image_gallery_saver.dart';
class DestinationController extends GetxController { class DestinationController extends GetxController {
late LocationSettings locationSettings; late LocationSettings locationSettings;
@ -79,10 +81,9 @@ class DestinationController extends GetxController {
return DateFormat('yyyy-MM-dd HH:mm:ss').format(datetime); return DateFormat('yyyy-MM-dd HH:mm:ss').format(datetime);
} }
Destination festuretoDestination(GeoJsonFeature fs) { Destination festuretoDestination(GeoJSONFeature fs) {
GeoJsonMultiPoint mp = fs.geometry as GeoJsonMultiPoint; GeoJSONMultiPoint mp = fs.geometry as GeoJSONMultiPoint;
LatLng pt = LatLng(mp.geoSerie!.geoPoints[0].latitude, LatLng pt = LatLng(mp.coordinates[0][1], mp.coordinates[0][0]);
mp.geoSerie!.geoPoints[0].longitude);
//print("----- ${indexController.currentFeature[0].properties} -----"); //print("----- ${indexController.currentFeature[0].properties} -----");
@ -112,7 +113,7 @@ class DestinationController extends GetxController {
tags: fs.properties!["tags"]); tags: fs.properties!["tags"]);
} }
Future<void> startTimerLocation(GeoJsonFeature fs, double distance) async { Future<void> startTimerLocation(GeoJSONFeature fs, double distance) async {
//print("---- in startTimer ----"); //print("---- in startTimer ----");
// print("---- is in rog is $is_in_rog ----"); // print("---- is in rog is $is_in_rog ----");
double checkinRadious = fs.properties!['checkin_radius'] ?? double.infinity; double checkinRadious = fs.properties!['checkin_radius'] ?? double.infinity;
@ -570,32 +571,23 @@ class DestinationController extends GetxController {
// created_at: DateTime.now().microsecondsSinceEpoch); // created_at: DateTime.now().microsecondsSinceEpoch);
// await db.insertGps(gps_data); // await db.insertGps(gps_data);
for (GeoJsonFeature fs in indexController.locations[0].collection) { indexController.locations[0].features.forEach((fs) async {
GeoJsonMultiPoint mp = fs.geometry as GeoJsonMultiPoint; GeoJSONMultiPoint mp = fs!.geometry as GeoJSONMultiPoint;
LatLng pt = LatLng(mp.geoSerie!.geoPoints[0].latitude, LatLng pt = LatLng(mp.coordinates[0][1], mp.coordinates[0][0]);
mp.geoSerie!.geoPoints[0].longitude);
double latFs = pt.latitude; double latFs = pt.latitude;
double lonFs = pt.longitude; double lonFs = pt.longitude;
var distanceFs = const Distance(); var distanceFs = const Distance();
//print("--- points : ${pt.latitude}, ${pt.longitude} ----");
//print("--- points : ${pt.latitude}, ${pt.longitude} ----");
double distFs = distanceFs.as( double distFs = distanceFs.as(
LengthUnit.Meter, LatLng(latFs, lonFs), LatLng(la, ln)); LengthUnit.Meter, LatLng(latFs, lonFs), LatLng(la, ln));
Destination des = festuretoDestination(fs); Destination des = festuretoDestination(fs);
//print(
// "--- position is ---- ${position.longitude}, --- ${position.longitude}----");
//print("--- distFs ---- $distFs, --- ${des.checkin_radious}----");
if (distFs <= des.checkin_radious! && skipGps == false) { if (distFs <= des.checkin_radious! && skipGps == false) {
//print("--- 789 ---- $skip_gps----");
//near a location
//print("---- before call startTimerLocation ----");
await startTimerLocation(fs, distFs); await startTimerLocation(fs, distFs);
break; // Note: You cannot break out of forEach. If you need to stop processing, you might have to reconsider using forEach.
} }
} });
if (gps_push_started == false) { if (gps_push_started == false) {
pushGPStoServer(); pushGPStoServer();
} }
@ -644,11 +636,21 @@ class DestinationController extends GetxController {
populateDestinations(); populateDestinations();
} }
_saveImageFromPath(String imagePath) async {
// Read the image file from the given path
File imageFile = File(imagePath);
Uint8List imageBytes = await imageFile.readAsBytes();
// Save the image to the gallery
final result = await ImageGallerySaver.saveImage(imageBytes);
print(result);
}
Future<void> makeBuyPoint(Destination destination, String imageurl) async { Future<void> makeBuyPoint(Destination destination, String imageurl) async {
DatabaseHelper db = DatabaseHelper.instance; DatabaseHelper db = DatabaseHelper.instance;
await db.updateBuyPoint(destination, imageurl); await db.updateBuyPoint(destination, imageurl);
populateDestinations(); populateDestinations();
await GallerySaver.saveImage(imageurl); await _saveImageFromPath(imageurl);
if (indexController.currentUser.isNotEmpty) { if (indexController.currentUser.isNotEmpty) {
double cpNum = destination.cp!; double cpNum = destination.cp!;
@ -690,7 +692,7 @@ class DestinationController extends GetxController {
// print("~~~~ inserted into db ~~~~"); // print("~~~~ inserted into db ~~~~");
} }
await GallerySaver.saveImage(imageurl); await _saveImageFromPath(imageurl);
populateDestinations(); populateDestinations();
@ -740,14 +742,23 @@ class DestinationController extends GetxController {
double distanceToStart() { double distanceToStart() {
//print("=== gfs len == ${indexController.locations[0].collection.length}"); //print("=== gfs len == ${indexController.locations[0].collection.length}");
GeoJsonFeature gfs = indexController.locations[0].collection double distanceToDest = double.infinity;
.firstWhere((element) => festuretoDestination(element).cp == -1); if (indexController.locations[0].features.isEmpty) {
return distanceToDest;
}
GeoJSONFeature? gfs = indexController.locations[0].features.firstWhere(
(element) => festuretoDestination(element!).cp == -1,
orElse: () => null, // Provide a null value if no element is found
);
if (gfs == null) {
return distanceToDest;
}
Destination des = festuretoDestination(gfs); Destination des = festuretoDestination(gfs);
//print("=== gfs == ${des.toMap()}"); //print("=== gfs == ${des.toMap()}");
double distanceToDest = double.infinity;
var distance = const Distance(); var distance = const Distance();
distanceToDest = distance.as(LengthUnit.Meter, distanceToDest = distance.as(LengthUnit.Meter,
LatLng(currentLat, currentLon), LatLng(des.lat!, des.lon!)); LatLng(currentLat, currentLon), LatLng(des.lat!, des.lon!));
@ -761,8 +772,14 @@ class DestinationController extends GetxController {
return 500; return 500;
} }
Destination? ds; Destination? ds;
GeoJsonFeature gfs = indexController.locations[0].collection GeoJSONFeature? gfs = indexController.locations[0].features.firstWhere(
.firstWhere((element) => festuretoDestination(element).cp == -1); (element) => festuretoDestination(element!).cp == -1,
orElse: () => null, // Provide a null value if no element is found
);
if (gfs == null) {
return _retValue;
}
ds = festuretoDestination(gfs); ds = festuretoDestination(gfs);
var distance = const Distance(); var distance = const Distance();

View File

@ -1,7 +1,7 @@
import 'dart:async'; import 'dart:async';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_map/plugin_api.dart'; import 'package:flutter_map/flutter_map.dart';
import 'package:flutter_map_location_marker/flutter_map_location_marker.dart'; import 'package:flutter_map_location_marker/flutter_map_location_marker.dart';
import 'package:flutter_map_marker_popup/flutter_map_marker_popup.dart'; import 'package:flutter_map_marker_popup/flutter_map_marker_popup.dart';
import 'package:flutter_polyline_points/flutter_polyline_points.dart'; import 'package:flutter_polyline_points/flutter_polyline_points.dart';
@ -42,64 +42,61 @@ class DestinationMapPage extends StatelessWidget {
//print("^^^^ $d ^^^^"); //print("^^^^ $d ^^^^");
Marker m = Marker( Marker m = Marker(
point: LatLng(d.lat!, d.lon!), point: LatLng(d.lat!, d.lon!),
anchorPos: AnchorPos.align(AnchorAlign.center), alignment: Alignment.topCenter,
builder: (cts) { child: InkWell(
return InkWell( onTap: () {
onTap: () { //print("-- Destination is --- ${d.name} ------");
//print("-- Destination is --- ${d.name} ------"); if (indexController.currentDestinationFeature.isNotEmpty) {
if (indexController.currentDestinationFeature.isNotEmpty) { indexController.currentDestinationFeature.clear();
indexController.currentDestinationFeature.clear(); }
} indexController.currentDestinationFeature.add(d);
indexController.currentDestinationFeature.add(d); //indexController.getAction();
//indexController.getAction();
showModalBottomSheet( showModalBottomSheet(
context: Get.context!, context: Get.context!,
isScrollControlled: true, isScrollControlled: true,
constraints: BoxConstraints.loose( constraints:
Size(Get.width, Get.height * 0.85)), BoxConstraints.loose(Size(Get.width, Get.height * 0.85)),
builder: ((context) => BottomSheetNew( builder: ((context) => BottomSheetNew(
destination: d, destination: d,
))).whenComplete(() { ))).whenComplete(() {
//print("---- set skip gps to false -----"); //print("---- set skip gps to false -----");
destinationController.skipGps = false; destinationController.skipGps = false;
}); });
}, },
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
Container( Container(
width: 20, width: 20,
height: 20, height: 20,
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.red, color: Colors.red,
shape: BoxShape.circle, shape: BoxShape.circle,
border: Border.all( border: Border.all(
color: Colors.white, color: Colors.white,
width: width: d.checkin_radious != null ? d.checkin_radious! : 1,
d.checkin_radious != null ? d.checkin_radious! : 1,
),
),
child: Center(
child: Text(
(i + 1).toString(),
style: const TextStyle(color: Colors.white),
),
), ),
), ),
Container( child: Center(
color: Colors.yellow, child: Text(
child: Text( (i + 1).toString(),
TextUtils.getDisplayText(d), style: const TextStyle(color: Colors.white),
style: const TextStyle( ),
fontSize: 15.0, ),
fontWeight: FontWeight.bold, ),
overflow: TextOverflow.visible), Container(
)), color: Colors.yellow,
], child: Text(
), TextUtils.getDisplayText(d),
); style: const TextStyle(
}); fontSize: 15.0,
fontWeight: FontWeight.bold,
overflow: TextOverflow.visible),
)),
],
),
));
pts.add(m); pts.add(m);
} }

View File

@ -126,19 +126,11 @@ class _GpsPageState extends State<GpsPage> {
MarkerLayer( MarkerLayer(
markers: gpsData.map((i) { markers: gpsData.map((i) {
return Marker( return Marker(
anchorPos: AnchorPos.exactly(Anchor(108.0, 18.0)), alignment: Alignment.topCenter,
height: 32.0, height: 32.0,
width: 120.0, width: 120.0,
point: LatLng(i.lat, i.lon), point: LatLng(i.lat, i.lon),
builder: (ctx) { child: getMarkerShape(i));
return getMarkerShape(i);
// return Container(
// width: 40,
// height: 40,
// color: Colors.orange,
// );
},
);
}).toList(), }).toList(),
) )
], ],

View File

@ -4,9 +4,8 @@ import 'package:connectivity_plus/connectivity_plus.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:flutter_map/flutter_map.dart'; import 'package:flutter_map/flutter_map.dart';
import 'package:flutter_map/plugin_api.dart';
import 'package:flutter_polyline_points/flutter_polyline_points.dart'; import 'package:flutter_polyline_points/flutter_polyline_points.dart';
import 'package:geojson/geojson.dart'; import 'package:geojson_vi/geojson_vi.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import 'package:latlong2/latlong.dart'; import 'package:latlong2/latlong.dart';
import 'package:rogapp/model/destination.dart'; import 'package:rogapp/model/destination.dart';
@ -18,8 +17,8 @@ import 'package:rogapp/utils/database_helper.dart';
import 'package:shared_preferences/shared_preferences.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;
List<GeoJsonFeature> currentFeature = <GeoJsonFeature>[].obs; List<GeoJSONFeature> currentFeature = <GeoJSONFeature>[].obs;
List<Destination> currentDestinationFeature = <Destination>[].obs; List<Destination> currentDestinationFeature = <Destination>[].obs;
List<dynamic> perfectures = <dynamic>[].obs; List<dynamic> perfectures = <dynamic>[].obs;
List<LatLngBounds> currentBound = <LatLngBounds>[].obs; List<LatLngBounds> currentBound = <LatLngBounds>[].obs;
@ -311,7 +310,7 @@ class IndexController extends GetxController {
if (value == null) { if (value == null) {
return; return;
} }
if (value.collection.isEmpty) { if (value.features.isEmpty) {
if (showPopup == false) { if (showPopup == false) {
return; return;
} }
@ -328,7 +327,7 @@ class IndexController extends GetxController {
showPopup = false; showPopup = false;
//Get.showSnackbar(GetSnackBar(message: "Too many points, please zoom in",)); //Get.showSnackbar(GetSnackBar(message: "Too many points, please zoom in",));
} }
if (value.collection.isNotEmpty) { if (value.features.isNotEmpty) {
////print("---- added---"); ////print("---- added---");
locations.add(value); locations.add(value);
} }
@ -340,15 +339,18 @@ class IndexController extends GetxController {
currentBound.add(bounds); currentBound.add(bounds);
} }
GeoJsonFeature? getFeatureForLatLong(double lat, double long) { GeoJSONFeature? getFeatureForLatLong(double lat, double long) {
if (locations.isNotEmpty) { if (locations.isNotEmpty) {
for (GeoJsonFeature i in locations[0].collection) { GeoJSONFeature? foundFeature;
GeoJsonMultiPoint p = i.geometry as GeoJsonMultiPoint;
if (p.geoSerie!.geoPoints[0].latitude == lat && locations[0].features.forEach((i) {
p.geoSerie!.geoPoints[0].longitude == long) { GeoJSONMultiPoint p = i!.geometry as GeoJSONMultiPoint;
return i; if (p.coordinates[0][1] == lat && p.coordinates[0][0] == long) {
foundFeature = i;
} }
} });
return foundFeature;
} }
return null; return null;
} }

View File

@ -1,23 +1,21 @@
import 'package:geojson/geojson.dart'; import 'package:geojson_vi/geojson_vi.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import 'package:rogapp/pages/index/index_controller.dart'; import 'package:rogapp/pages/index/index_controller.dart';
class SearchBarController extends GetxController { class SearchBarController extends GetxController {
List<GeoJSONFeature> searchResults = <GeoJSONFeature>[].obs;
List<GeoJsonFeature> searchResults = <GeoJsonFeature>[].obs; @override
@override
void onInit() { void onInit() {
IndexController indexController = Get.find<IndexController>(); IndexController indexController = Get.find<IndexController>();
if(indexController.locations.isNotEmpty){ if (indexController.locations.isNotEmpty) {
for(int i=0; i<= indexController.locations[0].collection.length - 1; i++){ for (int i = 0;
GeoJsonFeature p = indexController.locations[0].collection[i]; i <= indexController.locations[0].features.length - 1;
i++) {
GeoJSONFeature p = indexController.locations[0].features[i]!;
searchResults.add(p); searchResults.add(p);
} }
} }
super.onInit(); super.onInit();
} }
} }

View File

@ -1,6 +1,6 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_typeahead/flutter_typeahead.dart'; import 'package:flutter_typeahead/flutter_typeahead.dart';
import 'package:geojson/geojson.dart'; import 'package:geojson_vi/geojson_vi.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import 'package:rogapp/model/destination.dart'; import 'package:rogapp/model/destination.dart';
import 'package:rogapp/pages/destination/destination_controller.dart'; import 'package:rogapp/pages/destination/destination_controller.dart';
@ -48,46 +48,32 @@ class SearchPage extends StatelessWidget {
//title: const CupertinoSearchTextField(), //title: const CupertinoSearchTextField(),
), ),
body: SingleChildScrollView( body: SingleChildScrollView(
child: TypeAheadField( child: TypeAheadField<GeoJSONFeature>(
textFieldConfiguration: TextFieldConfiguration( // textFieldConfiguration: TextFieldConfiguration(
autofocus: true, // autofocus: true,
style: DefaultTextStyle.of(context).style.copyWith( // style: DefaultTextStyle.of(context).style.copyWith(
fontStyle: FontStyle.normal, // fontStyle: FontStyle.normal,
fontSize: 15.0, // fontSize: 15.0,
), // ),
decoration: InputDecoration( // decoration: InputDecoration(
border: const OutlineInputBorder(), // border: const OutlineInputBorder(),
hintText: "検索", // hintText: "検索",
prefixIcon: const Icon(Icons.search), // prefixIcon: const Icon(Icons.search),
suffixIcon: IconButton( // suffixIcon: IconButton(
icon: const Icon(Icons.clear), // icon: const Icon(Icons.clear),
onPressed: () { // onPressed: () {
// clear the text field // // clear the text field
}, // },
), // ),
), // ),
), // ),
suggestionsCallback: (pattern) async { onSelected: (GeoJSONFeature suggestion) {
return searchController.searchResults.where(
(GeoJsonFeature element) => element.properties!["location_name"]
.toString()
.contains(pattern));
//return await
},
itemBuilder: (context, GeoJsonFeature suggestion) {
return ListTile(
title: Text(suggestion.properties!["location_name"]),
subtitle: suggestion.properties!["category"] != null
? Text(suggestion.properties!["category"])
: const Text(""),
//leading: getImage(index),
);
},
onSuggestionSelected: (GeoJsonFeature suggestion) {
indexController.currentFeature.clear(); indexController.currentFeature.clear();
indexController.currentFeature.add(suggestion); indexController.currentFeature.add(suggestion);
DestinationController destinationController = Get.find<DestinationController>(); DestinationController destinationController =
Destination des = destinationController.festuretoDestination(suggestion); Get.find<DestinationController>();
Destination des =
destinationController.festuretoDestination(suggestion);
Get.back(); Get.back();
showModalBottomSheet( showModalBottomSheet(
constraints: constraints:
@ -95,7 +81,28 @@ class SearchPage extends StatelessWidget {
isScrollControlled: true, isScrollControlled: true,
context: context, context: context,
//builder: (context) => BottomSheetWidget(), //builder: (context) => BottomSheetWidget(),
builder: ((context) => BottomSheetNew(destination: des,))); builder: ((context) => BottomSheetNew(
destination: des,
)));
},
suggestionsCallback: (pattern) async {
return searchController.searchResults
.where((GeoJSONFeature element) => element
.properties!["location_name"]
.toString()
.contains(pattern))
.toList();
//return await
},
itemBuilder: (context, GeoJSONFeature suggestion) {
return ListTile(
title: Text(suggestion.properties!["location_name"]),
subtitle: suggestion.properties!["category"] != null
? Text(suggestion.properties!["category"])
: const Text(""),
//leading: getImage(index),
);
}, },
), ),
), ),

View File

@ -1,32 +1,32 @@
import 'package:geojson/geojson.dart'; // import 'package:geojson/geojson.dart';
import 'package:http/http.dart' as http; // import 'package:http/http.dart' as http;
import '../utils/const.dart'; // import '../utils/const.dart';
class LocationLineService { // class LocationLineService {
static Future<GeoJsonFeature?> loadLocationLines() async { // static Future<GeoJsonFeature?> loadLocationLines() async {
final geo = GeoJson(); // final geo = GeoJson();
GeoJsonFeature? fs; // GeoJsonFeature? fs;
String serverUrl = ConstValues.currentServer(); // String serverUrl = ConstValues.currentServer();
String url = '$serverUrl/api/location_line/'; // String url = '$serverUrl/api/location_line/';
//print('++++++++$url'); // //print('++++++++$url');
final response = await http.get( // final response = await http.get(
Uri.parse(url), // Uri.parse(url),
headers: <String, String>{ // headers: <String, String>{
'Content-Type': 'application/json; charset=UTF-8', // 'Content-Type': 'application/json; charset=UTF-8',
}, // },
); // );
if (response.statusCode == 200) { // if (response.statusCode == 200) {
geo.processedFeatures.listen((fst) { // geo.processedFeatures.listen((fst) {
fs = fst; // fs = fst;
}); // });
await geo.parse(response.body, verbose: true); // await geo.parse(response.body, verbose: true);
return fs; // return fs;
} else { // } else {
throw Exception('Failed to create album.'); // throw Exception('Failed to create album.');
} // }
} // }
} // }

View File

@ -1,33 +1,33 @@
import 'package:geojson/geojson.dart'; // import 'package:geojson/geojson.dart';
import 'package:http/http.dart' as http; // import 'package:http/http.dart' as http;
import '../utils/const.dart'; // import '../utils/const.dart';
class LocationPolygonervice { // class LocationPolygonervice {
static Future<GeoJsonFeature?> loadLocationLines() async { // static Future<GeoJsonFeature?> loadLocationLines() async {
final geo = GeoJson(); // final geo = GeoJson();
GeoJsonFeature? fs; // GeoJsonFeature? fs;
String serverUrl = ConstValues.currentServer(); // String serverUrl = ConstValues.currentServer();
String url = '$serverUrl/api/location_polygon/'; // String url = '$serverUrl/api/location_polygon/';
//print('++++++++$url'); // //print('++++++++$url');
final response = await http.get( // final response = await http.get(
Uri.parse(url), // Uri.parse(url),
headers: <String, String>{ // headers: <String, String>{
'Content-Type': 'application/json; charset=UTF-8', // 'Content-Type': 'application/json; charset=UTF-8',
}, // },
); // );
if (response.statusCode == 200) { // if (response.statusCode == 200) {
geo.processedFeatures.listen((fst) { // geo.processedFeatures.listen((fst) {
fs = fst; // fs = fst;
}); // });
await geo.parse(response.body, verbose: true); // await geo.parse(response.body, verbose: true);
return fs; // return fs;
} else { // } else {
throw Exception('Failed to create album.'); // throw Exception('Failed to create album.');
} // }
} // }
} // }

View File

@ -1,39 +1,13 @@
import 'dart:convert'; import 'dart:convert';
import 'package:geojson_vi/geojson_vi.dart';
import 'package:geojson/geojson.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import 'package:http/http.dart' as http; import 'package:http/http.dart' as http;
import 'package:rogapp/pages/destination/destination_controller.dart';
import 'package:rogapp/pages/index/index_controller.dart'; import 'package:rogapp/pages/index/index_controller.dart';
import 'package:rogapp/utils/const.dart'; import 'package:rogapp/utils/const.dart';
class LocationService { class LocationService {
// static Future<GeoJsonFeatureCollection?> loadLocations() async { static Future<GeoJSONFeatureCollection?> loadLocationsFor(
// final IndexController indexController = Get.find<IndexController>();
// String server_url = ConstValues.currentServer();
// String url = "";
// if(indexController.currentUser.length > 0){
// url = '${server_url}/api/location/?is_rog=True';
// }
// else {
// url = '${server_url}/api/location/';
// }
// //String url = 'http://localhost:8100/api/location/';
// final response = await http.get(Uri.parse(url),
// headers: <String, String>{
// 'Content-Type': 'application/json; charset=UTF-8',
// },
// );
// if (response.statusCode == 200) {
// return featuresFromGeoJson(utf8.decode(response.bodyBytes));
// }
// return null;
// }
static Future<GeoJsonFeatureCollection?> loadLocationsFor(
String perfecture, String cat) async { String perfecture, String cat) async {
final IndexController indexController = Get.find<IndexController>(); final IndexController indexController = Get.find<IndexController>();
String url = ""; String url = "";
@ -67,8 +41,8 @@ class LocationService {
); );
if (response.statusCode == 200) { if (response.statusCode == 200) {
GeoJsonFeatureCollection cc = GeoJSONFeatureCollection cc =
await featuresFromGeoJson(utf8.decode(response.bodyBytes)); GeoJSONFeatureCollection.fromJSON(utf8.decode(response.bodyBytes));
//print(cc); //print(cc);
return cc; //featuresFromGeoJson(utf8.decode(response.bodyBytes)); return cc; //featuresFromGeoJson(utf8.decode(response.bodyBytes));
} }
@ -95,48 +69,7 @@ class LocationService {
return ext; return ext;
} }
static Future<GeoJsonFeatureCollection?> loadLocationsSubFor( static Future<GeoJSONFeatureCollection?> loadLocationsBound(
String subperfecture, String cat) async {
final IndexController indexController = Get.find<IndexController>();
String url = "";
String serverUrl = ConstValues.currentServer();
if (cat.isNotEmpty) {
if (indexController.currentUser.isNotEmpty) {
bool rog = indexController.currentUser[0]['user']['is_rogaining'];
String r = rog == true ? 'True' : 'False';
var grp = indexController.currentUser[0]['user']['event_code'];
url = '$serverUrl/api/insubperf?rog=$r&subperf=$subperfecture&cat=$cat';
} else {
url = '$serverUrl/api/insubperf?subperf=$subperfecture&cat=$cat';
}
} else {
if (indexController.currentUser.isNotEmpty) {
bool rog = indexController.currentUser[0]['user']['is_rogaining'];
String r = rog == true ? 'True' : 'False';
var grp = indexController.currentUser[0]['user']['event_code'];
url = '$serverUrl/api/insubperf?rog=$r&subperf=$subperfecture';
} else {
url = '$serverUrl/api/insubperf?subperf=$subperfecture';
}
}
//print('++++++++$url');
final response = await http.get(
Uri.parse(url),
headers: <String, String>{
'Content-Type': 'application/json; charset=UTF-8',
},
);
if (response.statusCode == 200) {
GeoJsonFeatureCollection cc =
await featuresFromGeoJson(utf8.decode(response.bodyBytes));
//print(cc);
return cc; //featuresFromGeoJson(utf8.decode(response.bodyBytes));
}
return null;
}
static Future<GeoJsonFeatureCollection?> loadLocationsBound(
double lat1, double lat1,
double lon1, double lon1,
double lat2, double lat2,
@ -183,13 +116,15 @@ class LocationService {
); );
if (response.statusCode == 500) { if (response.statusCode == 500) {
return GeoJsonFeatureCollection(); //featuresFromGeoJson(utf8.decode(response.bodyBytes)); return null; //featuresFromGeoJson(utf8.decode(response.bodyBytes));
} }
if (response.statusCode == 200) { if (response.statusCode == 200) {
GeoJsonFeatureCollection cc = DestinationController destinationController =
await featuresFromGeoJson(utf8.decode(response.bodyBytes)); Get.find<DestinationController>();
if (cc.collection.isEmpty) { GeoJSONFeatureCollection cc =
GeoJSONFeatureCollection.fromJSON(utf8.decode(response.bodyBytes));
if (cc.features.isEmpty) {
return null; return null;
} else { } else {
//print("---- feature got from server is ${cc.collection[0].properties} ------"); //print("---- feature got from server is ${cc.collection[0].properties} ------");
@ -199,7 +134,7 @@ class LocationService {
return null; return null;
} }
static Future<GeoJsonFeatureCollection?> loadCustomLocations( static Future<GeoJSONFeatureCollection?> loadCustomLocations(
String name, String cat) async { String name, String cat) async {
final IndexController indexController = Get.find<IndexController>(); final IndexController indexController = Get.find<IndexController>();
String url = ""; String url = "";
@ -236,13 +171,13 @@ class LocationService {
); );
if (response.statusCode == 500) { if (response.statusCode == 500) {
return GeoJsonFeatureCollection(); //featuresFromGeoJson(utf8.decode(response.bodyBytes)); return null; //featuresFromGeoJson(utf8.decode(response.bodyBytes));
} }
if (response.statusCode == 200) { if (response.statusCode == 200) {
GeoJsonFeatureCollection cc = GeoJSONFeatureCollection cc =
await featuresFromGeoJson(utf8.decode(response.bodyBytes)); GeoJSONFeatureCollection.fromJSON(utf8.decode(response.bodyBytes));
if (cc.collection.isEmpty) { if (cc.features.isEmpty) {
return null; return null;
} else { } else {
return cc; return cc;

View File

@ -0,0 +1,145 @@
import 'dart:async';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:geolocator/geolocator.dart';
class LocationController extends GetxController {
// Reactive variable to hold the current position
Rx<Position?> currentPosition = Rx<Position?>(null);
// Subscription to the position stream
StreamSubscription<Position>? positionStream;
bool isStreamPaused = false;
@override
void onInit() {
super.onInit();
// Start listening to location updates when the controller is initialized
startPositionStream();
}
void startPositionStream() async {
// Check for location service and permissions before starting the stream
bool serviceEnabled = await Geolocator.isLocationServiceEnabled();
if (!serviceEnabled) {
// Use GetX's context to show a dialog
Get.dialog(
AlertDialog(
title: const Text('Location Services Disabled'),
content: const Text(
'Please enable location services to continue using the app.'),
actions: <Widget>[
TextButton(
child: const Text('OK'),
onPressed: () {
// Close the dialog
Get.back();
// Optionally, you can direct the user to the settings page
// Geolocator.openLocationSettings();
},
),
],
),
barrierDismissible: false, // User must tap button to close dialog
);
return;
}
LocationPermission permission = await Geolocator.checkPermission();
if (permission == LocationPermission.denied) {
permission = await Geolocator.requestPermission();
if (permission == LocationPermission.denied) {
// Show a dialog if permissions are still denied
Get.dialog(
AlertDialog(
title: const Text('Location Permission Denied'),
content: const Text(
'This app requires location permissions to function properly. Please enable location permissions in your device settings.'),
actions: <Widget>[
TextButton(
child: const Text('OK'),
onPressed: () {
// Close the dialog
Get.back();
// Optionally, direct the user to the app settings
// Geolocator.openAppSettings();
},
),
],
),
barrierDismissible: false,
);
return;
}
}
if (permission == LocationPermission.deniedForever) {
// Show a dialog if permissions are permanently denied
Get.dialog(
AlertDialog(
title: const Text('Location Permission Needed'),
content: const Text(
'Location permissions have been permanently denied. Please open app settings to enable location permissions.'),
actions: <Widget>[
TextButton(
child: const Text('Open Settings'),
onPressed: () {
// Close the dialog and open app settings
Get.back();
Geolocator.openAppSettings();
},
),
],
),
barrierDismissible: false,
);
return;
}
// Set up the location options
const locationOptions = LocationSettings(
accuracy: LocationAccuracy.bestForNavigation,
distanceFilter: 0,
timeLimit: Duration(microseconds: 2500),
);
// Start listening to the position stream
positionStream =
Geolocator.getPositionStream(locationSettings: locationOptions).listen(
(Position position) {
currentPosition.value = position;
}, onError: (e) {
// Handle errors or exceptions in the stream
// You might want to log this error or use a state to show error messages
});
// Resume stream if it was paused previously
if (isStreamPaused) {
positionStream?.resume();
isStreamPaused = false;
}
}
// Method to stop the position stream
void stopPositionStream() {
if (positionStream != null) {
positionStream!.pause();
isStreamPaused = true;
}
}
// Method to resume the position stream
void resumePositionStream() {
if (positionStream != null && isStreamPaused) {
positionStream!.resume();
isStreamPaused = false;
}
}
@override
void onClose() {
// Cancel the position stream subscription when the controller is closed
positionStream?.cancel();
super.onClose();
}
}

View File

@ -1,8 +1,8 @@
import 'package:geojson/geojson.dart'; import 'package:geojson_vi/geojson_vi.dart';
import 'package:rogapp/model/destination.dart'; import 'package:rogapp/model/destination.dart';
class TextUtils { class TextUtils {
static String getDisplayTextFeture(GeoJsonFeature f) { static String getDisplayTextFeture(GeoJSONFeature f) {
RegExp regex = RegExp(r'([.]*0)(?!.*\d)'); RegExp regex = RegExp(r'([.]*0)(?!.*\d)');
String txt = ""; String txt = "";
// if(f.properties!["cp"] > 0){ // if(f.properties!["cp"] > 0){

View File

@ -8,17 +8,14 @@ class BaseLayer extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return TileLayer( return TileLayer(
urlTemplate: "https://cyberjapandata.gsi.go.jp/xyz/std/{z}/{x}/{y}.png", urlTemplate: "https://cyberjapandata.gsi.go.jp/xyz/std/{z}/{x}/{y}.png",
tileProvider: FMTC.instance('OpenStreetMap (A)').getTileProvider( tileProvider: FMTC.instance('OpenStreetMap (A)').getTileProvider(
FMTCTileProviderSettings( settings: FMTCTileProviderSettings(
behavior: CacheBehavior.values behavior: CacheBehavior.values.byName('cacheFirst'),
.byName('cacheFirst'), cachedValidDuration: const Duration(days: 14),
cachedValidDuration: const Duration( ),
days: 14 ),
), );
),
),
);
} }
} }

View File

@ -1,11 +1,8 @@
import 'package:geojson_vi/geojson_vi.dart';
import 'package:geojson/geojson.dart';
import 'package:get/get_state_manager/get_state_manager.dart'; import 'package:get/get_state_manager/get_state_manager.dart';
class BottomSheetController extends GetxController{ class BottomSheetController extends GetxController {
List<GeoJSONFeature>? currentFeature = <GeoJSONFeature>[];
List<GeoJsonFeature>? currentFeature = <GeoJsonFeature>[];
BottomSheetController({this.currentFeature}); BottomSheetController({this.currentFeature});
} }

View File

@ -1,7 +1,6 @@
import 'dart:ffi';
import 'dart:ui' as ui; import 'dart:ui' as ui;
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:geojson/geojson.dart'; import 'package:geojson_vi/geojson_vi.dart';
import 'package:geolocator/geolocator.dart'; import 'package:geolocator/geolocator.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import 'package:image_picker/image_picker.dart'; import 'package:image_picker/image_picker.dart';
@ -11,14 +10,12 @@ import 'package:rogapp/model/destination.dart';
import 'package:rogapp/pages/camera/camera_page.dart'; import 'package:rogapp/pages/camera/camera_page.dart';
import 'package:rogapp/pages/destination/destination_controller.dart'; import 'package:rogapp/pages/destination/destination_controller.dart';
import 'package:rogapp/pages/index/index_controller.dart'; import 'package:rogapp/pages/index/index_controller.dart';
import 'package:rogapp/routes/app_pages.dart';
import 'package:rogapp/services/external_service.dart'; import 'package:rogapp/services/external_service.dart';
import 'package:rogapp/utils/const.dart'; import 'package:rogapp/utils/const.dart';
import 'package:rogapp/utils/database_helper.dart'; import 'package:rogapp/utils/database_helper.dart';
import 'package:rogapp/utils/text_util.dart'; import 'package:rogapp/utils/text_util.dart';
import 'package:rogapp/widgets/bottom_sheet_controller.dart'; import 'package:rogapp/widgets/bottom_sheet_controller.dart';
import 'package:rogapp/widgets/debug_widget.dart'; import 'package:rogapp/widgets/debug_widget.dart';
import 'package:sqflite/sqflite.dart';
import 'package:url_launcher/url_launcher.dart'; import 'package:url_launcher/url_launcher.dart';
class BottomSheetNew extends GetView<BottomSheetController> { class BottomSheetNew extends GetView<BottomSheetController> {
@ -65,7 +62,7 @@ class BottomSheetNew extends GetView<BottomSheetController> {
} }
} }
} else { } else {
GeoJsonFeature<dynamic> gf = indexController.currentFeature[0]; GeoJSONFeature gf = indexController.currentFeature[0];
//print("=== photo sss ${gf.properties!["photos"]}"); //print("=== photo sss ${gf.properties!["photos"]}");
if (gf.properties!["photos"] == null || gf.properties!["photos"] == "") { if (gf.properties!["photos"] == null || gf.properties!["photos"] == "") {
return const Image(image: AssetImage('assets/images/empty_image.png')); return const Image(image: AssetImage('assets/images/empty_image.png'));
@ -584,9 +581,8 @@ class BottomSheetNew extends GetView<BottomSheetController> {
onPressed: () async { onPressed: () async {
Get.back(); Get.back();
//print("---- go to ----"); //print("---- go to ----");
GeoJsonFeature<GeoJsonMultiPoint> mp = GeoJSONMultiPoint mp = indexController
indexController.currentFeature[0] .currentFeature[0] as GeoJSONMultiPoint;
as GeoJsonFeature<GeoJsonMultiPoint>;
Position position = Position position =
await Geolocator.getCurrentPosition( await Geolocator.getCurrentPosition(
desiredAccuracy: desiredAccuracy:
@ -598,10 +594,8 @@ class BottomSheetNew extends GetView<BottomSheetController> {
lon: position.longitude); lon: position.longitude);
Destination tp = Destination( Destination tp = Destination(
lat: mp.geometry!.geoSerie!.geoPoints[0] lat: mp.coordinates[0][1],
.latitude, lon: mp.coordinates[0][0]);
lon: mp.geometry!.geoSerie!.geoPoints[0]
.longitude);
destinationController destinationController
.destinationMatrixFromCurrentPoint([ds, tp]); .destinationMatrixFromCurrentPoint([ds, tp]);

View File

@ -1,5 +1,5 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:geojson/geojson.dart'; import 'package:geojson_vi/geojson_vi.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import 'package:rogapp/model/destination.dart'; import 'package:rogapp/model/destination.dart';
import 'package:rogapp/pages/destination/destination_controller.dart'; import 'package:rogapp/pages/destination/destination_controller.dart';
@ -22,16 +22,15 @@ class _ListWidgetState extends State<ListWidget> {
Get.find<DestinationController>(); Get.find<DestinationController>();
Image getImage(int index) { Image getImage(int index) {
if (indexController.locations[0].collection[index].properties!["photos"] == if (indexController.locations[0].features[index]!.properties!["photos"] ==
null || null ||
indexController.locations[0].collection[index].properties!["photos"] == indexController.locations[0].features[index]!.properties!["photos"] ==
"") { "") {
return const Image(image: AssetImage('assets/images/empty_image.png')); return const Image(image: AssetImage('assets/images/empty_image.png'));
} else { } else {
//print("==== photo index is $index ==="); //print("==== photo index is $index ===");
String serverUrl = ConstValues.currentServer(); String serverUrl = ConstValues.currentServer();
GeoJsonFeature<dynamic> gf = GeoJSONFeature gf = indexController.locations[0].features[index]!;
indexController.locations[0].collection[index];
String photo = gf.properties!["photos"]; String photo = gf.properties!["photos"];
return Image( return Image(
image: NetworkImage('$serverUrl/media/compressed/$photo'), image: NetworkImage('$serverUrl/media/compressed/$photo'),
@ -43,7 +42,7 @@ class _ListWidgetState extends State<ListWidget> {
} }
} }
void changeCurrentFeature(GeoJsonFeature fs) { void changeCurrentFeature(GeoJSONFeature fs) {
if (indexController.currentFeature.isNotEmpty) { if (indexController.currentFeature.isNotEmpty) {
indexController.currentFeature.clear(); indexController.currentFeature.clear();
} }
@ -55,14 +54,14 @@ class _ListWidgetState extends State<ListWidget> {
super.initState(); super.initState();
} }
Destination createDestination(GeoJsonFeature feature) { Destination createDestination(GeoJSONFeature feature) {
final props = feature.properties; final props = feature.properties;
GeoJsonMultiPoint pt = feature.geometry; GeoJSONMultiPoint pt = feature.geometry as GeoJSONMultiPoint;
return Destination( return Destination(
cp: props!['cp'], cp: props!['cp'],
lat: pt.geoSerie!.geoPoints.first.latitude, lat: pt.coordinates[0][1],
lon: pt.geoSerie!.geoPoints.first.longitude, lon: pt.coordinates[0][0],
); );
} }
@ -72,7 +71,7 @@ class _ListWidgetState extends State<ListWidget> {
lat: indexController.currentLat, lon: indexController.currentLon); lat: indexController.currentLat, lon: indexController.currentLon);
//Destination dest1 = createDestination(indexController.locations[0].collection[0]); //Destination dest1 = createDestination(indexController.locations[0].collection[0]);
Destination dest2 = Destination dest2 =
createDestination(indexController.locations[0].collection[i]); createDestination(indexController.locations[0].features[i]!);
// Get the distance between these two destinations // Get the distance between these two destinations
final res = await MatrixService.getDestinations([desCurr, dest2]); final res = await MatrixService.getDestinations([desCurr, dest2]);
@ -83,9 +82,9 @@ class _ListWidgetState extends State<ListWidget> {
Future<void> _pullRefresh() async { Future<void> _pullRefresh() async {
//print("pull to refesh"); //print("pull to refesh");
indexController.locations[0].collection.sort((a, b) => indexController.locations[0].features.sort((a, b) =>
(a.properties!['cp'] as Comparable) (a!.properties!['cp'] as Comparable)
.compareTo(b.properties!['cp'] as Comparable)); .compareTo(b!.properties!['cp'] as Comparable));
setState(() {}); setState(() {});
} }
@ -96,12 +95,12 @@ class _ListWidgetState extends State<ListWidget> {
? RefreshIndicator( ? RefreshIndicator(
onRefresh: _pullRefresh, onRefresh: _pullRefresh,
child: ListView.builder( child: ListView.builder(
itemCount: indexController.locations[0].collection.length, itemCount: indexController.locations[0].features.length,
shrinkWrap: true, shrinkWrap: true,
itemBuilder: (_, index) { itemBuilder: (_, index) {
bool isFound = false; bool isFound = false;
for (Destination d in destinationController.destinations) { for (Destination d in destinationController.destinations) {
if (indexController.locations[0].collection[index] if (indexController.locations[0].features[index]!
.properties!['location_id'] == .properties!['location_id'] ==
d.location_id) { d.location_id) {
isFound = true; isFound = true;
@ -113,8 +112,8 @@ class _ListWidgetState extends State<ListWidget> {
selected: isFound, selected: isFound,
selectedTileColor: Colors.yellow.shade200, selectedTileColor: Colors.yellow.shade200,
onTap: () { onTap: () {
GeoJsonFeature gf = GeoJSONFeature gf =
indexController.locations[0].collection[index]; indexController.locations[0].features[index]!;
Destination des = Destination des =
destinationController.festuretoDestination(gf); destinationController.festuretoDestination(gf);
changeCurrentFeature(gf); changeCurrentFeature(gf);
@ -129,29 +128,27 @@ class _ListWidgetState extends State<ListWidget> {
))); )));
}, },
leading: getImage(index), leading: getImage(index),
title: indexController.locations[0].collection[index] title: indexController.locations[0].features[index]!
.properties!['location_name'] != .properties!['location_name'] !=
null null
? Text(indexController.locations[0] ? Text(indexController.locations[0].features[index]!
.collection[index].properties!['location_name'] .properties!['location_name']
.toString()) .toString())
: const Text(""), : const Text(""),
subtitle: indexController.locations[0].collection[index] subtitle: indexController.locations[0].features[index]!
.properties!['category'] != .properties!['category'] !=
null null
? Text(indexController.locations[0] ? Text(indexController.locations[0].features[index]!
.collection[index].properties!['category']) .properties!['category'])
: const Text(""), : const Text(""),
trailing: Column( trailing: Column(
crossAxisAlignment: CrossAxisAlignment.end, crossAxisAlignment: CrossAxisAlignment.end,
children: [ children: [
indexController.locations[0].collection[index] indexController.locations[0].features[index]!
.properties!['sub_loc_id'] != .properties!['sub_loc_id'] !=
null null
? Text(indexController ? Text(indexController.locations[0]
.locations[0] .features[index]!.properties!['sub_loc_id'])
.collection[index]
.properties!['sub_loc_id'])
: const Text(""), : const Text(""),
SizedBox( SizedBox(
width: 100, width: 100,

View File

@ -1,10 +1,10 @@
import 'dart:async'; import 'dart:async';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_map/plugin_api.dart'; import 'package:flutter_map/flutter_map.dart';
import 'package:flutter_map_location_marker/flutter_map_location_marker.dart'; import 'package:flutter_map_location_marker/flutter_map_location_marker.dart';
import 'package:flutter_map_marker_cluster/flutter_map_marker_cluster.dart'; import 'package:flutter_map_marker_cluster/flutter_map_marker_cluster.dart';
import 'package:flutter_polyline_points/flutter_polyline_points.dart'; import 'package:flutter_polyline_points/flutter_polyline_points.dart';
import 'package:geojson/geojson.dart'; import 'package:geojson_vi/geojson_vi.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import 'package:latlong2/latlong.dart'; import 'package:latlong2/latlong.dart';
import 'package:rogapp/model/destination.dart'; import 'package:rogapp/model/destination.dart';
@ -25,8 +25,8 @@ class MapWidget extends StatelessWidget {
StreamSubscription? subscription; StreamSubscription? subscription;
Widget getMarkerShape(GeoJsonFeature i, BuildContext context) { Widget getMarkerShape(GeoJSONFeature i, BuildContext context) {
GeoJsonMultiPoint p = i.geometry as GeoJsonMultiPoint; GeoJSONMultiPoint p = i.geometry as GeoJSONMultiPoint;
//print("lat is ${p.geoSerie!.geoPoints[0].latitude} and lon is ${p.geoSerie!.geoPoints[0].longitude}"); //print("lat is ${p.geoSerie!.geoPoints[0].latitude} and lon is ${p.geoSerie!.geoPoints[0].longitude}");
//RegExp regex = RegExp(r'([.]*0)(?!.*\d)'); //RegExp regex = RegExp(r'([.]*0)(?!.*\d)');
return Row( return Row(
@ -34,9 +34,8 @@ class MapWidget extends StatelessWidget {
children: [ children: [
InkWell( InkWell(
onTap: () { onTap: () {
GeoJsonFeature? fs = indexController.getFeatureForLatLong( GeoJSONFeature? fs = indexController.getFeatureForLatLong(
p.geoSerie!.geoPoints[0].latitude, p.coordinates[0][1], p.coordinates[0][0]);
p.geoSerie!.geoPoints[0].longitude);
//print("------- fs $fs------"); //print("------- fs $fs------");
if (fs != null) { if (fs != null) {
indexController.currentFeature.clear(); indexController.currentFeature.clear();
@ -204,27 +203,24 @@ class MapWidget extends StatelessWidget {
), ),
), ),
indexController.locations.isNotEmpty && indexController.locations.isNotEmpty &&
indexController.locations[0].collection.isNotEmpty indexController.locations[0].features.isNotEmpty
? MarkerLayer( ? MarkerLayer(
markers: markers:
indexController.locations[0].collection.map((i) { indexController.locations[0].features.map((i) {
//print("i si ${i.properties!['location_id']}"); //print("i si ${i.properties!['location_id']}");
RegExp regex = RegExp(r'([.]*0)(?!.*\d)'); RegExp regex = RegExp(r'([.]*0)(?!.*\d)');
GeoJsonMultiPoint p = GeoJSONMultiPoint p =
i.geometry as GeoJsonMultiPoint; i!.geometry as GeoJSONMultiPoint;
//print( //print(
// "lat is ${p.geoSerie!.geoPoints[0].latitude} and lon is ${p.geoSerie!.geoPoints[0].longitude}"); // "lat is ${p.geoSerie!.geoPoints[0].latitude} and lon is ${p.geoSerie!.geoPoints[0].longitude}");
return Marker( return Marker(
anchorPos: AnchorPos.exactly(Anchor(108.0, 18.0)), alignment: Alignment.topCenter,
height: 32.0, height: 32.0,
width: 120.0, width: 120.0,
point: LatLng(p.geoSerie!.geoPoints[0].latitude, point: LatLng(
p.geoSerie!.geoPoints[0].longitude), p.coordinates[0][1], p.coordinates[0][0]),
builder: (ctx) { child: getMarkerShape(i, context));
return getMarkerShape(i, context);
},
);
}).toList(), }).toList(),
) )
: const Center(child: CircularProgressIndicator()), : const Center(child: CircularProgressIndicator()),

View File

@ -13,10 +13,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: archive name: archive
sha256: "7e0d52067d05f2e0324268097ba723b71cb41ac8a6a2b24d1edf9c536b987b03" sha256: "7b875fd4a20b165a3084bd2d210439b22ebc653f21cea4842729c0c30c82596b"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "3.4.6" version: "3.4.9"
args: args:
dependency: transitive dependency: transitive
description: description:
@ -53,18 +53,18 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: camera_android name: camera_android
sha256: c978373b41a463c9edda3fea0a06966299f55db63232cd0f0d4efc21a59a0006 sha256: b63304d553dde613ca68fb40aaa76bbbcdbd051683bdbf2019671ec8d9645ce7
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.10.8+12" version: "0.10.8+14"
camera_avfoundation: camera_avfoundation:
dependency: transitive dependency: transitive
description: description:
name: camera_avfoundation name: camera_avfoundation
sha256: "9495e633cda700717bbe299b0979e6c4a08cee45f298945973dc9cf3e4c1cba5" sha256: "3b6d9f550cfd658c71f34a99509528501e5e5d4fa79f11e3a4d6ef380d8e0254"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.9.13+6" version: "0.9.13+7"
camera_camera: camera_camera:
dependency: "direct main" dependency: "direct main"
description: description:
@ -77,10 +77,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: camera_platform_interface name: camera_platform_interface
sha256: "8734d1c682f034bdb12d0d6ff379b0535a9b8e44266b530025bf8266d6a62f28" sha256: "86fd4fc597c6e455265ddb5884feb352d0171ad14b9cdf3aba30da59b25738c4"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.5.2" version: "2.6.0"
camera_web: camera_web:
dependency: transitive dependency: transitive
description: description:
@ -133,18 +133,18 @@ packages:
dependency: "direct main" dependency: "direct main"
description: description:
name: collection name: collection
sha256: f092b211a4319e98e5ff58223576de6c2803db36221657b46c82574721240687 sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.17.2" version: "1.18.0"
connectivity_plus: connectivity_plus:
dependency: "direct main" dependency: "direct main"
description: description:
name: connectivity_plus name: connectivity_plus
sha256: "77a180d6938f78ca7d2382d2240eb626c0f6a735d0bfdce227d8ffb80f95c48b" sha256: "224a77051d52a11fbad53dd57827594d3bd24f945af28bd70bab376d68d437f0"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "4.0.2" version: "5.0.2"
connectivity_plus_platform_interface: connectivity_plus_platform_interface:
dependency: transitive dependency: transitive
description: description:
@ -165,10 +165,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: cross_file name: cross_file
sha256: "445db18de832dba8d851e287aff8ccf169bed30d2e94243cb54c7d2f1ed2142c" sha256: "2f9d2cbccb76127ba28528cb3ae2c2326a122446a83de5a056aaa3880d3882c5"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.3.3+6" version: "0.3.3+7"
crypto: crypto:
dependency: transitive dependency: transitive
description: description:
@ -185,22 +185,22 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.0.6" version: "1.0.6"
dart_earcut:
dependency: transitive
description:
name: dart_earcut
sha256: "2fd8dcc885fbe092dbd4e4496d07840a6cf396f4201677416752be6901c994e4"
url: "https://pub.dev"
source: hosted
version: "1.0.1"
dbus: dbus:
dependency: transitive dependency: transitive
description: description:
name: dbus name: dbus
sha256: "6f07cba3f7b3448d42d015bfd3d53fe12e5b36da2423f23838efc1d5fb31a263" sha256: "365c771ac3b0e58845f39ec6deebc76e3276aa9922b0cc60840712094d9047ac"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.7.8" version: "0.7.10"
extra_pedantic:
dependency: transitive
description:
name: extra_pedantic
sha256: eb9cc0842dc1c980f00fd226364456d2169d54f7118b8ae16443188063edce0b
url: "https://pub.dev"
source: hosted
version: "1.5.0"
fake_async: fake_async:
dependency: transitive dependency: transitive
description: description:
@ -274,18 +274,18 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: flutter_compass name: flutter_compass
sha256: "1a0121bff32df95193812b4e0f69e95f45fdec042ebd7a326ba087c0f6ec8304" sha256: be642484f9f6975c1c6edff568281b001f2f1e604de27ecea18d97eebbdef22f
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.7.0" version: "0.8.0"
flutter_image: flutter_image:
dependency: "direct main" dependency: "direct main"
description: description:
name: flutter_image name: flutter_image
sha256: e3662dc99ee90a8d17eb178bfbcaabaa96c11504d6e2bab53b9158ed0439910a sha256: "0fd3090d50f3bb5619905102f4e61995cce14cae8af8d116d55ae03ea744a1e4"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "4.1.9" version: "4.1.10"
flutter_keyboard_visibility: flutter_keyboard_visibility:
dependency: transitive dependency: transitive
description: description:
@ -346,74 +346,74 @@ packages:
dependency: "direct dev" dependency: "direct dev"
description: description:
name: flutter_lints name: flutter_lints
sha256: a25a15ebbdfc33ab1cd26c63a6ee519df92338a9c10f122adda92938253bef04 sha256: e2a421b7e59244faef694ba7b30562e489c2b489866e505074eb005cd7060db7
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.0.3" version: "3.0.1"
flutter_map: flutter_map:
dependency: "direct main" dependency: "direct main"
description: description:
name: flutter_map name: flutter_map
sha256: "52c65a977daae42f9aae6748418dd1535eaf27186e9bac9bf431843082bc75a3" sha256: "2b925948b675ef74ca524179fb133dbe0a21741889ccf56ad08fc8dcc38ba94b"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "4.0.0" version: "6.0.1"
flutter_map_location_marker: flutter_map_location_marker:
dependency: "direct main" dependency: "direct main"
description: description:
name: flutter_map_location_marker name: flutter_map_location_marker
sha256: "9757dceadda71a53d2d4004cff4d53a29210086083bdfebf44a1c4feb07f8eb1" sha256: acf9cef24d0bced1fe17e89e5126e75af6b146a1dbd7f784647eef5de40de3d2
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "6.0.0" version: "8.0.2"
flutter_map_marker_cluster: flutter_map_marker_cluster:
dependency: "direct main" dependency: "direct main"
description: description:
name: flutter_map_marker_cluster name: flutter_map_marker_cluster
sha256: "362088b16311b6743a7930857129ec6c7c807ecca777fe1033c0ad6688339e36" sha256: a7e80bc81d222b224b2081d31ef67dee28ffff9545ab8a82f97faaf85766cfaa
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.1.1" version: "1.3.3"
flutter_map_marker_popup: flutter_map_marker_popup:
dependency: transitive dependency: transitive
description: description:
name: flutter_map_marker_popup name: flutter_map_marker_popup
sha256: "7cf30fab25ffe1ba04a9e0fbe1227f44a83c73256d4d70be1c26cf141ce5c41d" sha256: ec563bcbae24a18ac16815fb75ac5ab33ccba609e14db70e252a67de19c6639c
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "4.1.0" version: "6.1.2"
flutter_map_tile_caching: flutter_map_tile_caching:
dependency: "direct main" dependency: "direct main"
description: description:
name: flutter_map_tile_caching name: flutter_map_tile_caching
sha256: "48ab77adc7adf70ec682db737b68dd5ac804e78a2e834b951e0d9735a6923971" sha256: ec3be7209accb7962cc1ca1b06708e1bad1511a48416f3bed3ffd680af5df856
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "8.0.1" version: "9.0.0-dev.5"
flutter_plugin_android_lifecycle: flutter_plugin_android_lifecycle:
dependency: transitive dependency: transitive
description: description:
name: flutter_plugin_android_lifecycle name: flutter_plugin_android_lifecycle
sha256: f185ac890306b5779ecbd611f52502d8d4d63d27703ef73161ca0407e815f02c sha256: b068ffc46f82a55844acfa4fdbb61fad72fa2aef0905548419d97f0f95c456da
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.0.16" version: "2.0.17"
flutter_polyline_points: flutter_polyline_points:
dependency: "direct main" dependency: "direct main"
description: description:
name: flutter_polyline_points name: flutter_polyline_points
sha256: "02699e69142f51a248d784b6e3eec524194467fca5f7c4da19699ce2368b6980" sha256: "0e07862139cb65a88789cd6efbe284c0b6f1fcb5ed5ec87781759c48190d84b9"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.0.0" version: "2.0.0"
flutter_riverpod: flutter_riverpod:
dependency: "direct main" dependency: "direct main"
description: description:
name: flutter_riverpod name: flutter_riverpod
sha256: bdba94be666ecb1beeb0f5a748d96cdd6a37215f27e6b48c7673b95cecb800c8 sha256: da9591d1f8d5881628ccd5c25c40e74fc3eef50ba45e40c3905a06e1712412d5
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.4.4" version: "2.4.9"
flutter_test: flutter_test:
dependency: "direct dev" dependency: "direct dev"
description: flutter description: flutter
@ -423,10 +423,10 @@ packages:
dependency: "direct main" dependency: "direct main"
description: description:
name: flutter_typeahead name: flutter_typeahead
sha256: b9942bd5b7611a6ec3f0730c477146cffa4cd4b051077983ba67ddfc9e7ee818 sha256: "1f6b248bb4f3ebb4cf1ee0354aa23c77be457fb2d26d6847ecc33a917f65e58e"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "4.8.0" version: "5.0.1"
flutter_web_plugins: flutter_web_plugins:
dependency: transitive dependency: transitive
description: flutter description: flutter
@ -440,46 +440,30 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "10.6.0" version: "10.6.0"
gallery_saver: geojson_vi:
dependency: "direct main" dependency: "direct main"
description: description:
name: gallery_saver name: geojson_vi
sha256: df8b7e207ca12d64c71e0710a7ee3bc48aa7206d51cc720716fedb1543a66712 sha256: "4f2786db7159c7cbd116b10c29ff396be1e6dd890f27b08d2a4e61162d999d85"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.3.2" version: "2.2.1"
geodesy:
dependency: transitive
description:
name: geodesy
sha256: d9959000de938adf760f946546ccbf9ebdff8f4f6d0b5c54e8b8b1ed350b1028
url: "https://pub.dev"
source: hosted
version: "0.4.0-nullsafety.0"
geojson:
dependency: "direct main"
description:
name: geojson
sha256: "8aab8116d074e92ef2d1ade25ec5ae90ea8bf024a920ab46703c433ffe08878f"
url: "https://pub.dev"
source: hosted
version: "1.0.0"
geolocator: geolocator:
dependency: "direct main" dependency: "direct main"
description: description:
name: geolocator name: geolocator
sha256: "5c23f3613f50586c0bbb2b8f970240ae66b3bd992088cf60dd5ee2e6f7dde3a8" sha256: e946395fc608842bb2f6c914807e9183f86f3cb787f6b8f832753e5251036f02
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "9.0.2" version: "10.1.0"
geolocator_android: geolocator_android:
dependency: transitive dependency: transitive
description: description:
name: geolocator_android name: geolocator_android
sha256: "93906636752ea4d4e778afa981fdfe7409f545b3147046300df194330044d349" sha256: "741579fa6c9e412984d2bdb2fbaa54e3c3f7587c60aeacfe6e058358a11f40f8"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "4.3.1" version: "4.4.0"
geolocator_apple: geolocator_apple:
dependency: transitive dependency: transitive
description: description:
@ -492,10 +476,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: geolocator_platform_interface name: geolocator_platform_interface
sha256: b7aca62aa05d7e610c396a53a1936ff87fce2f735d76e93fde9269c341c46a25 sha256: "6c8d494d6948757c56720b778af742f6973f31fca1f702a7539b8917e4a2468a"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "4.1.1" version: "4.2.0"
geolocator_web: geolocator_web:
dependency: transitive dependency: transitive
description: description:
@ -508,18 +492,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: geolocator_windows name: geolocator_windows
sha256: "4f4218f122a6978d0ad655fa3541eea74c67417440b09f0657238810d5af6bdc" sha256: a92fae29779d5c6dc60e8411302f5221ade464968fe80a36d330e80a71f087af
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.1.3" version: "0.2.2"
geopoint:
dependency: transitive
description:
name: geopoint
sha256: "594afb50a689e6584b80b7de8332c83a78e50725dc4324b2c014d19c56de5e3f"
url: "https://pub.dev"
source: hosted
version: "1.0.0"
get: get:
dependency: "direct main" dependency: "direct main"
description: description:
@ -556,34 +532,18 @@ packages:
dependency: "direct main" dependency: "direct main"
description: description:
name: google_fonts name: google_fonts
sha256: "6b6f10f0ce3c42f6552d1c70d2c28d764cf22bb487f50f66cca31dcd5194f4d6" sha256: f0b8d115a13ecf827013ec9fc883390ccc0e87a96ed5347a3114cac177ef18e8
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "4.0.4" version: "6.1.0"
google_maps_webservice:
dependency: "direct main"
description:
name: google_maps_webservice
sha256: d0ae4e4508afd74a3f051565261a3cdbae59db29448f9b6e6beb5674545e1eb7
url: "https://pub.dev"
source: hosted
version: "0.0.20-nullsafety.5"
http: http:
dependency: "direct main" dependency: "direct main"
description: description:
name: http name: http
sha256: "5895291c13fa8a3bd82e76d5627f69e0d85ca6a30dcac95c4ea19a5d555879c2" sha256: d4872660c46d929f6b8a9ef4e7a7eff7e49bbf0c4ec3f385ee32df5119175139
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.13.6" version: "1.1.2"
http2:
dependency: transitive
description:
name: http2
sha256: "38db0c4aa9f1cd238a5d2e86aa0cc7cc91c77e0c6c94ba64bbe85e4ff732a952"
url: "https://pub.dev"
source: hosted
version: "2.2.0"
http_parser: http_parser:
dependency: transitive dependency: transitive
description: description:
@ -592,14 +552,6 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "4.0.2" version: "4.0.2"
http_plus:
dependency: transitive
description:
name: http_plus
sha256: "6e2af403727ea5bd0a6a45edbe8e1ebc9d5d49b38a93893e1c00e2a307035773"
url: "https://pub.dev"
source: hosted
version: "0.2.2"
image: image:
dependency: transitive dependency: transitive
description: description:
@ -608,6 +560,14 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "4.1.3" version: "4.1.3"
image_gallery_saver:
dependency: "direct main"
description:
name: image_gallery_saver
sha256: "0aba74216a4d9b0561510cb968015d56b701ba1bd94aace26aacdd8ae5761816"
url: "https://pub.dev"
source: hosted
version: "2.0.3"
image_picker: image_picker:
dependency: "direct main" dependency: "direct main"
description: description:
@ -620,10 +580,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: image_picker_android name: image_picker_android
sha256: "0c7b83bbe2980c8a8e36e974f055e11e51675784e13a4762889feed0f3937ff2" sha256: d6a6e78821086b0b737009b09363018309bbc6de3fd88cc5c26bc2bb44a4957f
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.8.8+1" version: "0.8.8+2"
image_picker_for_web: image_picker_for_web:
dependency: transitive dependency: transitive
description: description:
@ -636,10 +596,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: image_picker_ios name: image_picker_ios
sha256: c5538cacefacac733c724be7484377923b476216ad1ead35a0d2eadcdc0fc497 sha256: "76ec722aeea419d03aa915c2c96bf5b47214b053899088c9abb4086ceecf97a7"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.8.8+2" version: "0.8.8+4"
image_picker_linux: image_picker_linux:
dependency: transitive dependency: transitive
description: description:
@ -696,14 +656,6 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "3.1.0+1" version: "3.1.0+1"
iso:
dependency: transitive
description:
name: iso
sha256: "7030a1a096f7924deb6cccde6c7d80473dddd54eeedf20402e3d6e51b1672b27"
url: "https://pub.dev"
source: hosted
version: "1.0.0"
js: js:
dependency: transitive dependency: transitive
description: description:
@ -732,18 +684,18 @@ packages:
dependency: "direct main" dependency: "direct main"
description: description:
name: latlong2 name: latlong2
sha256: "08ef7282ba9f76e8495e49e2dc4d653015ac929dce5f92b375a415d30b407ea0" sha256: "18712164760cee655bc790122b0fd8f3d5b3c36da2cb7bf94b68a197fbb0811b"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.8.2" version: "0.9.0"
lints: lints:
dependency: transitive dependency: transitive
description: description:
name: lints name: lints
sha256: "0a217c6c989d21039f1498c3ed9f3ed71b354e69873f13a8dfc3c9fe76f1b452" sha256: cbf8d4b858bb0134ef3ef87841abdf8d63bfc255c266b7bf6b39daa1085c4290
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.1.1" version: "3.0.0"
lists: lists:
dependency: transitive dependency: transitive
description: description:
@ -756,10 +708,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: logger name: logger
sha256: "7ad7215c15420a102ec687bb320a7312afd449bac63bfb1c60d9787c27b9767f" sha256: "6bbb9d6f7056729537a4309bda2e74e18e5d9f14302489cc1e93f33b3fe32cac"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.4.0" version: "2.0.2+1"
matcher: matcher:
dependency: transitive dependency: transitive
description: description:
@ -788,10 +740,10 @@ packages:
dependency: "direct main" dependency: "direct main"
description: description:
name: meta name: meta
sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3" sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.9.1" version: "1.10.0"
mgrs_dart: mgrs_dart:
dependency: transitive dependency: transitive
description: description:
@ -852,10 +804,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: path_provider_android name: path_provider_android
sha256: "6b8b19bd80da4f11ce91b2d1fb931f3006911477cec227cce23d3253d80df3f1" sha256: e595b98692943b4881b219f0a9e3945118d3c16bd7e2813f98ec6e532d905f72
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.2.0" version: "2.2.1"
path_provider_foundation: path_provider_foundation:
dependency: transitive dependency: transitive
description: description:
@ -900,50 +852,58 @@ packages:
dependency: "direct main" dependency: "direct main"
description: description:
name: permission_handler name: permission_handler
sha256: bc56bfe9d3f44c3c612d8d393bd9b174eb796d706759f9b495ac254e4294baa5 sha256: "860c6b871c94c78e202dc69546d4d8fd84bd59faeb36f8fb9888668a53ff4f78"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "10.4.5" version: "11.1.0"
permission_handler_android: permission_handler_android:
dependency: transitive dependency: transitive
description: description:
name: permission_handler_android name: permission_handler_android
sha256: "59c6322171c29df93a22d150ad95f3aa19ed86542eaec409ab2691b8f35f9a47" sha256: "2f1bec180ee2f5665c22faada971a8f024761f632e93ddc23310487df52dcfa6"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "10.3.6" version: "12.0.1"
permission_handler_apple: permission_handler_apple:
dependency: transitive dependency: transitive
description: description:
name: permission_handler_apple name: permission_handler_apple
sha256: "99e220bce3f8877c78e4ace901082fb29fa1b4ebde529ad0932d8d664b34f3f5" sha256: "1a816084338ada8d574b1cb48390e6e8b19305d5120fe3a37c98825bacc78306"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "9.1.4" version: "9.2.0"
permission_handler_html:
dependency: transitive
description:
name: permission_handler_html
sha256: d96ff56a757b7f04fa825c469d296c5aebc55f743e87bd639fef91a466a24da8
url: "https://pub.dev"
source: hosted
version: "0.1.0+1"
permission_handler_platform_interface: permission_handler_platform_interface:
dependency: transitive dependency: transitive
description: description:
name: permission_handler_platform_interface name: permission_handler_platform_interface
sha256: "6760eb5ef34589224771010805bea6054ad28453906936f843a8cc4d3a55c4a4" sha256: d87349312f7eaf6ce0adaf668daf700ac5b06af84338bd8b8574dfbd93ffe1a1
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "3.12.0" version: "4.0.2"
permission_handler_windows: permission_handler_windows:
dependency: transitive dependency: transitive
description: description:
name: permission_handler_windows name: permission_handler_windows
sha256: cc074aace208760f1eee6aa4fae766b45d947df85bc831cde77009cdb4720098 sha256: "1e8640c1e39121128da6b816d236e714d2cf17fac5a105dd6acdd3403a628004"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.1.3" version: "0.2.0"
petitparser: petitparser:
dependency: transitive dependency: transitive
description: description:
name: petitparser name: petitparser
sha256: cb3798bef7fc021ac45b308f4b51208a152792445cce0448c9a4ba5879dd8750 sha256: eeb2d1428ee7f4170e2bd498827296a18d4e7fc462b71727d111c0ac7707cfa6
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "5.4.0" version: "6.0.1"
platform: platform:
dependency: transitive dependency: transitive
description: description:
@ -956,18 +916,18 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: plugin_platform_interface name: plugin_platform_interface
sha256: da3fdfeccc4d4ff2da8f8c556704c08f912542c5fb3cf2233ed75372384a034d sha256: f4f88d4a900933e7267e2b353594774fc0d07fb072b47eedcd5b54e1ea3269f8
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.1.6" version: "2.1.7"
pointer_interceptor: pointer_interceptor:
dependency: transitive dependency: transitive
description: description:
name: pointer_interceptor name: pointer_interceptor
sha256: "7626e034489820fd599380d2bb4d3f4a0a5e3529370b62bfce53ab736b91adb2" sha256: adf7a637f97c077041d36801b43be08559fd4322d2127b3f20bb7be1b9eebc22
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.9.3+6" version: "0.9.3+7"
pointycastle: pointycastle:
dependency: transitive dependency: transitive
description: description:
@ -1004,10 +964,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: provider name: provider
sha256: cdbe7530b12ecd9eb455bdaa2fcb8d4dad22e80b8afb4798b41479d5ce26847f sha256: "9a96a0a19b594dbc5bf0f1f27d2bc67d5f95957359b461cd9feb44ed6ae75096"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "6.0.5" version: "6.1.1"
queue: queue:
dependency: transitive dependency: transitive
description: description:
@ -1028,18 +988,18 @@ packages:
dependency: "direct main" dependency: "direct main"
description: description:
name: rename name: rename
sha256: b0d9407186d834ad73aba9938da95a20208c4be99f151d9f376ac62a08d08bad sha256: "4d08eafe78e0787167c2fcdd5e32bbb0a6b2d8a7d23b38280f590df2a051415c"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.1.1" version: "3.0.1"
riverpod: riverpod:
dependency: transitive dependency: transitive
description: description:
name: riverpod name: riverpod
sha256: "2af3d127a6e4e34b89b8f1f018086f5ded04b8e538174f0510bba3e4c0d878b1" sha256: "942999ee48b899f8a46a860f1e13cee36f2f77609eb54c5b7a669bb20d550b11"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.4.4" version: "2.4.9"
shared_preferences: shared_preferences:
dependency: "direct main" dependency: "direct main"
description: description:
@ -1084,10 +1044,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: shared_preferences_web name: shared_preferences_web
sha256: d762709c2bbe80626ecc819143013cc820fa49ca5e363620ee20a8b15a3e3daf sha256: "7b15ffb9387ea3e237bb7a66b8a23d2147663d391cafc5c8f37b2e7b4bde5d21"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.2.1" version: "2.2.2"
shared_preferences_windows: shared_preferences_windows:
dependency: transitive dependency: transitive
description: description:
@ -1101,14 +1061,6 @@ packages:
description: flutter description: flutter
source: sdk source: sdk
version: "0.0.99" version: "0.0.99"
slugify:
dependency: transitive
description:
name: slugify
sha256: b272501565cb28050cac2d96b7bf28a2d24c8dae359280361d124f3093d337c3
url: "https://pub.dev"
source: hosted
version: "2.0.0"
source_span: source_span:
dependency: transitive dependency: transitive
description: description:
@ -1117,6 +1069,14 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.10.0" version: "1.10.0"
sprintf:
dependency: transitive
description:
name: sprintf
sha256: "1fc9ffe69d4df602376b52949af107d8f5703b77cda567c4d7d86a0693120f23"
url: "https://pub.dev"
source: hosted
version: "7.0.0"
sqflite: sqflite:
dependency: "direct main" dependency: "direct main"
description: description:
@ -1129,18 +1089,18 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: sqflite_common name: sqflite_common
sha256: "1b92f368f44b0dee2425bb861cfa17b6f6cf3961f762ff6f941d20b33355660a" sha256: bb4738f15b23352822f4c42a531677e5c6f522e079461fd240ead29d8d8a54a6
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.5.0" version: "2.5.0+2"
stack_trace: stack_trace:
dependency: transitive dependency: transitive
description: description:
name: stack_trace name: stack_trace
sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5 sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.11.0" version: "1.11.1"
state_notifier: state_notifier:
dependency: transitive dependency: transitive
description: description:
@ -1153,10 +1113,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: stream_channel name: stream_channel
sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8" sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.1.1" version: "2.1.2"
stream_transform: stream_transform:
dependency: transitive dependency: transitive
description: description:
@ -1193,10 +1153,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: test_api name: test_api
sha256: "75760ffd7786fffdfb9597c35c5b27eaeec82be8edfb6d71d32651128ed7aab8" sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.6.0" version: "0.6.1"
timeline_tile: timeline_tile:
dependency: "direct main" dependency: "direct main"
description: description:
@ -1241,74 +1201,74 @@ packages:
dependency: "direct main" dependency: "direct main"
description: description:
name: url_launcher name: url_launcher
sha256: "47e208a6711459d813ba18af120d9663c20bdf6985d6ad39fe165d2538378d27" sha256: b1c9e98774adf8820c96fbc7ae3601231d324a7d5ebd8babe27b6dfac91357ba
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "6.1.14" version: "6.2.1"
url_launcher_android: url_launcher_android:
dependency: transitive dependency: transitive
description: description:
name: url_launcher_android name: url_launcher_android
sha256: b04af59516ab45762b2ca6da40fa830d72d0f6045cd97744450b73493fa76330 sha256: "31222ffb0063171b526d3e569079cf1f8b294075ba323443fdc690842bfd4def"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "6.1.0" version: "6.2.0"
url_launcher_ios: url_launcher_ios:
dependency: transitive dependency: transitive
description: description:
name: url_launcher_ios name: url_launcher_ios
sha256: "7c65021d5dee51813d652357bc65b8dd4a6177082a9966bc8ba6ee477baa795f" sha256: bba3373219b7abb6b5e0d071b0fe66dfbe005d07517a68e38d4fc3638f35c6d3
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "6.1.5" version: "6.2.1"
url_launcher_linux: url_launcher_linux:
dependency: transitive dependency: transitive
description: description:
name: url_launcher_linux name: url_launcher_linux
sha256: b651aad005e0cb06a01dbd84b428a301916dc75f0e7ea6165f80057fee2d8e8e sha256: "9f2d390e096fdbe1e6e6256f97851e51afc2d9c423d3432f1d6a02a8a9a8b9fd"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "3.0.6" version: "3.1.0"
url_launcher_macos: url_launcher_macos:
dependency: transitive dependency: transitive
description: description:
name: url_launcher_macos name: url_launcher_macos
sha256: b55486791f666e62e0e8ff825e58a023fd6b1f71c49926483f1128d3bbd8fe88 sha256: b7244901ea3cf489c5335bdacda07264a6e960b1c1b1a9f91e4bc371d9e68234
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "3.0.7" version: "3.1.0"
url_launcher_platform_interface: url_launcher_platform_interface:
dependency: transitive dependency: transitive
description: description:
name: url_launcher_platform_interface name: url_launcher_platform_interface
sha256: "95465b39f83bfe95fcb9d174829d6476216f2d548b79c38ab2506e0458787618" sha256: "980e8d9af422f477be6948bdfb68df8433be71f5743a188968b0c1b887807e50"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.1.5" version: "2.2.0"
url_launcher_web: url_launcher_web:
dependency: transitive dependency: transitive
description: description:
name: url_launcher_web name: url_launcher_web
sha256: "2942294a500b4fa0b918685aff406773ba0a4cd34b7f42198742a94083020ce5" sha256: "138bd45b3a456dcfafc46d1a146787424f8d2edfbf2809c9324361e58f851cf7"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.0.20" version: "2.2.1"
url_launcher_windows: url_launcher_windows:
dependency: transitive dependency: transitive
description: description:
name: url_launcher_windows name: url_launcher_windows
sha256: "95fef3129dc7cfaba2bc3d5ba2e16063bb561fc6d78e63eee16162bc70029069" sha256: "7754a1ad30ee896b265f8d14078b0513a4dba28d358eabb9d5f339886f4a1adc"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "3.0.8" version: "3.1.0"
uuid: uuid:
dependency: transitive dependency: transitive
description: description:
name: uuid name: uuid
sha256: "648e103079f7c64a36dc7d39369cabb358d377078a051d6ae2ad3aa539519313" sha256: df5a4d8f22ee4ccd77f8839ac7cb274ebc11ef9adcce8b92be14b797fe889921
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "3.0.7" version: "4.2.1"
vector_math: vector_math:
dependency: "direct main" dependency: "direct main"
description: description:
@ -1329,18 +1289,18 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: web name: web
sha256: dc8ccd225a2005c1be616fe02951e2e342092edf968cf0844220383757ef8f10 sha256: afe077240a270dcfd2aafe77602b4113645af95d0ad31128cc02bce5ac5d5152
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.1.4-beta" version: "0.3.0"
win32: win32:
dependency: transitive dependency: transitive
description: description:
name: win32 name: win32
sha256: "350a11abd2d1d97e0cc7a28a81b781c08002aa2864d9e3f192ca0ffa18b06ed3" sha256: "7c99c0e1e2fa190b48d25c81ca5e42036d5cac81430ef249027d97b0935c553f"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "5.0.9" version: "5.1.0"
wkt_parser: wkt_parser:
dependency: transitive dependency: transitive
description: description:
@ -1361,10 +1321,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: xml name: xml
sha256: "5bc72e1e45e941d825fd7468b9b4cc3b9327942649aeb6fc5cdbf135f0a86e84" sha256: af5e77e9b83f2f4adc5d3f0a4ece1c7f45a2467b695c2540381bac793e34e556
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "6.3.0" version: "6.4.2"
yaml: yaml:
dependency: transitive dependency: transitive
description: description:
@ -1374,5 +1334,5 @@ packages:
source: hosted source: hosted
version: "3.1.2" version: "3.1.2"
sdks: sdks:
dart: ">=3.1.0 <4.0.0" dart: ">=3.2.0 <4.0.0"
flutter: ">=3.13.0" flutter: ">=3.16.0"

View File

@ -35,12 +35,12 @@ dependencies:
cupertino_icons: ^1.0.2 cupertino_icons: ^1.0.2
sqflite: ^2.0.1 sqflite: ^2.0.1
get: ^4.6.6 get: ^4.6.6
flutter_map: ^4.0.0 flutter_map: ^6.0.1
geolocator: ^9.0.2 geolocator: ^10.1.0
permission_handler: ^10.0.0 permission_handler: ^11.1.0
google_api_availability: ^5.0.0 google_api_availability: ^5.0.0
tuple: ^2.0.0 tuple: ^2.0.0
latlong2: ^0.8.1 latlong2: ^0.9.0
positioned_tap_detector_2: ^1.0.4 positioned_tap_detector_2: ^1.0.4
transparent_image: ^2.0.0 transparent_image: ^2.0.0
async: ^2.8.2 async: ^2.8.2
@ -53,31 +53,32 @@ dependencies:
flutter_map_location_marker: any flutter_map_location_marker: any
flutter_map_marker_cluster: any flutter_map_marker_cluster: any
material_design_icons_flutter: ^7.0.7296 material_design_icons_flutter: ^7.0.7296
google_fonts: ^4.0.4 google_fonts: ^6.1.0
keyboard_dismisser: ^3.0.0 keyboard_dismisser: ^3.0.0
image_picker: ^1.0.4 image_picker: ^1.0.4
#geojson_vi: ^2.0.7 geojson_vi: ^2.2.1
geojson: ^1.0.0 #geojson: ^1.0.0
url_launcher: ^6.0.20 url_launcher: ^6.0.20
flutter_breadcrumb: ^1.0.1 flutter_breadcrumb: ^1.0.1
timeline_tile: ^2.0.0 timeline_tile: ^2.0.0
# google_maps_flutter: ^2.5.0 # google_maps_flutter: ^2.5.0
#flutter_map_marker_popup: any #flutter_map_marker_popup: any
flutter_polyline_points: ^1.0.0 flutter_polyline_points: ^2.0.0
google_maps_webservice: ^0.0.19 #google_maps_webservice: ^0.0.20-nullsafety.5
flutter_typeahead: ^4.0.0 flutter_typeahead: ^5.0.1
flutter_launcher_icons: ^0.13.1 flutter_launcher_icons: ^0.13.1
rename: ^2.0.1 rename: ^3.0.1
circular_menu: ^2.0.1 circular_menu: ^2.0.1
camera_camera: ^3.0.0 camera_camera: ^3.0.0
intl: ^0.18.1 intl: ^0.18.1
modal_bottom_sheet: ^3.0.0-pre modal_bottom_sheet: ^3.0.0-pre
connectivity_plus: ^4.0.2 connectivity_plus: ^5.0.2
flutter_map_tile_caching: ^8.0.1 flutter_map_tile_caching: ^9.0.0-dev.5
shared_preferences: ^2.0.15 shared_preferences: ^2.0.15
gallery_saver: ^2.3.2 # gallery_saver: ^2.3.2
image_gallery_saver: ^2.0.3
flutter_riverpod: ^2.4.0 flutter_riverpod: ^2.4.0
http: ^0.13.6 http: ^1.1.0
flutter_icons: flutter_icons:
android: true android: true
@ -93,7 +94,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: ^2.0.3 flutter_lints: ^3.0.1
# 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