1 Commits

Author SHA1 Message Date
edbf52825b re factor rog 2024-04-01 09:26:56 +05:30
59 changed files with 2581 additions and 620 deletions

View File

@ -33,7 +33,7 @@ if (keystorePropertiesFile.exists()) {
android {
compileSdkVersion 33
compileSdkVersion 34
lintOptions {
checkReleaseBuilds false

View File

@ -1,5 +1,5 @@
# Uncomment this line to define a global platform for your project
platform :ios, '12.0'
# platform :ios, '12.0'
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'

View File

@ -23,7 +23,7 @@ PODS:
- path_provider_foundation (0.0.1):
- Flutter
- FlutterMacOS
- permission_handler_apple (9.3.0):
- permission_handler_apple (9.1.1):
- Flutter
- pointer_interceptor_ios (0.0.1):
- Flutter
@ -103,13 +103,13 @@ SPEC CHECKSUMS:
image_picker_ios: 99dfe1854b4fa34d0364e74a78448a0151025425
isar_flutter_libs: b69f437aeab9c521821c3f376198c4371fa21073
path_provider_foundation: 3784922295ac71e43754bd15e0653ccfd36a147c
permission_handler_apple: 9878588469a2b0d0fc1e048d9f43605f92e6cec2
permission_handler_apple: e76247795d700c14ea09e3a2d8855d41ee80a2e6
pointer_interceptor_ios: 9280618c0b2eeb80081a343924aa8ad756c21375
ReachabilitySwift: 985039c6f7b23a1da463388634119492ff86c825
shared_preferences_foundation: b4c3b4cddf1c21f02770737f147a3f5da9d39695
sqflite: 50a33e1d72bd59ee092a519a35d107502757ebed
url_launcher_ios: bbd758c6e7f9fd7b5b1d4cde34d2b95fcce5e812
PODFILE CHECKSUM: 7a34d5e980f9e05ecf4e24c79da64ca020615638
PODFILE CHECKSUM: fd4b34215e7c57e79d347e509d4d64bfebe797fc
COCOAPODS: 1.15.2
COCOAPODS: 1.12.1

View File

@ -139,7 +139,6 @@
9705A1C41CF9048500538489 /* Embed Frameworks */,
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
CD1CB185AC38B6B245F9A672 /* [CP] Embed Pods Frameworks */,
4D62FB08D65E9D3D4D84B418 /* [CP] Copy Pods Resources */,
);
buildRules = (
);
@ -156,7 +155,7 @@
97C146E61CF9000F007C117D /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 1430;
LastUpgradeCheck = 1510;
ORGANIZATIONNAME = "";
TargetAttributes = {
97C146ED1CF9000F007C117D = {
@ -214,23 +213,6 @@
shellPath = /bin/sh;
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
};
4D62FB08D65E9D3D4D84B418 /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-input-files.xcfilelist",
);
name = "[CP] Copy Pods Resources";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-output-files.xcfilelist",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n";
showEnvVarsInLog = 0;
};
9740EEB61CF901F6004384FC /* Run Script */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
@ -378,20 +360,15 @@
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 453;
DEVELOPMENT_TEAM = UMNEWT25JR;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
DEVELOPMENT_TEAM = ECMVJVB7LV;
ENABLE_BITCODE = NO;
FLUTTER_BUILD_NAME = 4.5.0;
FLUTTER_BUILD_NUMBER = 453;
INFOPLIST_FILE = Runner/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = "岐阜ナビ";
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.healthcare-fitness";
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 4.5.0;
PRODUCT_BUNDLE_IDENTIFIER = com.dvox.gifunavi;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
@ -517,20 +494,15 @@
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 453;
DEVELOPMENT_TEAM = UMNEWT25JR;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
DEVELOPMENT_TEAM = ECMVJVB7LV;
ENABLE_BITCODE = NO;
FLUTTER_BUILD_NAME = 4.5.0;
FLUTTER_BUILD_NUMBER = 453;
INFOPLIST_FILE = Runner/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = "岐阜ナビ";
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.healthcare-fitness";
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 4.5.0;
PRODUCT_BUNDLE_IDENTIFIER = com.dvox.gifunavi;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
@ -549,20 +521,15 @@
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 453;
DEVELOPMENT_TEAM = UMNEWT25JR;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
DEVELOPMENT_TEAM = ECMVJVB7LV;
ENABLE_BITCODE = NO;
FLUTTER_BUILD_NAME = 4.5.0;
FLUTTER_BUILD_NUMBER = 453;
INFOPLIST_FILE = Runner/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = "岐阜ナビ";
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.healthcare-fitness";
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 4.5.0;
PRODUCT_BUNDLE_IDENTIFIER = com.dvox.gifunavi;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";

View File

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

View File

@ -65,7 +65,5 @@
<true/>
<key>UIApplicationSupportsIndirectInputEvents</key>
<true/>
<key>FLTEnableImpeller</key>
<false/>
</dict>
</plist>

View File

@ -0,0 +1,71 @@
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:rogapp/features/home/home_page.dart';
import 'package:rogapp/features/services/auth_repo.dart';
import 'package:rogapp/features/state/user_state.dart';
class LoginPage extends ConsumerStatefulWidget {
@override
_LoginScreenState createState() => _LoginScreenState();
}
class _LoginScreenState extends ConsumerState<LoginPage> {
final TextEditingController _emailController = TextEditingController();
final TextEditingController _passwordController = TextEditingController();
bool _isLoading = false; // Track loading state
void _login() {
setState(() {
_isLoading = true; // Start loading
});
String email = _emailController.text.trim();
String password = _passwordController.text;
ref.read(authProvider("$email|$password").future).then((user) {
setState(() {
_isLoading = false; // Stop loading
});
if (user != null) {
ref.read(userNotifierProvider.notifier).setUser(user);
Navigator.of(context).pushReplacement(MaterialPageRoute(
builder: (context) => const HomePage(),
));
} else {
ScaffoldMessenger.of(context)
.showSnackBar(const SnackBar(content: Text('Login failed')));
}
}).catchError((error) {
ScaffoldMessenger.of(context)
.showSnackBar(SnackBar(content: Text('Error: $error')));
});
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: const Text('Login')),
body: Padding(
padding: const EdgeInsets.all(16.0),
child: Column(
children: [
TextFormField(
controller: _emailController,
decoration: const InputDecoration(labelText: 'Email'),
),
TextFormField(
controller: _passwordController,
decoration: const InputDecoration(labelText: 'Password'),
obscureText: true,
),
_isLoading
? CircularProgressIndicator()
: ElevatedButton(
onPressed: _login,
child: const Text('Login'),
),
],
),
),
);
}
}

View File

@ -0,0 +1,397 @@
// ignore_for_file: public_member_api_docs, sort_constructors_first
import 'dart:convert';
class FeatureCollection {
final String type;
final List<Feature> features;
FeatureCollection({required this.type, required this.features});
factory FeatureCollection.fromJson(Map<String, dynamic> json) {
return FeatureCollection(
type: json['type'],
features:
List<Feature>.from(json['features'].map((x) => Feature.fromJson(x))),
);
}
}
class Feature {
final int id;
final String type;
final Geometry geometry;
final Properties properties;
Feature(
{required this.id,
required this.type,
required this.geometry,
required this.properties});
factory Feature.fromJson(Map<String, dynamic> json) {
return Feature(
id: json['id'],
type: json['type'],
geometry: Geometry.fromJson(json['geometry']),
properties: Properties.fromJson(json['properties']),
);
}
String toJson() => json.encode(toMap());
Map<String, dynamic> toMap() {
return {
'id': id,
'type': type,
'geometry': geometry.toMap(), // Assuming Geometry has a toMap method
'properties':
properties.toMap(), // Assuming Properties has a toMap method
};
}
Feature.fromMap(Map<String, dynamic> map)
: id = map['id'],
type = map['type'],
geometry = Geometry.fromMap(map['geometry']),
properties = Properties.fromJson(map['properties']);
static empty() {}
}
class Geometry {
final String type;
final List<List<double>> coordinates;
Geometry({required this.type, required this.coordinates});
Geometry copyWith({
String? type,
List<List<double>>? coordinates,
}) {
return Geometry(
type: type ?? this.type,
coordinates: coordinates ?? this.coordinates,
);
}
Map<String, dynamic> toMap() {
return <String, dynamic>{
'type': type,
'coordinates': coordinates,
};
}
factory Geometry.fromMap(Map<String, dynamic> map) {
return Geometry(
type: map['type'] as String,
coordinates: List<List<double>>.from(
(map['coordinates'] as List<dynamic>).map<List<double>>(
(coordinateList) {
// Ensure 'coordinateList' is treated as a List of dynamic elements.
// Then, for each element in the list, explicitly cast or convert it to double.
return List<double>.from(coordinateList.map((coordinate) {
// 'coordinate' is dynamic, needs explicit conversion to double.
// The conversion depends on the original data type of 'coordinate';
// if it's already a number, you can use .toDouble(); if it's a String, you might need double.parse.
return double.parse(coordinate.toString());
}));
},
),
),
);
}
String toJson() => json.encode(toMap());
factory Geometry.fromJson(Map<String, dynamic> source) {
final geom = Geometry.fromMap(source);
return geom;
}
get latitude => coordinates[0][1];
get longitude => coordinates[0][0];
}
class Properties {
// Include all properties fields
final int locationId;
final String subLocId;
final double cp;
final String? name;
final String? address;
final String? phone;
final String? email;
final String? webcontents;
final String? videos;
final String? category;
final int? series;
final double? lat;
final double? lon;
final int? listOrder;
final String? photos;
final double? checkinRadious;
final bool? autoCheckin;
bool? selected = false;
bool? checkedin = false;
final double? checkinPoint;
final double? buyPoint;
final bool? hiddenLocation;
String? checkinImage;
String? buypointImage;
bool? forcedCheckin = false;
final String? tags;
Properties(
{required this.locationId,
required this.subLocId,
required this.cp,
this.name,
this.address,
this.phone,
this.email,
this.webcontents,
this.videos,
this.category,
this.series,
this.lat,
this.lon,
this.listOrder,
this.photos,
this.checkinRadious,
this.autoCheckin,
this.selected,
this.checkedin,
this.checkinPoint,
this.buyPoint,
this.hiddenLocation,
this.checkinImage,
this.buypointImage,
this.forcedCheckin,
this.tags});
factory Properties.fromJson(Map<String, dynamic> json) {
Properties prop;
try {
prop = Properties(
locationId: json['location_id'],
subLocId: json['sub_loc_id'],
cp: json['cp'],
name: json['name'] ?? '',
address: json['address'] ?? '',
phone: json['phone'] ?? '',
email: json['email'] ?? '',
webcontents: json['webcontents'] ?? '',
videos: json['videos'] ?? '',
category: json['category'] ?? '',
series: json['series'] ?? 0,
lat: json['lat'] ?? 0.0,
lon: json['lon'] ?? 0.0,
listOrder: json['list_order'] ?? 0,
photos: json['photos'] ?? '',
checkinRadious: json['checkin_radious'] ?? 0.0,
autoCheckin: json['auto_checkin'] == 0 ? false : true,
selected: json['selected'] == 0 ? false : true,
checkedin: json['checkedin'] == 0 ? false : true,
checkinPoint: json['checkin_point'] ?? 0.0,
buyPoint: json['buy_point'] ?? 0.0,
hiddenLocation: json['hidden_location'] == 0 ? false : true,
checkinImage: json['checkin_image'] ?? '',
buypointImage: json['buypoint_image'] ?? '',
forcedCheckin: json['forced_checkin'] == 0 ? false : true,
tags: json['tags'] ?? '');
//print("from json --- $prop");
} catch (e) {
//print("from json --- $e");
return Properties(locationId: 0, subLocId: '', cp: 0.0, name: '');
}
return prop;
}
factory Properties.toJson(Properties prop) {
return Properties(
locationId: prop.locationId,
subLocId: prop.subLocId,
cp: prop.cp,
name: prop.name,
address: prop.address,
phone: prop.phone,
email: prop.email,
webcontents: prop.webcontents,
videos: prop.videos,
category: prop.category,
series: prop.series,
lat: prop.lat,
lon: prop.lon,
listOrder: prop.listOrder,
photos: prop.photos,
checkinRadious: prop.checkinRadious,
autoCheckin: prop.autoCheckin,
selected: prop.selected,
checkedin: prop.checkedin,
checkinPoint: prop.checkinPoint,
buyPoint: prop.buyPoint,
hiddenLocation: prop.hiddenLocation,
checkinImage: prop.checkinImage,
buypointImage: prop.buypointImage,
forcedCheckin: prop.forcedCheckin,
tags: prop.tags);
}
Properties copyWith({
int? locationId,
String? subLocId,
double? cp,
String? name,
String? address,
String? phone,
String? email,
String? webcontents,
String? videos,
String? category,
int? series,
double? lat,
double? lon,
int? listOrder,
String? photos,
double? checkinRadious,
bool? autoCheckin,
bool? selected,
bool? checkedin,
double? checkinPoint,
double? buyPoint,
bool? hiddenLocation,
String? checkinImage,
String? buypointImage,
bool? forcedCheckin,
String? tags,
}) {
return Properties(
locationId: locationId ?? this.locationId,
subLocId: subLocId ?? this.subLocId,
cp: cp ?? this.cp,
name: name ?? this.name,
address: address ?? this.address,
phone: phone ?? this.phone,
email: email ?? this.email,
webcontents: webcontents ?? this.webcontents,
videos: videos ?? this.videos,
category: category ?? this.category,
series: series ?? this.series,
lat: lat ?? this.lat,
lon: lon ?? this.lon,
listOrder: listOrder ?? this.listOrder,
photos: photos ?? this.photos,
checkinRadious: checkinRadious ?? this.checkinRadious,
autoCheckin: autoCheckin ?? this.autoCheckin,
selected: selected ?? this.selected,
checkedin: checkedin ?? this.checkedin,
checkinPoint: checkinPoint ?? this.checkinPoint,
buyPoint: buyPoint ?? this.buyPoint,
hiddenLocation: hiddenLocation ?? this.hiddenLocation,
checkinImage: checkinImage ?? this.checkinImage,
buypointImage: buypointImage ?? this.buypointImage,
forcedCheckin: forcedCheckin ?? this.forcedCheckin,
tags: tags ?? this.tags,
);
}
Map<String, dynamic> toMap() {
return <String, dynamic>{
'locationId': locationId,
'subLocId': subLocId,
'cp': cp,
'name': name,
'address': address,
'phone': phone,
'email': email,
'webcontents': webcontents,
'videos': videos,
'category': category,
'series': series,
'lat': lat,
'lon': lon,
'listOrder': listOrder,
'photos': photos,
'checkinRadious': checkinRadious,
'autoCheckin': autoCheckin,
'selected': selected,
'checkedin': checkedin,
'checkinPoint': checkinPoint,
'buyPoint': buyPoint,
'hiddenLocation': hiddenLocation,
'checkinImage': checkinImage,
'buypointImage': buypointImage,
'forcedCheckin': forcedCheckin,
'tags': tags,
};
}
String toJson() => json.encode(toMap());
@override
String toString() {
return 'Properties(locationId: $locationId, subLocId: $subLocId, cp: $cp, name: $name, address: $address, phone: $phone, email: $email, webcontents: $webcontents, videos: $videos, category: $category, series: $series, lat: $lat, lon: $lon, listOrder: $listOrder, photos: $photos, checkinRadious: $checkinRadious, autoCheckin: $autoCheckin, selected: $selected, checkedin: $checkedin, checkinPoint: $checkinPoint, buyPoint: $buyPoint, hiddenLocation: $hiddenLocation, checkinImage: $checkinImage, buypointImage: $buypointImage, forcedCheckin: $forcedCheckin, tags: $tags)';
}
@override
bool operator ==(covariant Properties other) {
if (identical(this, other)) return true;
return other.locationId == locationId &&
other.subLocId == subLocId &&
other.cp == cp &&
other.name == name &&
other.address == address &&
other.phone == phone &&
other.email == email &&
other.webcontents == webcontents &&
other.videos == videos &&
other.category == category &&
other.series == series &&
other.lat == lat &&
other.lon == lon &&
other.listOrder == listOrder &&
other.photos == photos &&
other.checkinRadious == checkinRadious &&
other.autoCheckin == autoCheckin &&
other.selected == selected &&
other.checkedin == checkedin &&
other.checkinPoint == checkinPoint &&
other.buyPoint == buyPoint &&
other.hiddenLocation == hiddenLocation &&
other.checkinImage == checkinImage &&
other.buypointImage == buypointImage &&
other.forcedCheckin == forcedCheckin &&
other.tags == tags;
}
@override
int get hashCode {
return locationId.hashCode ^
subLocId.hashCode ^
cp.hashCode ^
name.hashCode ^
address.hashCode ^
phone.hashCode ^
email.hashCode ^
webcontents.hashCode ^
videos.hashCode ^
category.hashCode ^
series.hashCode ^
lat.hashCode ^
lon.hashCode ^
listOrder.hashCode ^
photos.hashCode ^
checkinRadious.hashCode ^
autoCheckin.hashCode ^
selected.hashCode ^
checkedin.hashCode ^
checkinPoint.hashCode ^
buyPoint.hashCode ^
hiddenLocation.hashCode ^
checkinImage.hashCode ^
buypointImage.hashCode ^
forcedCheckin.hashCode ^
tags.hashCode;
}
}

View File

@ -0,0 +1,82 @@
import 'dart:convert';
class CheckpointVisit {
final String id;
final String checkpointId;
final String teamName;
final String userName;
final String eventCode;
final DateTime visitTime;
CheckpointVisit({
required this.id,
required this.checkpointId,
required this.teamName,
required this.userName,
required this.eventCode,
required this.visitTime,
});
CheckpointVisit copyWith({
String? id,
String? checkpointId,
String? teamName,
String? userName,
String? eventCode,
DateTime? visitTime,
}) {
return CheckpointVisit(
id: id ?? this.id,
checkpointId: checkpointId ?? this.checkpointId,
teamName: teamName ?? this.teamName,
userName: userName ?? this.userName,
eventCode: eventCode ?? this.eventCode,
visitTime: visitTime ?? this.visitTime,
);
}
Map<String, dynamic> toMap() {
return {
'id': id,
'checkpointId': checkpointId,
'teamName': teamName,
'userName': userName,
'eventCode': eventCode,
'visitTime': visitTime.millisecondsSinceEpoch,
};
}
factory CheckpointVisit.fromMap(Map<String, dynamic> map) {
return CheckpointVisit(
id: map['id'],
checkpointId: map['checkpointId'],
teamName: map['teamName'],
userName: map['userName'],
eventCode: map['eventCode'],
visitTime: DateTime.fromMillisecondsSinceEpoch(map['visitTime']),
);
}
String toJson() => json.encode(toMap());
factory CheckpointVisit.fromJson(String source) =>
CheckpointVisit.fromMap(json.decode(source));
@override
String toString() {
return 'CheckpointVisit(id: $id, checkpointId: $checkpointId, teamName: $teamName, userName: $userName, eventCode: $eventCode, visitTime: $visitTime)';
}
@override
bool operator ==(Object other) {
if (identical(this, other)) return true;
return other is CheckpointVisit &&
other.id == id &&
other.checkpointId == checkpointId &&
other.teamName == teamName &&
other.userName == userName &&
other.eventCode == eventCode &&
other.visitTime == visitTime;
}
}

View File

@ -0,0 +1,329 @@
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:path_provider/path_provider.dart';
import 'package:sqflite/sqflite.dart';
import 'package:path/path.dart';
import 'package:rogapp/features/data/checkpoint.dart';
import 'package:rogapp/features/data/user_location.dart';
final dataProviderProvider = Provider<DataProvider>((ref) {
return DataProvider();
});
// Convert a Feature object to a Map
Map<String, dynamic> featureToMap(Feature feature) {
var properties = feature.properties;
try {
return {
'id': feature.id,
'type': feature.type,
'name': properties.name ?? '',
'address': properties.address ?? '',
'phone': properties.phone ?? '',
'email': properties.email ?? '',
'webcontents': properties.webcontents ?? '',
'videos': properties.videos ?? '',
'category': properties.category ?? '',
'series': properties.series,
'lat': feature.geometry.latitude,
'lon': feature.geometry.longitude,
'list_order': properties.listOrder,
'photos': properties.photos ?? '',
'checkin_radious': properties.checkinRadious,
'sub_loc_id': properties.subLocId,
'auto_checkin': properties.autoCheckin! ? 1 : 0,
'selected': properties.selected == null
? 0
: properties.selected!
? 1
: 0,
'checkedin': properties.checkedin == null
? 0
: properties.checkedin!
? 1
: 0,
'cp': properties.cp,
'checkin_point': properties.checkinPoint,
'buy_point': properties.buyPoint,
'hidden_location': properties.hiddenLocation,
'checkin_image': properties.checkinImage,
'buypoint_image': properties.buypointImage,
'forced_checkin': properties.forcedCheckin == null
? 0
: properties.forcedCheckin!
? 1
: 0,
'tags': properties.tags ?? '',
'location_id': properties.locationId,
};
} catch (e) {
//print("--- feature to map Error: $e");
return {};
}
}
// Convert a Map to a Feature object
Feature mapToFeature(Map<String, dynamic> map) {
Feature feat;
//print("mapToFeature id --- ${Properties.fromJson(map)}");
//print("mapToFeature --- ${map['type']}");
feat = Feature(
id: map['id'],
type: map['type'],
geometry: Geometry(
type: map['type'] ?? 'Point',
coordinates: [
[map['lon'], map['lat']]
],
),
properties: Properties.fromJson(map),
);
//print("mapToFeature --- $feat");
return feat;
}
class DataProvider {
static Database? _database;
Future<Database> get database async {
if (_database != null) return _database!;
_database = await initDB();
return _database!;
}
initDB() async {
var documentsDirectory = await getApplicationDocumentsDirectory();
String path = join(documentsDirectory.path, "GameDB.db");
return await openDatabase(path,
version: 1, onOpen: (db) {}, onCreate: _onCreate);
}
_onCreate(Database db, int version) async {
await db.execute('''
CREATE TABLE Checkpoints (
location_id INTEGER PRIMARY KEY,
id INTEGER,
type TEXT,
name TEXT,
address TEXT,
phone TEXT,
email TEXT,
webcontents TEXT,
videos TEXT,
category TEXT,
series INTEGER,
lat REAL,
lon REAL,
list_order INTEGER,
photos TEXT,
checkin_radious REAL,
sub_loc_id TEXT,
auto_checkin INTEGER,
selected INTEGER,
checkedin INTEGER,
cp REAL,
checkin_point REAL,
buy_point REAL,
hidden_location INTEGER,
checkin_image TEXT,
buypoint_image TEXT,
forced_checkin INTEGER,
recipt_times INTEGER,
tags TEXT
)
''');
await db.execute('''
CREATE TABLE GPSLocations (
timestamp TEXT PRIMARY KEY,
latitude REAL,
longitude REAL,
event_code TEXT,
team_name TEXT,
user_name TEXT,
attempt_count INTEGER
)
''');
await db.execute('''
CREATE TABLE GameState (
key TEXT PRIMARY KEY,
value TEXT,
event_code TEXT,
team_name TEXT,
user_name TEXT,
attempt_count INTEGER
)
''');
await db.execute('''
CREATE TABLE CheckpointVisits (
id INTEGER PRIMARY KEY AUTOINCREMENT,
checkpointId INTEGER,
photoTaken BOOLEAN,
receiptPhotoTaken BOOLEAN,
timestamp DATETIME DEFAULT CURRENT_TIMESTAMP,
event_code TEXT,
team_name TEXT,
user_name TEXT,
attempt_count INTEGER DEFAULT 1,
FOREIGN KEY (checkpointId) REFERENCES Checkpoints(location_id)
)
''');
}
Future<void> recordCheckpointVisit(
int locationId, String userName, String teamName, String eventCode,
{bool photoTaken = false, bool? receiptPhotoTaken}) async {
final db = await database;
// Fetching buy_point to determine if a receipt is required
var checkpointQueryResult = await db.query(
'Checkpoints',
columns: ['buy_point'],
where: 'location_id = ?',
whereArgs: [locationId],
);
var buyPoint = checkpointQueryResult.isNotEmpty
? checkpointQueryResult.first['buy_point'] as double?
: null;
var requiresReceipt = buyPoint != null && buyPoint > 0.0;
await db.insert(
'CheckpointVisits',
{
'checkpointId': locationId,
'user_name': userName,
'team_name': teamName,
'event_code': eventCode,
'photoTaken': photoTaken ? 1 : 0,
'receiptPhotoTaken':
requiresReceipt ? (receiptPhotoTaken == true ? 1 : 0) : null,
},
conflictAlgorithm: ConflictAlgorithm.replace,
);
}
Future<Map<String, dynamic>> getIncompleteTasks(int locationId,
String userName, String teamName, String eventCode) async {
final db = await database;
var checkpoint = await db.query(
'Checkpoints',
where: 'location_id = ?',
whereArgs: [locationId],
);
var buyPointValue =
checkpoint.isNotEmpty ? checkpoint.first['buy_point'] as double? : null;
var requiresReceipt = buyPointValue != null && buyPointValue > 0.0;
// Fetch visits considering all relevant identifiers
List<Map> visits = await db.query(
'CheckpointVisits',
where:
'checkpointId = ? AND user_name = ? AND team_name = ? AND event_code = ?',
whereArgs: [locationId, userName, teamName, eventCode],
);
if (visits.isNotEmpty) {
var lastVisit = visits.last;
return {
'photoTaken': lastVisit['photoTaken'] == 1,
'receiptPhotoTaken':
requiresReceipt ? lastVisit['receiptPhotoTaken'] == 1 : true,
};
}
// Default return values when no visits found
return {
'photoTaken': false,
'receiptPhotoTaken': requiresReceipt ? false : true,
};
}
Future<void> insertMarker(Feature marker) async {
//print("--- inserting ${featureToMap(marker)} ---");
final db = await database;
try {
await db.insert(
'Checkpoints',
featureToMap(marker),
conflictAlgorithm: ConflictAlgorithm.replace,
);
} catch (e) {
print("--- ${e.toString()} ---");
}
}
Future<List<Feature>> getMarkers() async {
final db = await database;
var res = await db.query('Checkpoints');
List<Feature> list =
res.isNotEmpty ? res.map((c) => mapToFeature(c)).toList() : [];
//print("--- checkpoints ${res} ---");
return list;
}
Future<int> deleteMarker(int id) async {
final db = await database;
return db.delete('Checkpoints', where: 'id = ?', whereArgs: [id]);
}
Future<void> insertGPSLocation(UserLocation location) async {
final db = await database;
await db.insert(
'GPSLocations',
location
.toMap(), // Implement a method in UserLocation to convert the object to a Map
conflictAlgorithm: ConflictAlgorithm.replace,
);
}
Future<List<UserLocation>> getGPSLocations() async {
final db = await database;
var res = await db.query('GPSLocations');
List<UserLocation> locations =
res.isNotEmpty ? res.map((c) => UserLocation.fromMap(c)).toList() : [];
return locations;
}
Future<void> updateGameState(
String key,
String value,
String userName,
String teamName,
String eventCode,
) async {
final db = await database;
await db.insert(
'GameState',
{
'key': key,
'value': value,
'team_name': teamName,
'event_code': eventCode,
'user_name': userName,
},
conflictAlgorithm: ConflictAlgorithm.replace,
);
}
Future<String?> getGameState(
String key,
String userName,
String teamName,
String eventCode,
) async {
final db = await database;
List<Map<String, dynamic>> results = await db.query(
'GameState',
where: 'key = ? AND team_name = ? AND event_code = ? AND user_name = ?',
whereArgs: [key, teamName, eventCode, userName],
);
if (results.isNotEmpty) {
return results.first['value'] as String?;
}
return null;
}
}

View File

@ -0,0 +1,17 @@
enum EventType {
atStart,
starting,
started,
inCheckin,
checkiningIn,
checkedIn,
atGoal,
finishingGoal,
finishedGoal,
}
class GameEvent {
final EventType type;
final DateTime timestamp;
GameEvent({this.type = EventType.atStart, required this.timestamp});
}

View File

@ -0,0 +1,24 @@
class User {
User.User();
//AuthUser.from({required this.id, required this.email, required this.is_rogaining, required this.group, required this.zekken_number, required this.event_code, required this.team_name});
User.fromMap(Map<String, dynamic> map)
: id = int.parse(map["id"].toString()),
email = map["email"].toString(),
is_rogaining = bool.parse(map["is_rogaining"].toString()),
group = map["group"].toString(),
zekken_number = map["zekken_number"].toString(),
event_code = map["event_code"].toString(),
team_name = map["team_name"].toString(),
auth_token = map["token"];
int? id;
String? email;
bool? is_rogaining;
String? group;
String? zekken_number;
String? event_code;
String? team_name;
String? auth_token;
}

View File

@ -0,0 +1,59 @@
import 'dart:convert';
import 'package:geolocator/geolocator.dart';
// ignore_for_file: public_member_api_docs, sort_constructors_first
class UserLocation {
final double latitude;
final double longitude;
final DateTime timestamp;
UserLocation(
{required this.latitude,
required this.longitude,
required this.timestamp});
static UserLocation empty() {
return UserLocation(
latitude: 0.0, longitude: 0.0, timestamp: DateTime.now());
}
factory UserLocation.fromPosition(Position position) {
return UserLocation(
latitude: position.latitude,
longitude: position.longitude,
timestamp: position.timestamp);
}
UserLocation copyWith({
double? latitude,
double? longitude,
DateTime? timestamp,
}) {
return UserLocation(
latitude: latitude ?? this.latitude,
longitude: longitude ?? this.longitude,
timestamp: timestamp ?? this.timestamp,
);
}
Map<String, dynamic> toMap() {
return <String, dynamic>{
'latitude': latitude,
'longitude': longitude,
'timestamp': timestamp.millisecondsSinceEpoch,
};
}
factory UserLocation.fromMap(Map<String, dynamic> map) {
return UserLocation(
latitude: map['latitude'] as double,
longitude: map['longitude'] as double,
timestamp: DateTime.fromMillisecondsSinceEpoch(map['timestamp'] as int),
);
}
String toJson() => json.encode(toMap());
factory UserLocation.fromJson(String source) =>
UserLocation.fromMap(json.decode(source) as Map<String, dynamic>);
}

View File

@ -0,0 +1,131 @@
import 'package:dio_cache_interceptor_hive_store/dio_cache_interceptor_hive_store.dart';
import 'package:flutter/material.dart';
import 'package:flutter_map/flutter_map.dart';
import 'package:flutter_map_cache/flutter_map_cache.dart';
import 'package:flutter_map_location_marker/flutter_map_location_marker.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:latlong2/latlong.dart';
import 'package:material_design_icons_flutter/material_design_icons_flutter.dart';
import 'package:rogapp/features/location/location_provider.dart';
import 'package:rogapp/features/state/game_state.dart';
import 'package:rogapp/features/state/game_view_model.dart';
import 'package:path_provider/path_provider.dart';
class HomePage extends ConsumerStatefulWidget {
const HomePage({super.key});
@override
ConsumerState<HomePage> createState() => _HomePageState();
}
class _HomePageState extends ConsumerState<HomePage> {
MapController mapController = MapController();
String? _cachePath;
@override
void initState() {
super.initState();
//ref.read(featureCheckpointCollectionProvider.future);
ref.read(locationNotifierProvider.notifier).startListening();
_initializeCachePath();
}
Future<void> _initializeCachePath() async {
_cachePath = await getTemporaryDirectory().then((dir) => dir.path);
setState(() {});
}
@override
Widget build(BuildContext context) {
final gameState = ref.watch(gameViewModelProvider);
final locationState = ref.watch(locationNotifierProvider);
if (_cachePath == null || gameState.markers.isEmpty) {
return Scaffold(
appBar: AppBar(),
body: Center(child: CircularProgressIndicator()),
);
}
return Scaffold(
appBar: AppBar(
actions: [
Text(
'Current Latitude: ${locationState.currentPosition?.latitude ?? 'No data'}'),
IconButton(
icon: Icon(MdiIcons.logout),
onPressed: () => _logGameState(gameState),
),
Text(gameState.currentLocation?.latitude.toString() ??
'--- No location'),
],
),
body: Column(
children: [
Expanded(child: _buildMap(gameState, _cachePath!)),
],
),
);
}
void _logGameState(GameState gameState) {
print("Checkpoint photo taken: ${gameState.checkpointPhotoTaken}");
print("Current checkpoint: ${gameState.currentCheckpoint}");
print("Has left start area: ${gameState.hasLeftStartArea}");
print("Has visited checkpoint: ${gameState.hasVisitedCheckpoint}");
}
Widget _buildMap(GameState gameState, String cachePath) {
return FlutterMap(
mapController: mapController,
options: MapOptions(
interactionOptions: const InteractionOptions(
enableMultiFingerGestureRace: true,
flags: InteractiveFlag.doubleTapDragZoom |
InteractiveFlag.doubleTapZoom |
InteractiveFlag.drag |
InteractiveFlag.flingAnimation |
InteractiveFlag.pinchZoom |
InteractiveFlag.scrollWheelZoom,
),
maxZoom: 18.4,
onMapReady: () => mapController.move(LatLng(37.153196, 139.587659), 4),
),
children: [
TileLayer(
urlTemplate:
'https://cyberjapandata.gsi.go.jp/xyz/std/{z}/{x}/{y}.png',
tileProvider: CachedTileProvider(
maxStale: Duration(days: 30),
store: HiveCacheStore(cachePath, hiveBoxName: 'HiveCacheStore'),
),
),
CurrentLocationLayer(
alignDirectionOnUpdate: AlignOnUpdate.never,
style: const LocationMarkerStyle(
marker: DefaultLocationMarker(
child: Icon(
Icons.navigation,
color: Colors.white,
size: 15,
),
),
markerSize: Size(27, 27),
markerDirection: MarkerDirection.heading,
),
),
MarkerLayer(
markers: gameState.markers.map((feature) {
return Marker(
child: const Icon(Icons.location_on),
// Convert each Feature to a Marker
width: 80.0,
height: 80.0,
point:
LatLng(feature.geometry.latitude, feature.geometry.longitude),
);
}).toList(),
),
],
);
}
}

View File

@ -0,0 +1,53 @@
import 'package:rogapp/features/initializer/camera_check.dart';
import 'package:rogapp/features/initializer/icheck.dart';
import 'package:rogapp/features/initializer/location_check.dart';
class AppInitializer {
final List<ICheck> checks;
AppInitializer()
: checks = [
LocationCheck(),
CameraCheck(),
//NetworkCheck(),
];
Future<bool> permissionStatus() async {
return await LocationCheck().locationPermissionStatus() &&
await CameraCheck().cameraPermissionStatus();
}
Future<bool> initializeApp() async {
if (!await runPreFlightChecks()) {
return false;
}
//await initializeTileCaching();
await loadInitialData();
await configureGlobalSettings();
// Add other initialization tasks as needed
return true;
}
Future<bool> runPreFlightChecks() async {
for (var check in checks) {
if (!await check.check()) {
return false;
}
}
return true;
}
Future<void> initializeTileCaching() async {}
Future<void> loadInitialData() async {
// Logic to preload data that your app will need
}
Future<void> configureGlobalSettings() async {
// Logic to set up any global configurations for your app
}
// You can add more methods for other initialization tasks
}

View File

@ -0,0 +1,19 @@
import 'package:permission_handler/permission_handler.dart';
import 'package:rogapp/features/initializer/icheck.dart';
class CameraCheck implements ICameraCheck {
@override
Future<bool> cameraPermissionStatus() async {
var permission = await Permission.camera.status;
return permission.isGranted;
}
@override
Future<bool> check() async {
var permission = await Permission.camera.status;
if (!permission.isGranted) {
permission = await Permission.camera.request();
}
return permission.isGranted;
}
}

View File

@ -0,0 +1,17 @@
abstract class ICheck {
Future<bool> check();
}
abstract class ILocationCheck extends ICheck {
Future<bool> locationPermissionStatus();
// Additional location-specific methods can be defined here
}
abstract class ICameraCheck extends ICheck {
Future<bool> cameraPermissionStatus();
// Additional camera-specific methods can be defined here
}
abstract class INetworkCheck extends ICheck {
// Additional network-specific methods can be defined here
}

View File

@ -0,0 +1,19 @@
import 'package:permission_handler/permission_handler.dart';
import 'package:geolocator/geolocator.dart';
import 'package:rogapp/features/initializer/icheck.dart';
class LocationCheck implements ILocationCheck {
@override
Future<bool> check() async {
var permission = await Permission.locationWhenInUse.status;
if (!permission.isGranted) {
permission = await Permission.locationWhenInUse.request();
}
return permission.isGranted && await Geolocator.isLocationServiceEnabled();
}
@override
Future<bool> locationPermissionStatus() {
return Permission.locationWhenInUse.isGranted;
}
}

View File

@ -0,0 +1,10 @@
import 'package:connectivity_plus/connectivity_plus.dart';
import 'package:rogapp/features/initializer/icheck.dart';
class NetworkCheck implements INetworkCheck {
@override
Future<bool> check() async {
var connectivityResult = await Connectivity().checkConnectivity();
return connectivityResult != ConnectivityResult.none;
}
}

View File

@ -0,0 +1,19 @@
import 'package:flutter/material.dart';
// This screen shows when user denied and intented to close the app
class DeniedScreen extends StatefulWidget {
const DeniedScreen({super.key});
@override
State<DeniedScreen> createState() => _DeniedScreenState();
}
class _DeniedScreenState extends State<DeniedScreen> {
@override
Widget build(BuildContext context) {
return const Scaffold(
body: Text("Dnied"),
);
}
}

View File

@ -0,0 +1,172 @@
import 'dart:convert';
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:rogapp/features/data/checkpoint.dart';
import 'package:rogapp/features/data/data_provider.dart';
import 'package:rogapp/features/home/home_page.dart';
import 'package:rogapp/features/landing/denied_screen.dart';
import 'package:rogapp/features/initializer/app_initializer.dart';
import 'package:rogapp/features/services/checkpoint_repo.dart';
import 'package:rogapp/features/state/game_state.dart';
import 'package:rogapp/features/state/game_view_model.dart';
// LandingPage serves as the initial screen displayed by the application to perform necessary checks, initialize required values, and set up services essential for the app's functionality.
class LandingPage extends ConsumerStatefulWidget {
const LandingPage({super.key});
@override
ConsumerState<LandingPage> createState() => _LandingPageState();
}
class _LandingPageState extends ConsumerState<LandingPage> {
bool? _isInitialized;
@override
void initState() {
super.initState();
//load only if network available
ref.read(featureCheckpointCollectionProvider.future);
WidgetsBinding.instance.addPostFrameCallback((_) {
_initializeApp();
});
}
@override
Widget build(BuildContext context) {
AsyncValue<FeatureCollection> featureCollection =
ref.watch(featureCheckpointCollectionProvider);
return featureCollection.when(
data: (data) {
if (_isInitialized == null) {
return const MaterialApp(
home: Scaffold(body: Center(child: CircularProgressIndicator())));
}
return _isInitialized! ? const HomePage() : const DeniedScreen();
},
loading: () => const MaterialApp(
home: Scaffold(body: Center(child: CircularProgressIndicator()))),
error: (error, stack) => ErrorScreen(error: error),
);
}
Future<void> _restoreAppState() async {
final dataProvider = ref.read(dataProviderProvider);
// Example values, replace these with actual values from user and event context
String userName =
"current_user"; // Fetch the current user's name or identifier
String teamName = "user_team"; // Fetch the current user's team
String eventCode = "event_code"; // Fetch the current event code
// Load and restore game state
String? gameStateKey = "current_game_state";
String? gameStateValue = await dataProvider.getGameState(
gameStateKey, userName, teamName, eventCode);
if (gameStateValue != null) {
Map<String, dynamic> gameStateData = jsonDecode(gameStateValue);
GameState gameState = GameState.fromMap(gameStateData);
ref.read(gameViewModelProvider.notifier).loadGameState(gameState);
}
// After restoring all necessary states, proceed with the app
setState(() {
_isInitialized = true;
});
}
// Future<void> _restoreAppState() async {
// await _initializeApp();
// // Add additional restoration logic if needed, for example:
// // Restore game state, user progress, etc., from the DataProvider.
// // Example:
// // var gameState = await _dataProvider.getGameState('current_state');
// // Use the gameState to decide what to do next, e.g., navigate to a specific screen.
// if (_isInitialized != true) {
// // If initialization is not done, try to initialize the app.
// _isInitialized = await _initializeApp();
// }
// if (!_isInitialized!) {
// await _showRetryCloseDialog();
// } else {
// setState(() {
// _isInitialized = true;
// });
// }
// }
Future<bool> _initializeApp() async {
AppInitializer initializer = AppInitializer();
// Check if permissions are already granted
bool permissionsAlreadyGranted = await initializer.permissionStatus();
if (!permissionsAlreadyGranted) {
await _showPermissionRequestMessage();
}
// Initialize the app and return the success status.
return await initializer.initializeApp();
}
Future<void> _showPermissionRequestMessage() async {
return showDialog(
context: context,
barrierDismissible: false,
builder: (BuildContext context) => AlertDialog(
title: const Text('Permissions Required'),
content: const Text(
'This app requires certain permissions to function properly. Please grant these permissions in the next steps.'),
actions: <Widget>[
TextButton(
onPressed: () => Navigator.of(context).pop(),
child: const Text('Okay'),
),
],
),
);
}
Future<bool> _requestPermissionsAndInitialize() async {
AppInitializer initializer = AppInitializer();
return await initializer.initializeApp();
}
Future<void> _showRetryCloseDialog() async {
await showDialog(
context: context,
barrierDismissible: false,
builder: (BuildContext context) => AlertDialog(
title: const Text('Initialization Failed'),
content: const Text(
'The app was unable to start properly due to missing permissions.'),
actions: <Widget>[
TextButton(
onPressed: () => Navigator.of(context).pop(),
child: const Text('Close'),
),
TextButton(
onPressed: () async {
Navigator.of(context).pop();
bool retrySuccess = await _requestPermissionsAndInitialize();
if (!retrySuccess) {
await _showRetryCloseDialog();
} else {
setState(() {
_isInitialized = true;
});
}
},
child: const Text('Retry'),
),
],
),
);
}
ErrorScreen({required Object error}) {}
}

View File

@ -0,0 +1,109 @@
import 'dart:async';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:geolocator/geolocator.dart';
import 'package:rogapp/features/data/user_location.dart';
import 'package:rogapp/features/state/game_view_model.dart';
/// The state for the location feature
class LocationState {
final Position? currentPosition;
final bool isStreamPaused;
LocationState({
this.currentPosition,
this.isStreamPaused = false,
});
LocationState copyWith({
Position? currentPosition,
bool? isStreamPaused,
}) {
return LocationState(
currentPosition: currentPosition ?? this.currentPosition,
isStreamPaused: isStreamPaused ?? this.isStreamPaused,
);
}
}
/// A StateNotifier that manages the location state
class LocationNotifier extends StateNotifier<LocationState> {
final Ref ref;
LocationNotifier(this.ref) : super(LocationState()) {
startListening();
startPeriodicUpdates();
}
StreamSubscription<Position>? _positionSubscription;
Position? _lastPosition;
final double _distanceThreshold = 220.0;
Timer? _periodicUpdateTimer;
void startPeriodicUpdates() {
_periodicUpdateTimer?.cancel();
_periodicUpdateTimer = Timer.periodic(Duration(seconds: 5), (timer) {
if (state.currentPosition != null) {
// Convert Position to UserLocation
UserLocation userLocation =
UserLocation.fromPosition(state.currentPosition!);
ref.read(gameViewModelProvider.notifier).updateLocation(userLocation);
}
});
}
void startListening() {
_positionSubscription =
Geolocator.getPositionStream().listen((Position position) {
if (_shouldUpdatePosition(position)) {
state = state.copyWith(currentPosition: position);
_lastPosition = position;
}
});
}
bool _shouldUpdatePosition(Position newPosition) {
if (_lastPosition == null) return true;
double distance = Geolocator.distanceBetween(
_lastPosition!.latitude,
_lastPosition!.longitude,
newPosition.latitude,
newPosition.longitude,
);
return distance < _distanceThreshold;
}
void stopListening() {
_positionSubscription?.cancel();
_positionSubscription = null;
state = state.copyWith(
currentPosition: null); // Reset the position state or handle as needed
}
void pauseListening() {
_positionSubscription?.pause();
}
void resumeListening() {
_positionSubscription?.resume();
}
void updateCurrentPosition(Position? position) {
state = state.copyWith(currentPosition: position);
}
void updateStreamPaused(bool isPaused) {
state = state.copyWith(isStreamPaused: isPaused);
}
@override
void dispose() {
_positionSubscription?.cancel();
super.dispose();
}
}
final locationNotifierProvider =
StateNotifierProvider<LocationNotifier, LocationState>((ref) {
return LocationNotifier(ref); // Pass ref directly
});

View File

@ -0,0 +1,14 @@
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:rogapp/features/data/user.dart';
import 'package:rogapp/features/services/auth_service.dart';
final authProvider =
FutureProvider.family<User?, String>((ref, credentials) async {
// Assuming credentials is a combined string of "email|password"
List<String> parts = credentials.split('|');
String email = parts[0];
String password = parts[1];
AuthService authService = AuthService();
return await authService.userLogin(email, password);
});

View File

@ -0,0 +1,44 @@
import 'package:rogapp/features/data/user.dart';
import '../utils/const.dart';
import 'package:dio/dio.dart';
class AuthService {
Dio dio = Dio();
Future<User?> userLogin(String email, String password) async {
final String serverUrl = ConstValues.currentServer();
final String url = '$serverUrl/api/login/';
try {
final response = await dio.post(
url,
data: {
'email': email,
'password': password,
},
options: Options(
headers: {
'Content-Type': 'application/json; charset=UTF-8',
},
),
);
if (response.statusCode == 200 && response.data != null) {
final data = response.data;
User user = User.fromMap(data["user"]);
final String token = data["token"];
user.auth_token = token;
return user;
}
return null;
} on DioException catch (e) {
print("Dio error: ${e.response?.statusCode} - ${e.message}");
return null;
} catch (e) {
print("Unexpected error: $e");
return null;
}
}
}

View File

@ -0,0 +1,32 @@
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:rogapp/features/data/checkpoint.dart';
import 'package:rogapp/features/data/data_provider.dart';
import 'package:rogapp/features/services/checkpoint_service.dart'; // Import your ApiService file
Future<void> storeFetchedFeatures(FeatureCollection featureCollection) async {
final dataProvider =
DataProvider(); // Ensure DataProvider is initialized appropriately
for (Feature feature in featureCollection.features) {
await dataProvider.insertMarker(feature);
}
}
final checkpointProvider = FutureProvider<List<Feature>>((ref) async {
final dataProvider =
DataProvider(); // Assuming you create or access an instance here
final markers = await dataProvider.getMarkers();
return markers;
});
final featureCheckpointCollectionProvider =
FutureProvider<FeatureCollection>((ref) async {
final apiService =
ApiService(); // Ensure ApiService is initialized appropriately
final featureCollection = await apiService.fetchFeatures();
// Store the fetched features in the local database
await storeFetchedFeatures(featureCollection);
return featureCollection; // Return the fetched feature collection
});

View File

@ -0,0 +1,27 @@
import 'package:dio/dio.dart';
import 'package:rogapp/features/data/checkpoint.dart';
class ApiService {
final Dio _dio = Dio();
Future<FeatureCollection> fetchFeatures() async {
try {
final tmp_url =
"https://rogaining.sumasen.net/api/inbound?rog=True&grp=養老ロゲ&ln1=136.52675654298724&la1=35.19710769333327&ln2=136.52675654298724&la2=35.38264844179004&ln3=136.65061968584442&la3=35.38264844179004&ln4=136.65061968584442&la4=35.19710769333327";
final response = await _dio.get(tmp_url);
if (response.statusCode == 200) {
return FeatureCollection.fromJson(response.data);
} else {
throw Exception('Failed to load features');
}
} on DioException catch (e) {
// Handle Dio errors here
print('Dio error: $e');
throw Exception('Failed to load features');
} catch (e) {
// Handle any other errors
print('General error: $e');
throw Exception('Failed to load features');
}
}
}

View File

@ -0,0 +1,98 @@
import 'package:flutter/material.dart';
import 'package:latlong2/latlong.dart';
import 'package:rogapp/features/data/checkpoint.dart';
import 'package:rogapp/features/data/user_location.dart';
enum GameStatus {
notStarted,
started,
inProgress,
atCheckpoint,
gameCompleted,
}
enum PendingAction {
none,
checkInPhoto,
receiptPhoto,
endGamePhoto,
}
@immutable
class GameState {
final GameStatus status;
final List<Feature> markers;
final UserLocation? currentLocation;
final Set<Feature> visitedMarkers;
final bool isWithinStartRadius;
final bool hasLeftStartArea;
final bool hasVisitedCheckpoint;
final Feature? currentCheckpoint;
final bool checkpointPhotoTaken;
final bool receiptPhotoTaken;
final PendingAction pendingAction;
const GameState({
this.status = GameStatus.notStarted,
this.markers = const [],
this.currentLocation,
this.visitedMarkers = const {},
this.isWithinStartRadius = false,
this.hasLeftStartArea = false,
this.hasVisitedCheckpoint = false,
this.currentCheckpoint,
this.checkpointPhotoTaken = false,
this.receiptPhotoTaken = false,
this.pendingAction = PendingAction.none,
});
LatLng? getUserLatLng() {
return currentLocation != null
? LatLng(currentLocation!.latitude, currentLocation!.longitude)
: null;
}
GameState.fromMap(Map<String, dynamic> map)
: status = GameStatus.values[map['status']],
markers =
List<Feature>.from(map['markers'].map((x) => Feature.fromMap(x))),
currentLocation = UserLocation.fromMap(map['currentLocation']),
visitedMarkers = Set<Feature>.from(
map['visitedMarkers'].map((x) => Feature.fromMap(x))),
isWithinStartRadius = map['isWithinStartRadius'],
hasLeftStartArea = map['hasLeftStartArea'],
hasVisitedCheckpoint = map['hasVisitedCheckpoint'],
currentCheckpoint = map['currentCheckpoint'] != null
? Feature.fromMap(map['currentCheckpoint'])
: null,
checkpointPhotoTaken = map['checkpointPhotoTaken'],
receiptPhotoTaken = map['receiptPhotoTaken'],
pendingAction = PendingAction.values[map['pendingAction']];
GameState copyWith({
GameStatus? status,
List<Feature>? markers,
UserLocation? currentLocation,
Set<Feature>? visitedMarkers,
bool? isWithinStartRadius,
bool? hasLeftStartArea,
bool? hasVisitedCheckpoint,
Feature? currentCheckpoint,
bool? checkpointPhotoTaken,
bool? receiptPhotoTaken,
PendingAction? pendingAction,
}) {
return GameState(
status: status ?? this.status,
markers: markers ?? this.markers,
currentLocation: currentLocation ?? this.currentLocation,
visitedMarkers: visitedMarkers ?? this.visitedMarkers,
isWithinStartRadius: isWithinStartRadius ?? this.isWithinStartRadius,
hasLeftStartArea: hasLeftStartArea ?? this.hasLeftStartArea,
hasVisitedCheckpoint: hasVisitedCheckpoint ?? this.hasVisitedCheckpoint,
currentCheckpoint: currentCheckpoint ?? this.currentCheckpoint,
checkpointPhotoTaken: checkpointPhotoTaken ?? this.checkpointPhotoTaken,
receiptPhotoTaken: receiptPhotoTaken ?? this.receiptPhotoTaken,
pendingAction: pendingAction ?? this.pendingAction);
}
}

View File

@ -0,0 +1,199 @@
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:latlong2/latlong.dart';
import 'package:rogapp/features/data/checkpoint.dart';
import 'package:rogapp/features/data/data_provider.dart';
import 'package:rogapp/features/data/user_location.dart';
import 'package:rogapp/features/state/game_state.dart';
import 'package:rogapp/features/utils/params.dart';
final gameViewModelProvider =
StateNotifierProvider<GameViewModel, GameState>((ref) {
final dataProvider = DataProvider();
return GameViewModel(dataProvider);
});
class GameViewModel extends StateNotifier<GameState> {
final DataProvider _dataProvider;
GameViewModel(this._dataProvider) : super(const GameState()) {
loadInitialData();
}
Future<void> loadInitialData() async {
List<Feature> markers = await _dataProvider.getMarkers();
state = state.copyWith(markers: markers);
}
void setMarkers(List<Feature> markers) {
state = state.copyWith(markers: markers);
}
void startGame() {
if (state.isWithinStartRadius) {
state = state.copyWith(status: GameStatus.started);
}
}
void updateLocation(UserLocation location) {
Feature startMarker = state.markers.firstWhere(
(marker) => marker.properties.cp == -1,
orElse: () => Feature.empty());
List<Feature> checkpoints =
state.markers.where((marker) => marker.properties.cp != -1).toList();
bool isWithinStartRadius =
_checkProximity(location, startMarker /* start marker location */
);
bool hasLeftArea =
state.hasLeftStartArea || _checkHasLeftStartArea(location, startMarker);
Feature? atCheckpoint = _checkAtAnyCheckpoint(location, checkpoints);
// Check if at any checkpoint (except start point after game started)
bool isAtCheckpoint =
state.status == GameStatus.started && atCheckpoint != null;
if (isAtCheckpoint) {
_handleCheckpointArrival(location, atCheckpoint);
}
// Update game state based on the new location
state = state.copyWith(
currentLocation: location,
isWithinStartRadius: isWithinStartRadius,
hasLeftStartArea: hasLeftArea,
status: isAtCheckpoint ? GameStatus.atCheckpoint : state.status,
);
}
void _handleCheckpointArrival(UserLocation location, Feature marker) {
// Directly set the current checkpoint; no need to check if the photo was taken here
state = state.copyWith(currentCheckpoint: marker);
// If no checkpoint photo has been taken yet, set the pending action to take a checkpoint photo
if (!state.checkpointPhotoTaken) {
state = state.copyWith(pendingAction: PendingAction.checkInPhoto);
}
// Additional actions specific to buy points can be prepared here, but it's usually better
// to handle them after the checkpoint photo is submitted, not at the moment of arrival.
}
void submitCheckInPhoto(String photoPath) {
// Logic to save or upload the check-in photo...
state = state.copyWith(checkpointPhotoTaken: true);
// Determine the next action based on the checkpoint type
if (state.currentCheckpoint != null &&
isBuyPoint(state.currentCheckpoint!)) {
state = state.copyWith(pendingAction: PendingAction.receiptPhoto);
} else {
// If it's not a buy point, mark the checkpoint visit as complete
_markCheckpointVisited(state.currentCheckpoint!);
}
}
void submitReceiptPhoto(String photoPath) {
// Logic to save or upload the receipt photo...
state = state.copyWith(receiptPhotoTaken: true);
// After submitting the receipt photo, mark the checkpoint visit as complete
_markCheckpointVisited(state.currentCheckpoint!);
}
void _markCheckpointVisited(Feature checkpoint) {
state = state.copyWith(
visitedMarkers: Set.from(state.visitedMarkers)..add(checkpoint),
hasVisitedCheckpoint: true,
pendingAction: PendingAction.none, // Reset the pending action
);
// Additional logic to determine if the game is completed...
}
bool isBuyPoint(Feature checkpoint) {
if (checkpoint.properties.buyPoint != null) {
return true;
}
return false;
}
bool _checkProximity(UserLocation location, Feature startMarker) {
const Distance distance = Distance();
return distance(
LatLng(location.latitude, location.longitude),
LatLng(startMarker.geometry.latitude,
startMarker.geometry.longitude)) <=
startMinDistance;
}
bool _checkHasLeftStartArea(UserLocation location, Feature startMarker) {
const Distance distance = Distance();
return distance(
LatLng(location.latitude, location.longitude),
LatLng(startMarker.geometry.latitude,
startMarker.geometry.longitude)) >=
minAwayfromStartDistance;
}
Feature? _checkAtAnyCheckpoint(UserLocation location, List<Feature> markers) {
const Distance distance = Distance();
for (Feature marker in markers) {
final double distanceInMeters = distance(
LatLng(location.latitude, location.longitude),
LatLng(marker.geometry.latitude, marker.geometry.longitude),
);
if (marker.properties.checkinRadious != null &&
marker.properties.checkinRadious! >= distanceInMeters) {
return marker;
}
}
return null;
}
Feature? _getCheckpointFromLocation(UserLocation location) {
const thresholdDistance = 50.0; // meters, adjust based on your game design
const Distance distance = Distance();
for (final marker in state.markers) {
final double distanceInMeters = distance(
LatLng(location.latitude, location.longitude),
LatLng(marker.geometry.latitude, marker.geometry.longitude),
);
if (distanceInMeters <=
(marker.properties.checkinRadious ?? thresholdDistance)) {
return marker;
}
}
return null; // No checkpoint is close enough to the user's location
}
bool _isBackAtStart(UserLocation location) {
const startThresholdDistance = 150.0; // Define proximity threshold
const Distance distance = Distance();
// Assuming the start point is the first marker
// Adjust based on your game's logic
final startPoint = state.markers.first;
final double distanceToStart = distance(
LatLng(location.latitude, location.longitude),
LatLng(startPoint.geometry.latitude, startPoint.geometry.longitude),
);
// User is considered back at the start if within the threshold distance
return distanceToStart <= startThresholdDistance;
}
void endGame() {
if (state.status == GameStatus.gameCompleted) {
// Perform any end game actions
}
}
void loadGameState(GameState gameState) {
state = gameState;
}
}

View File

@ -0,0 +1,18 @@
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:rogapp/features/data/user.dart';
class UserNotifier extends StateNotifier<User?> {
UserNotifier() : super(null);
void setUser(User? user) {
state = user;
}
void clearUser() {
state = null;
}
}
final userNotifierProvider = StateNotifierProvider<UserNotifier, User?>((ref) {
return UserNotifier();
});

View File

@ -0,0 +1,13 @@
class ConstValues {
static const container_svr = "http://container.intranet.sumasen.net:8100";
static const server_uri = "https://rogaining.sumasen.net";
static const dev_server = "http://localhost:8100";
static const dev_ip_server = "http://192.168.8.100:8100";
static const dev_home_ip_server = "http://172.20.10.9:8100";
static const dev_home_ip_mserver = "http://192.168.1.10:8100";
static String currentServer() {
//return dev_ip_server;
return server_uri;
}
}

View File

@ -0,0 +1,29 @@
import 'dart:math';
import 'package:latlong2/latlong.dart';
class DistanceCalculatorHS {
static const int _radius = 6371; // Radius of the Earth in kilometers
static double _degreeToRadian(double degree) {
return degree * pi / 180;
}
static double calculateDistance(LatLng location1, LatLng location2) {
double latDistance =
_degreeToRadian(location2.latitude - location1.latitude);
double lonDistance =
_degreeToRadian(location2.longitude - location1.longitude);
double a = sin(latDistance / 2) * sin(latDistance / 2) +
cos(_degreeToRadian(location1.latitude)) *
cos(_degreeToRadian(location2.latitude)) *
sin(lonDistance / 2) *
sin(lonDistance / 2);
double c = 2 * atan2(sqrt(a), sqrt(1 - a));
double distance = _radius * c * 1000; // Convert to meters
return distance;
}
}

View File

@ -0,0 +1,17 @@
import 'package:flutter_riverpod/flutter_riverpod.dart';
final errorReportingProvider = Provider<ErrorReporter>((ref) {
return ErrorReporterImpl();
});
class ErrorReporter {
void reportError(Object error, StackTrace stackTrace) {}
}
class ErrorReporterImpl extends ErrorReporter {
@override
void reportError(Object error, StackTrace stackTrace) {
// Send error and stackTrace to the server
// Include app state if necessary
}
}

View File

@ -0,0 +1,2 @@
int startMinDistance = 150;
int minAwayfromStartDistance = 300;

View File

@ -1,147 +1,47 @@
import 'dart:async';
import 'package:flutter/material.dart';
import 'package:flutter_map_tile_caching/flutter_map_tile_caching.dart';
import 'package:get/get.dart';
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/location_controller.dart';
import 'package:rogapp/utils/string_values.dart';
import 'package:shared_preferences/shared_preferences.dart';
// import 'package:is_lock_screen/is_lock_screen.dart';
import 'package:rogapp/features/landing/landing_page.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:rogapp/features/utils/error_reporter.dart';
void saveGameState() async {
DestinationController destinationController =
Get.find<DestinationController>();
SharedPreferences pref = await SharedPreferences.getInstance();
pref.setBool("is_in_rog", destinationController.isInRog.value);
pref.setBool(
"rogaining_counted", destinationController.rogainingCounted.value);
pref.setBool("ready_for_goal", DestinationController.ready_for_goal);
}
void restoreGame() async {
SharedPreferences pref = await SharedPreferences.getInstance();
DestinationController destinationController =
Get.find<DestinationController>();
destinationController.skipGps = false;
destinationController.isInRog.value = pref.getBool("is_in_rog") ?? false;
destinationController.rogainingCounted.value =
pref.getBool("rogaining_counted") ?? false;
DestinationController.ready_for_goal =
pref.getBool("ready_for_goal") ?? false;
//print(
// "--restored -- destinationController.isInRog.value ${pref.getBool("is_in_rog")} -- ${pref.getBool("rogaining_counted")}");
void reportError(
ProviderContainer container, Object error, StackTrace stackTrace) {
// Log the error locally or report to a server
print('Caught an error: $error');
container.read(errorReportingProvider).reportError(error, stackTrace);
}
void main() async {
WidgetsFlutterBinding.ensureInitialized();
await FlutterMapTileCaching.initialise();
final StoreDirectory instanceA = FMTC.instance('OpenStreetMap (A)');
await instanceA.manage.createAsync();
await instanceA.metadata.addAsync(
key: 'sourceURL',
value: 'https://cyberjapandata.gsi.go.jp/xyz/std/{z}/{x}/{y}.png',
);
await instanceA.metadata.addAsync(
key: 'validDuration',
value: '14',
);
await instanceA.metadata.addAsync(
key: 'behaviour',
value: 'cacheFirst',
);
runApp(const MyApp());
final container = ProviderContainer();
runZonedGuarded(() {
runApp(UncontrolledProviderScope(container: container, child: const App()));
FlutterError.onError = (FlutterErrorDetails details) {
final error = details.exception;
final stackTrace = details.stack ?? StackTrace.current;
reportError(container, error, stackTrace);
};
}, (error, stackTrace) {
reportError(container, error, stackTrace ?? StackTrace.current);
});
}
class MyApp extends StatefulWidget {
const MyApp({Key? key}) : super(key: key);
class App extends StatelessWidget {
const App({super.key});
@override
State<MyApp> createState() => _MyAppState();
}
class _MyAppState extends State<MyApp> with WidgetsBindingObserver {
// This widget is the root of your application.
@override
void initState() {
super.initState();
if (context.mounted) {
restoreGame();
}
WidgetsBinding.instance.addObserver(this);
}
@override
void dispose() {
WidgetsBinding.instance.removeObserver(this);
super.dispose();
}
// void saveGameState() async {
// DestinationController destinationController = Get.find<DestinationController>();
// SharedPreferences pref = await SharedPreferences.getInstance();
// pref.setBool("is_in_rog", destinationController.is_in_rog.value);
// pref.setBool("rogaining_counted", destinationController.rogaining_counted.value);
// }
@override
void didChangeAppLifecycleState(AppLifecycleState state) {
LocationController locationController = Get.find<LocationController>();
DestinationController destinationController =
Get.find<DestinationController>();
switch (state) {
case AppLifecycleState.resumed:
locationController.resumePositionStream();
//print("RESUMED");
restoreGame();
break;
case AppLifecycleState.inactive:
locationController.resumePositionStream();
//print("INACTIVE");
break;
case AppLifecycleState.paused:
locationController.resumePositionStream();
//print("PAUSED");
saveGameState();
break;
case AppLifecycleState.detached:
locationController.resumePositionStream();
//print("DETACHED");
saveGameState();
break;
case AppLifecycleState.hidden:
locationController.resumePositionStream();
//print("DETACHED");
saveGameState();
break;
}
}
@override
Widget build(BuildContext context) {
return GetMaterialApp(
translations: StringValues(),
locale: const Locale('ja', 'JP'),
//locale: const Locale('en', 'US'),
fallbackLocale: const Locale('en', 'US'),
title: 'ROGAINING',
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
colorScheme: ColorScheme.fromSeed(
seedColor: const Color.fromARGB(255, 36, 135, 221)),
seedColor: const Color.fromARGB(255, 0, 35, 140)), //Samurai Blue
useMaterial3: true,
),
debugShowCheckedModeBanner: false,
defaultTransition: Transition.cupertino,
opaqueRoute: Get.isOpaqueRouteDefault,
popGesture: Get.isPopGestureEnable,
transitionDuration: const Duration(milliseconds: 230),
initialBinding: IndexBinding(), //HomeBinding(),
initialRoute: AppPages.PERMISSION,
getPages: AppPages.routes,
enableLog: true,
home: const LandingPage(),
);
}
}

146
lib/main_mapsix.dart Normal file
View File

@ -0,0 +1,146 @@
// import 'package:flutter/material.dart';
// import 'package:flutter_map_tile_caching/flutter_map_tile_caching.dart';
// import 'package:get/get.dart';
// 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/location_controller.dart';
// import 'package:rogapp/utils/string_values.dart';
// import 'package:shared_preferences/shared_preferences.dart';
// // import 'package:is_lock_screen/is_lock_screen.dart';
// void saveGameState() async {
// DestinationController destinationController =
// Get.find<DestinationController>();
// SharedPreferences pref = await SharedPreferences.getInstance();
// pref.setBool("is_in_rog", destinationController.isInRog.value);
// pref.setBool(
// "rogaining_counted", destinationController.rogainingCounted.value);
// pref.setBool("ready_for_goal", DestinationController.ready_for_goal);
// }
// void restoreGame() async {
// SharedPreferences pref = await SharedPreferences.getInstance();
// DestinationController destinationController =
// Get.find<DestinationController>();
// destinationController.skipGps = false;
// destinationController.isInRog.value = pref.getBool("is_in_rog") ?? false;
// destinationController.rogainingCounted.value =
// pref.getBool("rogaining_counted") ?? false;
// DestinationController.ready_for_goal =
// pref.getBool("ready_for_goal") ?? false;
// //print(
// // "--restored -- destinationController.isInRog.value ${pref.getBool("is_in_rog")} -- ${pref.getBool("rogaining_counted")}");
// }
// void main() async {
// WidgetsFlutterBinding.ensureInitialized();
// await FlutterMapTileCaching.initialise();
// final StoreDirectory instanceA = FMTC.instance('OpenStreetMap (A)');
// await instanceA.manage.createAsync();
// await instanceA.metadata.addAsync(
// key: 'sourceURL',
// value: 'https://cyberjapandata.gsi.go.jp/xyz/std/{z}/{x}/{y}.png',
// );
// await instanceA.metadata.addAsync(
// key: 'validDuration',
// value: '14',
// );
// await instanceA.metadata.addAsync(
// key: 'behaviour',
// value: 'cacheFirst',
// );
// runApp(const MyApp());
// }
// class MyApp extends StatefulWidget {
// const MyApp({Key? key}) : super(key: key);
// @override
// State<MyApp> createState() => _MyAppState();
// }
// class _MyAppState extends State<MyApp> with WidgetsBindingObserver {
// // This widget is the root of your application.
// @override
// void initState() {
// super.initState();
// if (context.mounted) {
// restoreGame();
// }
// WidgetsBinding.instance.addObserver(this);
// }
// @override
// void dispose() {
// WidgetsBinding.instance.removeObserver(this);
// super.dispose();
// }
// // void saveGameState() async {
// // DestinationController destinationController = Get.find<DestinationController>();
// // SharedPreferences pref = await SharedPreferences.getInstance();
// // pref.setBool("is_in_rog", destinationController.is_in_rog.value);
// // pref.setBool("rogaining_counted", destinationController.rogaining_counted.value);
// // }
// @override
// void didChangeAppLifecycleState(AppLifecycleState state) {
// LocationController locationController = Get.find<LocationController>();
// DestinationController destinationController =
// Get.find<DestinationController>();
// switch (state) {
// case AppLifecycleState.resumed:
// locationController.resumePositionStream();
// //print("RESUMED");
// restoreGame();
// break;
// case AppLifecycleState.inactive:
// locationController.resumePositionStream();
// //print("INACTIVE");
// break;
// case AppLifecycleState.paused:
// locationController.resumePositionStream();
// //print("PAUSED");
// saveGameState();
// break;
// case AppLifecycleState.detached:
// locationController.resumePositionStream();
// //print("DETACHED");
// saveGameState();
// break;
// case AppLifecycleState.hidden:
// locationController.resumePositionStream();
// //print("DETACHED");
// saveGameState();
// break;
// }
// }
// @override
// Widget build(BuildContext context) {
// return GetMaterialApp(
// translations: StringValues(),
// locale: const Locale('ja', 'JP'),
// //locale: const Locale('en', 'US'),
// fallbackLocale: const Locale('en', 'US'),
// title: 'ROGAINING',
// theme: ThemeData(
// colorScheme: ColorScheme.fromSeed(
// seedColor: const Color.fromARGB(255, 36, 135, 221)),
// useMaterial3: true,
// ),
// debugShowCheckedModeBanner: false,
// defaultTransition: Transition.cupertino,
// opaqueRoute: Get.isOpaqueRouteDefault,
// popGesture: Get.isPopGestureEnable,
// transitionDuration: const Duration(milliseconds: 230),
// initialBinding: IndexBinding(), //HomeBinding(),
// initialRoute: AppPages.PERMISSION,
// getPages: AppPages.routes,
// enableLog: true,
// );
// }
// }

View File

@ -1,61 +1,61 @@
import 'package:flutter/material.dart';
import 'package:flutter_map_tile_caching/flutter_map_tile_caching.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:rogapp/nrog/pages/permission_page.dart';
// import 'package:flutter/material.dart';
// import 'package:flutter_map_tile_caching/flutter_map_tile_caching.dart';
// import 'package:flutter_riverpod/flutter_riverpod.dart';
// import 'package:rogapp/nrog/pages/permission_page.dart';
void main() async {
WidgetsFlutterBinding.ensureInitialized();
// void main() async {
// WidgetsFlutterBinding.ensureInitialized();
await FlutterMapTileCaching.initialise();
final StoreDirectory instanceA = FMTC.instance('OpenStreetMap (A)');
await instanceA.manage.createAsync();
await instanceA.metadata.addAsync(
key: 'sourceURL',
value: 'https://cyberjapandata.gsi.go.jp/xyz/std/{z}/{x}/{y}.png',
);
await instanceA.metadata.addAsync(
key: 'validDuration',
value: '14',
);
await instanceA.metadata.addAsync(
key: 'behaviour',
value: 'cacheFirst',
);
runApp(
const ProviderScope(child: MyApp()),
);
}
// await FlutterMapTileCaching.initialise();
// final StoreDirectory instanceA = FMTC.instance('OpenStreetMap (A)');
// await instanceA.manage.createAsync();
// await instanceA.metadata.addAsync(
// key: 'sourceURL',
// value: 'https://cyberjapandata.gsi.go.jp/xyz/std/{z}/{x}/{y}.png',
// );
// await instanceA.metadata.addAsync(
// key: 'validDuration',
// value: '14',
// );
// await instanceA.metadata.addAsync(
// key: 'behaviour',
// value: 'cacheFirst',
// );
// runApp(
// const ProviderScope(child: MyApp()),
// );
// }
class MyApp extends StatefulWidget {
const MyApp({super.key});
// class MyApp extends StatefulWidget {
// const MyApp({super.key});
@override
State<MyApp> createState() => _MyAppState();
}
// @override
// State<MyApp> createState() => _MyAppState();
// }
class _MyAppState extends State<MyApp> with WidgetsBindingObserver {
@override
void initState() {
super.initState();
WidgetsBinding.instance.addObserver(this);
}
// class _MyAppState extends State<MyApp> with WidgetsBindingObserver {
// @override
// void initState() {
// super.initState();
// WidgetsBinding.instance.addObserver(this);
// }
@override
void dispose() {
WidgetsBinding.instance.removeObserver(this);
super.dispose();
}
// @override
// void dispose() {
// WidgetsBinding.instance.removeObserver(this);
// super.dispose();
// }
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
title: 'Flutter Demo',
theme: ThemeData(
colorScheme: ColorScheme.fromSeed(
seedColor: const Color.fromARGB(255, 124, 156, 9)),
useMaterial3: true,
),
home: const PermissionPage());
}
}
// @override
// Widget build(BuildContext context) {
// return MaterialApp(
// debugShowCheckedModeBanner: false,
// title: 'Flutter Demo',
// theme: ThemeData(
// colorScheme: ColorScheme.fromSeed(
// seedColor: const Color.fromARGB(255, 124, 156, 9)),
// useMaterial3: true,
// ),
// home: const PermissionPage());
// }
// }

View File

@ -95,7 +95,7 @@ class _HomePageState extends ConsumerState<HomePage> {
// .hideAllPopups(), // Hide popup when the map is tapped.
),
children: [
const BaseLayer(),
//const BaseLayer(),
CurrentLocationLayer(
followOnLocationUpdate: FollowOnLocationUpdate.once,
turnOnHeadingUpdate: TurnOnHeadingUpdate.never,

View File

@ -6,6 +6,6 @@ class DestinationBinding extends Bindings {
@override
void dependencies() {
Get.put<DestinationController>(DestinationController());
restoreGame();
//restoreGame();
}
}

View File

@ -561,14 +561,7 @@ class DestinationController extends GetxController {
}
});
} else {
Get.snackbar(
"始まっていません",
"ロゲ開始ボタンをタップして、ロゲイニングを始める必要があります",
icon: const Icon(Icons.assistant_photo_outlined, size: 40.0, color: Colors.blue),
snackPosition: SnackPosition.TOP,
duration: const Duration(seconds: 3),
backgroundColor: Colors.yellow,
);
Get.snackbar("始まっていない", "ロゲイニングを始める必要があります");
}
}
}
@ -657,7 +650,7 @@ class DestinationController extends GetxController {
}
isInRog.value = true;
saveGameState();
//saveGameState();
}
Future<void> cancelBuyPoint(Destination destination) async {
@ -938,11 +931,7 @@ class DestinationController extends GetxController {
}
void centerMapToCurrentLocation() {
assert(() {
print("center is ${currentLon}, ${currentLon}");
return true;
}());
// Akira
if (currentLat != 0 || currentLon != 0) {
indexController.mapController.move(LatLng(currentLat, currentLon), 17.0);
}

View File

@ -155,7 +155,7 @@ class DestinationMapPage extends StatelessWidget {
interactiveFlags: InteractiveFlag.pinchZoom | InteractiveFlag.drag,
),
children: [
const BaseLayer(),
//const BaseLayer(),
Obx(
() => indexController.routePointLenght > 0
? PolylineLayer(

View File

@ -123,7 +123,7 @@ class _GpsPageState extends State<GpsPage> {
onTap: (tapPos, cord) {}, // Hide popup when the map is tapped.
),
children: [
const BaseLayer(),
//const BaseLayer(),
MarkerLayer(
markers: gpsData.map((i) {
return Marker(

View File

@ -116,8 +116,8 @@ class IndexController extends GetxController {
@override
void onInit() {
_connectivitySubscription =
_connectivity.onConnectivityChanged.listen(_updateConnectionStatus);
// _connectivitySubscription =
// _connectivity.onConnectivityChanged.listen(_updateConnectionStatus);
super.onInit();
}
@ -133,16 +133,16 @@ class IndexController extends GetxController {
}
Future<void> initConnectivity() async {
late ConnectivityResult result;
// Platform messages may fail, so we use a try/catch PlatformException.
try {
result = await _connectivity.checkConnectivity();
} on PlatformException catch (_) {
//print('Couldn\'t check connectivity status --- $e');
return;
}
// late ConnectivityResult result;
// // Platform messages may fail, so we use a try/catch PlatformException.
// try {
// //result = await _connectivity.checkConnectivity();
// } on PlatformException catch (_) {
// //print('Couldn\'t check connectivity status --- $e');
// return;
// }
return _updateConnectionStatus(result);
// return _updateConnectionStatus(result);
}
LatLngBounds boundsFromLatLngList(List<LatLng> list) {
@ -172,11 +172,11 @@ class IndexController extends GetxController {
} else {
isLoading.value = false;
Get.snackbar(
"ログイン失敗",
"ログインIDかパスワードを確認して下さい。",
"Failed",
"User login failed, please try again.",
icon: const Icon(Icons.error, size: 40.0, color: Colors.blue),
snackPosition: SnackPosition.TOP,
duration: const Duration(seconds: 3),
duration: const Duration(milliseconds: 800),
backgroundColor: Colors.yellow,
//icon:Image(image:AssetImage("assets/images/dora.png"))
);
@ -282,7 +282,6 @@ class IndexController extends GetxController {
});
}
/*
void loadLocationsBound() {
if (isCustomAreaSelected.value == true) {
return;
@ -321,7 +320,7 @@ class IndexController extends GetxController {
icon: const Icon(Icons.assistant_photo_outlined,
size: 40.0, color: Colors.blue),
snackPosition: SnackPosition.TOP,
duration: const Duration(seconds: 2),
duration: const Duration(milliseconds: 800),
backgroundColor: Colors.yellow,
//icon:Image(image:AssetImage("assets/images/dora.png"))
);
@ -334,73 +333,6 @@ class IndexController extends GetxController {
}
});
}
*/
// 2024-04-03 Akira .. Update the code . See ticket 2800.
//
void loadLocationsBound() {
if (isCustomAreaSelected.value == true) {
return;
}
locations.clear();
String cat = currentCat.isNotEmpty ? currentCat[0] : "";
if (currentCat.isNotEmpty && currentCat[0] == "-all-") {
cat = "";
}
LatLngBounds bounds = mapController.bounds!;
currentBound.clear();
currentBound.add(bounds);
isLoading.value = true; // ローディング状態をtrueに設定
LocationService.loadLocationsBound(
bounds.southWest.latitude,
bounds.southWest.longitude,
bounds.northWest.latitude,
bounds.northWest.longitude,
bounds.northEast.latitude,
bounds.northEast.longitude,
bounds.southEast.latitude,
bounds.southEast.longitude,
cat
).then((value) {
isLoading.value = false; // ローディング状態をfalseに設定
if (value == null) {
// APIからのレスポンスがnullの場合は処理を中断
return;
}
if (value.features.isEmpty) {
if (showPopup == false) {
return;
}
Get.snackbar(
"Too many Points",
"please zoom in",
icon: const Icon(Icons.assistant_photo_outlined, size: 40.0, color: Colors.blue),
snackPosition: SnackPosition.TOP,
duration: const Duration(seconds: 3),
backgroundColor: Colors.yellow,
);
showPopup = false;
}
if (value.features.isNotEmpty) {
locations.add(value);
}
}).catchError((error) {
isLoading.value = false; // ローディング状態をfalseに設定
// エラーハンドリング: APIリクエストが失敗した場合
Get.snackbar(
"Error",
"Failed to load locations. Please check your internet connection and try again.",
icon: const Icon(Icons.error, size: 40.0, color: Colors.red),
snackPosition: SnackPosition.TOP,
duration: const Duration(milliseconds: 800),
backgroundColor: Colors.yellow,
);
});
}
void setBound(LatLngBounds bounds) {
currentBound.clear();

View File

@ -16,12 +16,6 @@ class LoginPage extends StatelessWidget {
return Scaffold(
resizeToAvoidBottomInset: false,
backgroundColor: Colors.white,
appBar: AppBar(
elevation: 0,
backgroundColor: Colors.white,
automaticallyImplyLeading: false,
),
/* 2024-04-03 Updated by Akira . See https://wiki.sumasen.net/issues/2796?issue_count=1&issue_position=1
appBar: AppBar(
elevation: 0,
backgroundColor: Colors.white,
@ -35,7 +29,6 @@ class LoginPage extends StatelessWidget {
color: Colors.black,
)),
),
*/
body: indexController.currentUser.isEmpty
? SizedBox(
width: double.infinity,
@ -95,7 +88,7 @@ class LoginPage extends StatelessWidget {
MaterialButton(
minWidth: double.infinity,
height: 40,
onPressed: () async {
onPressed: () {
if (emailController.text.isEmpty ||
passwordController
.text.isEmpty) {
@ -111,7 +104,7 @@ class LoginPage extends StatelessWidget {
snackPosition:
SnackPosition.TOP,
duration: const Duration(
seconds: 3),
milliseconds: 800),
backgroundColor: Colors.yellow,
//icon:Image(image:AssetImage("assets/images/dora.png"))
);
@ -123,30 +116,6 @@ class LoginPage extends StatelessWidget {
emailController.text,
passwordController.text,
context);
/*
try {
bool isLoggedIn = await indexController.login(emailController.text, passwordController.text,context);
if (isLoggedIn) {
Get.offAllNamed(AppPages.INDEX);
} else {
Get.snackbar(
"Login Failed",
"Invalid email or password",
icon: const Icon(Icons.error, color: Colors.red),
snackPosition: SnackPosition.BOTTOM,
);
}
} catch (e) {
Get.snackbar(
"Error",
"An error occurred during login",
icon: const Icon(Icons.error, color: Colors.red),
snackPosition: SnackPosition.BOTTOM,
);
} finally {
indexController.isLoading.value = false;
}
*/ // ここまで
},
color: Colors.indigoAccent[400],
shape: RoundedRectangleBorder(
@ -159,16 +128,6 @@ class LoginPage extends StatelessWidget {
fontSize: 16,
color: Colors.white70),
),
/*
child: Obx(
() => indexController.isLoading.value
? const CircularProgressIndicator(color: Colors.white)
: const Text(
"ログイン",
style: TextStyle(fontWeight: FontWeight.w600, fontSize: 16, color: Colors.white70),
),
),
*/ // ここまで
),
const SizedBox(
height: 5.0,

View File

@ -107,7 +107,7 @@ class LocationService {
'$serverUrl/api/inbound?ln1=$lon1&la1=$lat1&ln2=$lon2&la2=$lat2&ln3=$lon3&la3=$lat3&ln4=$lon4&la4=$lat4';
}
}
//print('++++++++$url');
print('++++++++$url');
final response = await http.get(
Uri.parse(url),
headers: <String, String>{

View File

@ -129,7 +129,7 @@ class StringValues extends Translations{
'finishing_rogaining' : 'ロゲイニングを終えて',
'cp_pls_take_photo' : "CPです。撮影してください。",
'take_photo of the clock' : '時計の写真を撮る',
'finish_goal': 'ゴール完了',
'finish_goal': 'フィニッシュゴール',
'goal_saved': "目標を保存しました",
'goal_added_successfuly' : '目標が正常に追加されました',
'goal_not_added' : '目標が追加されていません',

View File

@ -1,24 +1,24 @@
import 'package:flutter/material.dart';
import 'package:flutter_map/flutter_map.dart';
import 'package:flutter_map_tile_caching/flutter_map_tile_caching.dart';
// import 'package:flutter/material.dart';
// import 'package:flutter_map/flutter_map.dart';
// import 'package:flutter_map_tile_caching/flutter_map_tile_caching.dart';
class BaseLayer extends StatelessWidget {
const BaseLayer({Key? key}) : super(key: key);
// class BaseLayer extends StatelessWidget {
// const BaseLayer({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return TileLayer(
urlTemplate: "https://cyberjapandata.gsi.go.jp/xyz/std/{z}/{x}/{y}.png",
tileProvider: FMTC.instance('OpenStreetMap (A)').getTileProvider(
settings: FMTCTileProviderSettings(
behavior: CacheBehavior.values.byName('cacheFirst'),
cachedValidDuration: const Duration(days: 14),
),
),
);
}
}
// @override
// Widget build(BuildContext context) {
// return TileLayer(
// urlTemplate: "https://cyberjapandata.gsi.go.jp/xyz/std/{z}/{x}/{y}.png",
// tileProvider: FMTC.instance('OpenStreetMap (A)').getTileProvider(
// settings: FMTCTileProviderSettings(
// behavior: CacheBehavior.values.byName('cacheFirst'),
// cachedValidDuration: const Duration(days: 14),
// ),
// ),
// );
// }
// }
// var Esri_WorldImagery = L.tileLayer('https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}', {
// attribution: 'Tiles &copy; Esri &mdash; Source: Esri, i-cubed, USDA, USGS, AEX, GeoEye, Getmapping, Aerogrid, IGN, IGP, UPR-EGP, and the GIS User Community'
// });
// // var Esri_WorldImagery = L.tileLayer('https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}', {
// // attribution: 'Tiles &copy; Esri &mdash; Source: Esri, i-cubed, USDA, USGS, AEX, GeoEye, Getmapping, Aerogrid, IGN, IGP, UPR-EGP, and the GIS User Community'
// // });

View File

@ -111,14 +111,10 @@ class BottomSheetNew extends GetView<BottomSheetController> {
}
Widget getActionButton(BuildContext context, Destination destination) {
assert(() {
print("getActionButton ${destinationController.rogainingCounted.value}");
print("getActionButton ${destinationController.distanceToStart()}");
print("getActionButton ${destination.cp}");
print("getActionButton ${DestinationController.ready_for_goal}");
return true;
}());
// ...2024-04-03 Akira デバッグモードのみ出力するようにした。
Destination cdest = destinationController
.festuretoDestination(indexController.currentFeature[0]);
@ -199,7 +195,7 @@ class BottomSheetNew extends GetView<BottomSheetController> {
destinationController.currentLon,
destination.location_id!,
);
saveGameState();
//saveGameState();
await ExternalService().startRogaining();
Get.back(); // Close the dialog and potentially navigate away
},

View File

@ -181,12 +181,7 @@ class _MapWidgetState extends State<MapWidget> {
}
void _centerMapOnUser() {
assert(() {
print("showBottomSheet ${destinationController.shouldShowBottomSheet}");
return true;
}());
// 2024-04-03 Akira Log enabled only debug mode..
//
//if (destinationController.shouldShowBottomSheet) {
destinationController.centerMapToCurrentLocation();
//}
@ -242,7 +237,7 @@ class _MapWidgetState extends State<MapWidget> {
.hideAllPopups(), // Hide popup when the map is tapped.
),
children: [
const BaseLayer(),
//const BaseLayer(),
Obx(
() => indexController.routePointLenght > 0
? PolylineLayer(

View File

@ -7,16 +7,12 @@
#include "generated_plugin_registrant.h"
#include <file_selector_linux/file_selector_plugin.h>
#include <isar_flutter_libs/isar_flutter_libs_plugin.h>
#include <url_launcher_linux/url_launcher_plugin.h>
void fl_register_plugins(FlPluginRegistry* registry) {
g_autoptr(FlPluginRegistrar) file_selector_linux_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "FileSelectorPlugin");
file_selector_plugin_register_with_registrar(file_selector_linux_registrar);
g_autoptr(FlPluginRegistrar) isar_flutter_libs_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "IsarFlutterLibsPlugin");
isar_flutter_libs_plugin_register_with_registrar(isar_flutter_libs_registrar);
g_autoptr(FlPluginRegistrar) url_launcher_linux_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "UrlLauncherPlugin");
url_launcher_plugin_register_with_registrar(url_launcher_linux_registrar);

View File

@ -4,7 +4,6 @@
list(APPEND FLUTTER_PLUGIN_LIST
file_selector_linux
isar_flutter_libs
url_launcher_linux
)

View File

@ -8,7 +8,6 @@ import Foundation
import connectivity_plus
import file_selector_macos
import geolocator_apple
import isar_flutter_libs
import path_provider_foundation
import shared_preferences_foundation
import sqflite
@ -18,7 +17,6 @@ func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
ConnectivityPlugin.register(with: registry.registrar(forPlugin: "ConnectivityPlugin"))
FileSelectorPlugin.register(with: registry.registrar(forPlugin: "FileSelectorPlugin"))
GeolocatorPlugin.register(with: registry.registrar(forPlugin: "GeolocatorPlugin"))
IsarFlutterLibsPlugin.register(with: registry.registrar(forPlugin: "IsarFlutterLibsPlugin"))
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin"))
SqflitePlugin.register(with: registry.registrar(forPlugin: "SqflitePlugin"))

View File

@ -5,9 +5,9 @@ PODS:
- file_selector_macos (0.0.1):
- FlutterMacOS
- FlutterMacOS (1.0.0)
- FMDB (2.7.10):
- FMDB/standard (= 2.7.10)
- FMDB/standard (2.7.10)
- FMDB (2.7.5):
- FMDB/standard (= 2.7.5)
- FMDB/standard (2.7.5)
- geolocator_apple (1.2.0):
- FlutterMacOS
- isar_flutter_libs (1.0.0):
@ -15,7 +15,7 @@ PODS:
- path_provider_foundation (0.0.1):
- Flutter
- FlutterMacOS
- ReachabilitySwift (5.2.1)
- ReachabilitySwift (5.0.0)
- shared_preferences_foundation (0.0.1):
- Flutter
- FlutterMacOS
@ -65,15 +65,15 @@ SPEC CHECKSUMS:
connectivity_plus: 18d3c32514c886e046de60e9c13895109866c747
file_selector_macos: 468fb6b81fac7c0e88d71317f3eec34c3b008ff9
FlutterMacOS: 8f6f14fa908a6fb3fba0cd85dbd81ec4b251fb24
FMDB: eae540775bf7d0c87a5af926ae37af69effe5a19
FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a
geolocator_apple: 72a78ae3f3e4ec0db62117bd93e34523f5011d58
isar_flutter_libs: 43385c99864c168fadba7c9adeddc5d38838ca6a
path_provider_foundation: 3784922295ac71e43754bd15e0653ccfd36a147c
ReachabilitySwift: 5ae15e16814b5f9ef568963fb2c87aeb49158c66
shared_preferences_foundation: b4c3b4cddf1c21f02770737f147a3f5da9d39695
sqflite: d0307f984e859ce2bd39b230d672a448ea3f47b4
path_provider_foundation: 29f094ae23ebbca9d3d0cec13889cd9060c0e943
ReachabilitySwift: 985039c6f7b23a1da463388634119492ff86c825
shared_preferences_foundation: 5b919d13b803cadd15ed2dc053125c68730e5126
sqflite: a5789cceda41d54d23f31d6de539d65bb14100ea
url_launcher_macos: d2691c7dd33ed713bf3544850a623080ec693d95
PODFILE CHECKSUM: 236401fc2c932af29a9fcf0e97baeeb2d750d367
COCOAPODS: 1.15.2
COCOAPODS: 1.12.1

View File

@ -195,6 +195,7 @@
DB3AD6E65B5CC8A5A9E2767E /* Pods-RunnerTests.release.xcconfig */,
6114E0F2A0E1D978BBC23F48 /* Pods-RunnerTests.profile.xcconfig */,
);
name = Pods;
path = Pods;
sourceTree = "<group>";
};
@ -341,7 +342,6 @@
};
33CC111E2044C6BF0003C045 /* ShellScript */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
@ -358,7 +358,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh && touch Flutter/ephemeral/tripwire\n";
shellScript = "\"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh && touch Flutter/ephemeral/tripwire";
};
427A05FAB0ED774C4EAAB828 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;

View File

@ -1,6 +1,22 @@
# Generated by pub
# See https://dart.dev/tools/pub/glossary#lockfile
packages:
_fe_analyzer_shared:
dependency: transitive
description:
name: _fe_analyzer_shared
sha256: "0b2f2bd91ba804e53a61d757b986f89f1f9eaed5b11e4b2f5a2468d86d6c9fc7"
url: "https://pub.dev"
source: hosted
version: "67.0.0"
analyzer:
dependency: transitive
description:
name: analyzer
sha256: "37577842a27e4338429a1cbc32679d508836510b056f1eedf0c8d20e39c1383d"
url: "https://pub.dev"
source: hosted
version: "6.4.1"
animated_stack_widget:
dependency: transitive
description:
@ -41,6 +57,30 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.1.1"
build:
dependency: transitive
description:
name: build
sha256: "80184af8b6cb3e5c1c4ec6d8544d27711700bc3e6d2efad04238c7b5290889f0"
url: "https://pub.dev"
source: hosted
version: "2.4.1"
built_collection:
dependency: transitive
description:
name: built_collection
sha256: "376e3dd27b51ea877c28d525560790aee2e6fbb5f20e2f85d5081027d94e2100"
url: "https://pub.dev"
source: hosted
version: "5.1.1"
built_value:
dependency: transitive
description:
name: built_value
sha256: fedde275e0a6b798c3296963c5cd224e3e1b55d0e478d5b7e65e6b540f363a0e
url: "https://pub.dev"
source: hosted
version: "8.9.1"
camera:
dependency: transitive
description:
@ -53,18 +93,18 @@ packages:
dependency: transitive
description:
name: camera_android
sha256: "351429510121d179b9aac5a2e8cb525c3cd6c39f4d709c5f72dfb21726e52371"
sha256: "1100e527b44a96906987a91ef78c8dacb539e34612a8058de89023380acf67f1"
url: "https://pub.dev"
source: hosted
version: "0.10.8+16"
version: "0.10.8+18"
camera_avfoundation:
dependency: transitive
description:
name: camera_avfoundation
sha256: "7d0763dfcbf060f56aa254a68c103210280bee9e97bbe4fdef23e257a4f70ab9"
sha256: "8b113e43ee4434c9244c03c905432a0d5956cedaded3cd7381abaab89ce50297"
url: "https://pub.dev"
source: hosted
version: "0.9.14"
version: "0.9.14+1"
camera_camera:
dependency: "direct main"
description:
@ -77,10 +117,10 @@ packages:
dependency: transitive
description:
name: camera_platform_interface
sha256: e971ebca970f7cfee396f76ef02070b5e441b4aa04942da9c108d725f57bbd32
sha256: a250314a48ea337b35909a4c9d5416a208d736dcb01d0b02c6af122be66660b0
url: "https://pub.dev"
source: hosted
version: "2.7.2"
version: "2.7.4"
camera_web:
dependency: transitive
description:
@ -129,6 +169,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.1.1"
code_builder:
dependency: transitive
description:
name: code_builder
sha256: f692079e25e7869c14132d39f223f8eec9830eb76131925143b2129c4bb01b37
url: "https://pub.dev"
source: hosted
version: "4.10.0"
collection:
dependency: "direct main"
description:
@ -165,10 +213,10 @@ packages:
dependency: transitive
description:
name: cross_file
sha256: fedaadfa3a6996f75211d835aaeb8fede285dae94262485698afd832371b9a5e
sha256: "55d7b444feb71301ef6b8838dbc1ae02e63dd48c8773f3810ff53bb1e2945b32"
url: "https://pub.dev"
source: hosted
version: "0.3.3+8"
version: "0.3.4+1"
crypto:
dependency: transitive
description:
@ -185,14 +233,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.0.6"
dart_earcut:
dart_style:
dependency: transitive
description:
name: dart_earcut
sha256: "2fd8dcc885fbe092dbd4e4496d07840a6cf396f4201677416752be6901c994e4"
name: dart_style
sha256: "99e066ce75c89d6b29903d788a7bb9369cf754f7b24bf70bf4b6d6d6b26853b9"
url: "https://pub.dev"
source: hosted
version: "1.0.1"
version: "2.3.6"
dbus:
dependency: transitive
description:
@ -201,6 +249,30 @@ packages:
url: "https://pub.dev"
source: hosted
version: "0.7.10"
dio:
dependency: "direct main"
description:
name: dio
sha256: "0978e9a3e45305a80a7210dbeaf79d6ee8bee33f70c8e542dc654c952070217f"
url: "https://pub.dev"
source: hosted
version: "5.4.2+1"
dio_cache_interceptor:
dependency: transitive
description:
name: dio_cache_interceptor
sha256: fb7905c0d12075d8786a6b63bffd64ae062d053f682cfaf28d145a2686507308
url: "https://pub.dev"
source: hosted
version: "3.5.0"
dio_cache_interceptor_hive_store:
dependency: "direct main"
description:
name: dio_cache_interceptor_hive_store
sha256: "449b36541216cb20543228081125ad2995eb9712ec35bd030d85663ea1761895"
url: "https://pub.dev"
source: hosted
version: "3.2.2"
fake_async:
dependency: transitive
description:
@ -213,10 +285,10 @@ packages:
dependency: transitive
description:
name: ffi
sha256: "7bf0adc28a23d395f19f3f1eb21dd7cfd1dd9f8e1c50051c069122e6853bc878"
sha256: "493f37e7df1804778ff3a53bd691d8692ddf69702cf4c1c1096a2e41b4779e21"
url: "https://pub.dev"
source: hosted
version: "2.1.0"
version: "2.1.2"
file:
dependency: transitive
description:
@ -290,10 +362,10 @@ packages:
dependency: "direct main"
description:
name: flutter_image
sha256: "0fd3090d50f3bb5619905102f4e61995cce14cae8af8d116d55ae03ea744a1e4"
sha256: a113b84279cbcb2579b5a269eeffc3ad03181cf5f94ea1665c4181b814d196b5
url: "https://pub.dev"
source: hosted
version: "4.1.10"
version: "4.1.11"
flutter_keyboard_visibility:
dependency: transitive
description:
@ -354,10 +426,10 @@ packages:
dependency: "direct dev"
description:
name: flutter_lints
sha256: e2a421b7e59244faef694ba7b30562e489c2b489866e505074eb005cd7060db7
sha256: "9e8c3858111da373efc5aa341de011d9bd23e2c5c5e0c62bccf32438e192d7b1"
url: "https://pub.dev"
source: hosted
version: "3.0.1"
version: "3.0.2"
flutter_map:
dependency: "direct main"
description:
@ -366,22 +438,30 @@ packages:
url: "https://pub.dev"
source: hosted
version: "6.1.0"
flutter_map_cache:
dependency: "direct main"
description:
name: flutter_map_cache
sha256: "5539033bbfbc0a663f3a038f223a36b472974d6613ce8f84fe7762eeff38aa5a"
url: "https://pub.dev"
source: hosted
version: "1.5.0"
flutter_map_location_marker:
dependency: "direct main"
description:
name: flutter_map_location_marker
sha256: a13473c1c2924c023d97fbe93780833cf1656712a6dd72ceb514da569d9feb84
sha256: "5873a47606b092bf181b6d17dd42a124e9a8d5d9caad58b5f98fc182e799994f"
url: "https://pub.dev"
source: hosted
version: "8.0.4"
version: "8.0.8"
flutter_map_marker_cluster:
dependency: "direct main"
description:
name: flutter_map_marker_cluster
sha256: "27360384a0ef5e1a72c3815baa0c3ca5f4e614b969dc0b58f7823346520eeeaf"
sha256: "16fa4e8ca1b38b18229174b118f212436b7379c02fa33b71826a8d2c98f5f76c"
url: "https://pub.dev"
source: hosted
version: "1.3.4"
version: "1.3.5"
flutter_map_marker_popup:
dependency: transitive
description:
@ -390,14 +470,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "6.1.2"
flutter_map_tile_caching:
dependency: "direct main"
description:
name: flutter_map_tile_caching
sha256: ec3be7209accb7962cc1ca1b06708e1bad1511a48416f3bed3ffd680af5df856
url: "https://pub.dev"
source: hosted
version: "9.0.0-dev.5"
flutter_plugin_android_lifecycle:
dependency: transitive
description:
@ -418,10 +490,10 @@ packages:
dependency: "direct main"
description:
name: flutter_riverpod
sha256: da9591d1f8d5881628ccd5c25c40e74fc3eef50ba45e40c3905a06e1712412d5
sha256: "0f1974eff5bbe774bf1d870e406fc6f29e3d6f1c46bd9c58e7172ff68a785d7d"
url: "https://pub.dev"
source: hosted
version: "2.4.9"
version: "2.5.1"
flutter_test:
dependency: "direct dev"
description: flutter
@ -431,10 +503,10 @@ packages:
dependency: "direct main"
description:
name: flutter_typeahead
sha256: ef2dd5a505d2d95a5b4c571c81ad2d6e7955f583dddec49064fec57acffd7a96
sha256: d64712c65db240b1057559b952398ebb6e498077baeebf9b0731dade62438a6d
url: "https://pub.dev"
source: hosted
version: "5.0.2"
version: "5.2.0"
flutter_web_plugins:
dependency: transitive
description: flutter
@ -444,66 +516,66 @@ packages:
dependency: transitive
description:
name: font_awesome_flutter
sha256: "52671aea66da73b58d42ec6d0912b727a42248dd9a7c76d6c20f275783c48c08"
sha256: "275ff26905134bcb59417cf60ad979136f1f8257f2f449914b2c3e05bbb4cd6f"
url: "https://pub.dev"
source: hosted
version: "10.6.0"
version: "10.7.0"
geojson_vi:
dependency: "direct main"
description:
name: geojson_vi
sha256: "4f2786db7159c7cbd116b10c29ff396be1e6dd890f27b08d2a4e61162d999d85"
sha256: ffba1991df4d3f98cfd7fee02bcde00b76a39d4daa838ba8a0ba8b83cbff0705
url: "https://pub.dev"
source: hosted
version: "2.2.1"
version: "2.2.3"
geolocator:
dependency: "direct main"
description:
name: geolocator
sha256: e946395fc608842bb2f6c914807e9183f86f3cb787f6b8f832753e5251036f02
sha256: "694ec58afe97787b5b72b8a0ab78c1a9244811c3c10e72c4362ef3c0ceb005cd"
url: "https://pub.dev"
source: hosted
version: "10.1.0"
version: "11.0.0"
geolocator_android:
dependency: transitive
description:
name: geolocator_android
sha256: "30ff8fa384ab6d35965aecc15dfc980e5ebc5f823352c1adfc87dc3d000e8e24"
sha256: f15d1536cd01b1399578f1da1eb5d566e7a718db6a3648f2c24d2e2f859f0692
url: "https://pub.dev"
source: hosted
version: "4.5.0"
version: "4.5.4"
geolocator_apple:
dependency: transitive
description:
name: geolocator_apple
sha256: "79babf44b692ec5e789d322dc736ef71586056e8e6828f747c9e005456b248bf"
sha256: bc2aca02423ad429cb0556121f56e60360a2b7d694c8570301d06ea0c00732fd
url: "https://pub.dev"
source: hosted
version: "2.3.5"
version: "2.3.7"
geolocator_platform_interface:
dependency: transitive
description:
name: geolocator_platform_interface
sha256: "6c8d494d6948757c56720b778af742f6973f31fca1f702a7539b8917e4a2468a"
sha256: "009a21c4bc2761e58dccf07c24f219adaebe0ff707abdfd40b0a763d4003fab9"
url: "https://pub.dev"
source: hosted
version: "4.2.0"
version: "4.2.2"
geolocator_web:
dependency: transitive
description:
name: geolocator_web
sha256: "59083f7e0871b78299918d92bf930a14377f711d2d1156c558cd5ebae6c20d58"
sha256: "49d8f846ebeb5e2b6641fe477a7e97e5dd73f03cbfef3fd5c42177b7300fb0ed"
url: "https://pub.dev"
source: hosted
version: "2.2.0"
version: "3.0.0"
geolocator_windows:
dependency: transitive
description:
name: geolocator_windows
sha256: a92fae29779d5c6dc60e8411302f5221ade464968fe80a36d330e80a71f087af
sha256: "53da08937d07c24b0d9952eb57a3b474e29aae2abf9dd717f7e1230995f13f0e"
url: "https://pub.dev"
source: hosted
version: "0.2.2"
version: "0.2.3"
get:
dependency: "direct main"
description:
@ -512,6 +584,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "4.6.6"
glob:
dependency: transitive
description:
name: glob
sha256: "0e7014b3b7d4dac1ca4d6114f82bf1782ee86745b9b42a92c9289c23d8a0ab63"
url: "https://pub.dev"
source: hosted
version: "2.1.2"
google_api_availability:
dependency: "direct main"
description:
@ -540,18 +620,26 @@ packages:
dependency: "direct main"
description:
name: google_fonts
sha256: f0b8d115a13ecf827013ec9fc883390ccc0e87a96ed5347a3114cac177ef18e8
sha256: b1ac0fe2832c9cc95e5e88b57d627c5e68c223b9657f4b96e1487aa9098c7b82
url: "https://pub.dev"
source: hosted
version: "6.1.0"
version: "6.2.1"
hive:
dependency: transitive
description:
name: hive
sha256: "8dcf6db979d7933da8217edcec84e9df1bdb4e4edc7fc77dbd5aa74356d6d941"
url: "https://pub.dev"
source: hosted
version: "2.2.3"
http:
dependency: "direct main"
description:
name: http
sha256: a2bbf9d017fcced29139daa8ed2bba4ece450ab222871df93ca9eec6f80c34ba
sha256: "761a297c042deedc1ffbb156d6e2af13886bb305c2a343a4d972504cd67dd938"
url: "https://pub.dev"
source: hosted
version: "1.2.0"
version: "1.2.1"
http_parser:
dependency: transitive
description:
@ -564,10 +652,10 @@ packages:
dependency: transitive
description:
name: image
sha256: "004a2e90ce080f8627b5a04aecb4cdfac87d2c3f3b520aa291260be5a32c033d"
sha256: "4c68bfd5ae83e700b5204c1e74451e7bf3cf750e6843c6e158289cf56bda018e"
url: "https://pub.dev"
source: hosted
version: "4.1.4"
version: "4.1.7"
image_gallery_saver:
dependency: "direct main"
description:
@ -588,26 +676,26 @@ packages:
dependency: transitive
description:
name: image_picker_android
sha256: "39f2bfe497e495450c81abcd44b62f56c2a36a37a175da7d137b4454977b51b1"
sha256: "42c098e7fb6334746be37cdc30369ade356ed4f14d48b7a0313f95a9159f4321"
url: "https://pub.dev"
source: hosted
version: "0.8.9+3"
version: "0.8.9+5"
image_picker_for_web:
dependency: transitive
description:
name: image_picker_for_web
sha256: e2423c53a68b579a7c37a1eda967b8ae536c3d98518e5db95ca1fe5719a730a3
sha256: "6a1704fdd75022272e7e7a897a9068e9c2ff3cd6a66820bf3ded810633eac954"
url: "https://pub.dev"
source: hosted
version: "3.0.2"
version: "3.0.3"
image_picker_ios:
dependency: transitive
description:
name: image_picker_ios
sha256: fadafce49e8569257a0cad56d24438a6fa1f0cbd7ee0af9b631f7492818a4ca3
sha256: "917a5cadd67d052554cfb258595e54217de53fac5b52939426e26319a02e6297"
url: "https://pub.dev"
source: hosted
version: "0.8.9+1"
version: "0.8.9+2"
image_picker_linux:
dependency: transitive
description:
@ -628,10 +716,10 @@ packages:
dependency: transitive
description:
name: image_picker_platform_interface
sha256: fa4e815e6fcada50e35718727d83ba1c92f1edf95c0b4436554cec301b56233b
sha256: "3d2c323daea9d60608f1caf30be32a938916f4975434b8352e6f73dae496da38"
url: "https://pub.dev"
source: hosted
version: "2.9.3"
version: "2.9.4"
image_picker_windows:
dependency: transitive
description:
@ -644,26 +732,10 @@ packages:
dependency: "direct main"
description:
name: intl
sha256: "3bc132a9dbce73a7e4a21a17d06e1878839ffbf975568bc875c60537824b0c4d"
sha256: d6f56758b7d3014a48af9701c085700aac781a92a87a62b1333b46d8879661cf
url: "https://pub.dev"
source: hosted
version: "0.18.1"
isar:
dependency: transitive
description:
name: isar
sha256: "99165dadb2cf2329d3140198363a7e7bff9bbd441871898a87e26914d25cf1ea"
url: "https://pub.dev"
source: hosted
version: "3.1.0+1"
isar_flutter_libs:
dependency: transitive
description:
name: isar_flutter_libs
sha256: bc6768cc4b9c61aabff77152e7f33b4b17d2fc93134f7af1c3dd51500fe8d5e8
url: "https://pub.dev"
source: hosted
version: "3.1.0+1"
version: "0.19.0"
js:
dependency: transitive
description:
@ -692,10 +764,10 @@ packages:
dependency: "direct main"
description:
name: latlong2
sha256: "18712164760cee655bc790122b0fd8f3d5b3c36da2cb7bf94b68a197fbb0811b"
sha256: "98227922caf49e6056f91b6c56945ea1c7b166f28ffcd5fb8e72fc0b453cc8fe"
url: "https://pub.dev"
source: hosted
version: "0.9.0"
version: "0.9.1"
leak_tracker:
dependency: transitive
description:
@ -740,10 +812,18 @@ packages:
dependency: transitive
description:
name: logger
sha256: "6bbb9d6f7056729537a4309bda2e74e18e5d9f14302489cc1e93f33b3fe32cac"
sha256: "8c94b8c219e7e50194efc8771cd0e9f10807d8d3e219af473d89b06cc2ee4e04"
url: "https://pub.dev"
source: hosted
version: "2.0.2+1"
version: "2.2.0"
logging:
dependency: transitive
description:
name: logging
sha256: "623a88c9594aa774443aa3eb2d41807a48486b5613e67599fb4c41c0ad47c340"
url: "https://pub.dev"
source: hosted
version: "1.2.0"
matcher:
dependency: transitive
description:
@ -792,14 +872,22 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.0.5"
mockito:
dependency: "direct dev"
description:
name: mockito
sha256: "6841eed20a7befac0ce07df8116c8b8233ed1f4486a7647c7fc5a02ae6163917"
url: "https://pub.dev"
source: hosted
version: "5.4.4"
modal_bottom_sheet:
dependency: "direct main"
description:
name: modal_bottom_sheet
sha256: "3bba63c62d35c931bce7f8ae23a47f9a05836d8cb3c11122ada64e0b2f3d718f"
sha256: eac66ef8cb0461bf069a38c5eb0fa728cee525a531a8304bd3f7b2185407c67e
url: "https://pub.dev"
source: hosted
version: "3.0.0-pre"
version: "3.0.0"
nested:
dependency: transitive
description:
@ -816,6 +904,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "0.5.0"
package_config:
dependency: transitive
description:
name: package_config
sha256: "1c5b77ccc91e4823a5af61ee74e6b972db1ef98c2ff5a18d3161c982a55448bd"
url: "https://pub.dev"
source: hosted
version: "2.1.0"
path:
dependency: transitive
description:
@ -892,10 +988,10 @@ packages:
dependency: transitive
description:
name: permission_handler_android
sha256: "758284a0976772f9c744d6384fc5dc4834aa61e3f7aa40492927f244767374eb"
sha256: "1acac6bae58144b442f11e66621c062aead9c99841093c38f5bcdcc24c1c3474"
url: "https://pub.dev"
source: hosted
version: "12.0.3"
version: "12.0.5"
permission_handler_apple:
dependency: transitive
description:
@ -980,10 +1076,10 @@ packages:
dependency: transitive
description:
name: pointer_interceptor_web
sha256: "9386e064097fd16419e935c23f08f35b58e6aaec155dd39bd6a003b88f9c14b4"
sha256: a6237528b46c411d8d55cdfad8fcb3269fc4cbb26060b14bff94879165887d1e
url: "https://pub.dev"
source: hosted
version: "0.10.1+2"
version: "0.10.2"
pointycastle:
dependency: transitive
description:
@ -1020,34 +1116,34 @@ packages:
dependency: transitive
description:
name: provider
sha256: "9a96a0a19b594dbc5bf0f1f27d2bc67d5f95957359b461cd9feb44ed6ae75096"
sha256: c8a055ee5ce3fd98d6fc872478b03823ffdb448699c6ebdbbc71d59b596fd48c
url: "https://pub.dev"
source: hosted
version: "6.1.1"
queue:
version: "6.1.2"
pub_semver:
dependency: transitive
description:
name: queue
sha256: "9a41ecadc15db79010108c06eae229a45c56b18db699760f34e8c9ac9b831ff9"
name: pub_semver
sha256: "40d3ab1bbd474c4c2328c91e3a7df8c6dd629b79ece4c4bd04bee496a224fb0c"
url: "https://pub.dev"
source: hosted
version: "3.1.0+2"
version: "2.1.4"
rename:
dependency: "direct main"
description:
name: rename
sha256: "4d08eafe78e0787167c2fcdd5e32bbb0a6b2d8a7d23b38280f590df2a051415c"
sha256: "6ef5daf4b11130e71d93630cfb70725e5a35b19039739cfcd2b272c834ba25fe"
url: "https://pub.dev"
source: hosted
version: "3.0.1"
version: "3.0.2"
riverpod:
dependency: transitive
description:
name: riverpod
sha256: "942999ee48b899f8a46a860f1e13cee36f2f77609eb54c5b7a669bb20d550b11"
sha256: f21b32ffd26a36555e501b04f4a5dca43ed59e16343f1a30c13632b2351dfa4d
url: "https://pub.dev"
source: hosted
version: "2.4.9"
version: "2.5.1"
shared_preferences:
dependency: "direct main"
description:
@ -1092,10 +1188,10 @@ packages:
dependency: transitive
description:
name: shared_preferences_web
sha256: "7b15ffb9387ea3e237bb7a66b8a23d2147663d391cafc5c8f37b2e7b4bde5d21"
sha256: "9aee1089b36bd2aafe06582b7d7817fd317ef05fc30e6ba14bff247d0933042a"
url: "https://pub.dev"
source: hosted
version: "2.2.2"
version: "2.3.0"
shared_preferences_windows:
dependency: transitive
description:
@ -1109,6 +1205,14 @@ packages:
description: flutter
source: sdk
version: "0.0.99"
source_gen:
dependency: transitive
description:
name: source_gen
sha256: "14658ba5f669685cd3d63701d01b31ea748310f7ab854e471962670abcf57832"
url: "https://pub.dev"
source: hosted
version: "1.5.0"
source_span:
dependency: transitive
description:
@ -1129,18 +1233,18 @@ packages:
dependency: "direct main"
description:
name: sqflite
sha256: c2c32eb0c74021d987336522acc3b6bf0082fbd0c540c36a9cf4ddb8ba891ddc
sha256: a9016f495c927cb90557c909ff26a6d92d9bd54fc42ba92e19d4e79d61e798c6
url: "https://pub.dev"
source: hosted
version: "2.3.1"
version: "2.3.2"
sqflite_common:
dependency: transitive
description:
name: sqflite_common
sha256: "28d8c66baee4968519fb8bd6cdbedad982d6e53359091f0b74544a9f32ec72d5"
sha256: "3da423ce7baf868be70e2c0976c28a1bb2f73644268b7ffa7d2e08eab71f16a4"
url: "https://pub.dev"
source: hosted
version: "2.5.3"
version: "2.5.4"
stack_trace:
dependency: transitive
description:
@ -1249,26 +1353,26 @@ packages:
dependency: "direct main"
description:
name: url_launcher
sha256: c512655380d241a337521703af62d2c122bf7b77a46ff7dd750092aa9433499c
sha256: "0ecc004c62fd3ed36a2ffcbe0dd9700aee63bd7532d0b642a488b1ec310f492e"
url: "https://pub.dev"
source: hosted
version: "6.2.4"
version: "6.2.5"
url_launcher_android:
dependency: transitive
description:
name: url_launcher_android
sha256: "507dc655b1d9cb5ebc756032eb785f114e415f91557b73bf60b7e201dfedeb2f"
sha256: d4ed0711849dd8e33eb2dd69c25db0d0d3fdc37e0a62e629fe32f57a22db2745
url: "https://pub.dev"
source: hosted
version: "6.2.2"
version: "6.3.0"
url_launcher_ios:
dependency: transitive
description:
name: url_launcher_ios
sha256: "75bb6fe3f60070407704282a2d295630cab232991eb52542b18347a8a941df03"
sha256: "9149d493b075ed740901f3ee844a38a00b33116c7c5c10d7fb27df8987fb51d5"
url: "https://pub.dev"
source: hosted
version: "6.2.4"
version: "6.2.5"
url_launcher_linux:
dependency: transitive
description:
@ -1289,18 +1393,18 @@ packages:
dependency: transitive
description:
name: url_launcher_platform_interface
sha256: a932c3a8082e118f80a475ce692fde89dc20fddb24c57360b96bc56f7035de1f
sha256: "552f8a1e663569be95a8190206a38187b531910283c3e982193e4f2733f01029"
url: "https://pub.dev"
source: hosted
version: "2.3.1"
version: "2.3.2"
url_launcher_web:
dependency: transitive
description:
name: url_launcher_web
sha256: fff0932192afeedf63cdd50ecbb1bc825d31aed259f02bb8dba0f3b729a5e88b
sha256: "3692a459204a33e04bc94f5fb91158faf4f2c8903281ddd82915adecdb1a901d"
url: "https://pub.dev"
source: hosted
version: "2.2.3"
version: "2.3.0"
url_launcher_windows:
dependency: transitive
description:
@ -1345,18 +1449,18 @@ packages:
dependency: transitive
description:
name: web
sha256: afe077240a270dcfd2aafe77602b4113645af95d0ad31128cc02bce5ac5d5152
sha256: "97da13628db363c635202ad97068d47c5b8aa555808e7a9411963c533b449b27"
url: "https://pub.dev"
source: hosted
version: "0.3.0"
version: "0.5.1"
win32:
dependency: transitive
description:
name: win32
sha256: "464f5674532865248444b4c3daca12bd9bf2d7c47f759ce2617986e7229494a8"
sha256: "8cb58b45c47dcb42ab3651533626161d6b67a2921917d8d429791f76972b3480"
url: "https://pub.dev"
source: hosted
version: "5.2.0"
version: "5.3.0"
wkt_parser:
dependency: transitive
description:
@ -1390,5 +1494,5 @@ packages:
source: hosted
version: "3.1.2"
sdks:
dart: ">=3.2.3 <4.0.0"
flutter: ">=3.16.6"
dart: ">=3.3.0 <4.0.0"
flutter: ">=3.19.2"

View File

@ -36,13 +36,8 @@ dependencies:
sqflite: ^2.0.1
get: ^4.6.6
flutter_map: ^6.0.1
geolocator: ^10.1.0
permission_handler: ^11.3.1
# permission_handler: ^11.1.0 <== older
# permission_handler 11.2.0 (11.3.1 available)
# permission_handler_android 12.0.3 (12.0.5 available)
# permission_handler_apple 9.3.0 (9.4.4 available)
# permission_handler_platform_interface 4.1.0 (4.2.1 available)
geolocator: ^11.0.0
permission_handler: ^11.1.0
google_api_availability: ^5.0.0
tuple: ^2.0.0
latlong2: ^0.9.0
@ -54,36 +49,33 @@ dependencies:
proj4dart: ^2.0.0
meta: ^1.7.0
collection: ^1.15.0
path_provider: ^2.0.8
flutter_map_location_marker: any
path_provider: ^2.1.2
flutter_map_location_marker: ^8.0.8
flutter_map_marker_cluster: any
material_design_icons_flutter: ^7.0.7296
google_fonts: ^6.1.0
keyboard_dismisser: ^3.0.0
image_picker: ^1.0.4
geojson_vi: ^2.2.1
#geojson: ^1.0.0
url_launcher: ^6.0.20
flutter_breadcrumb: ^1.0.1
timeline_tile: ^2.0.0
# google_maps_flutter: ^2.5.0
#flutter_map_marker_popup: any
flutter_polyline_points: ^2.0.0
#google_maps_webservice: ^0.0.20-nullsafety.5
flutter_typeahead: ^5.0.1
flutter_launcher_icons: ^0.13.1
rename: ^3.0.1
circular_menu: ^2.0.1
camera_camera: ^3.0.0
intl: ^0.18.1
intl: ^0.19.0
modal_bottom_sheet: ^3.0.0-pre
connectivity_plus: ^5.0.2
flutter_map_tile_caching: ^9.0.0-dev.5
shared_preferences: ^2.0.15
# gallery_saver: ^2.3.2
image_gallery_saver: ^2.0.3
flutter_riverpod: ^2.4.0
http: ^1.1.0
dio: ^5.4.1
dio_cache_interceptor_hive_store: ^3.2.1
flutter_map_cache: ^1.3.0
connectivity_plus: ^5.0.2
flutter_icons:
android: true
@ -100,6 +92,7 @@ dev_dependencies:
# package. See that file for information about deactivating specific lint
# rules and activating additional ones.
flutter_lints: ^3.0.1
mockito: ^5.4.4
# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec

View File

@ -0,0 +1 @@

View File

@ -1,30 +1 @@
// This is a basic Flutter widget test.
//
// To perform an interaction with a widget in your test, use the WidgetTester
// utility that Flutter provides. For example, you can send tap and scroll
// gestures. You can also use WidgetTester to find child widgets in the widget
// tree, read text, and verify that the values of widget properties are correct.
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:rogapp/main.dart';
void main() {
testWidgets('Counter increments smoke test', (WidgetTester tester) async {
// Build our app and trigger a frame.
await tester.pumpWidget(const MyApp());
// Verify that our counter starts at 0.
expect(find.text('0'), findsOneWidget);
expect(find.text('1'), findsNothing);
// Tap the '+' icon and trigger a frame.
await tester.tap(find.byIcon(Icons.add));
await tester.pump();
// Verify that our counter has incremented.
expect(find.text('0'), findsNothing);
expect(find.text('1'), findsOneWidget);
});
}

View File

@ -9,7 +9,6 @@
#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 <url_launcher_windows/url_launcher_windows.h>
@ -20,8 +19,6 @@ void RegisterPlugins(flutter::PluginRegistry* registry) {
registry->GetRegistrarForPlugin("FileSelectorWindows"));
GeolocatorWindowsRegisterWithRegistrar(
registry->GetRegistrarForPlugin("GeolocatorWindows"));
IsarFlutterLibsPluginRegisterWithRegistrar(
registry->GetRegistrarForPlugin("IsarFlutterLibsPlugin"));
PermissionHandlerWindowsPluginRegisterWithRegistrar(
registry->GetRegistrarForPlugin("PermissionHandlerWindowsPlugin"));
UrlLauncherWindowsRegisterWithRegistrar(

View File

@ -6,7 +6,6 @@ list(APPEND FLUTTER_PLUGIN_LIST
connectivity_plus
file_selector_windows
geolocator_windows
isar_flutter_libs
permission_handler_windows
url_launcher_windows
)