added goal feature

This commit is contained in:
Mohamed Nouffer
2022-10-12 21:46:17 +05:30
parent 0470e1f27f
commit 8e30ee6ba7
29 changed files with 876 additions and 481 deletions

View File

@ -21,6 +21,6 @@
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
<string>1.0</string> <string>1.0</string>
<key>MinimumOSVersion</key> <key>MinimumOSVersion</key>
<string>9.0</string> <string>11.0</string>
</dict> </dict>
</plist> </plist>

View File

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

View File

@ -1,4 +1,6 @@
PODS: PODS:
- camera_avfoundation (0.0.1):
- Flutter
- Flutter (1.0.0) - Flutter (1.0.0)
- flutter_compass (0.0.1): - flutter_compass (0.0.1):
- Flutter - Flutter
@ -30,6 +32,7 @@ PODS:
- Flutter - Flutter
DEPENDENCIES: DEPENDENCIES:
- camera_avfoundation (from `.symlinks/plugins/camera_avfoundation/ios`)
- Flutter (from `Flutter`) - Flutter (from `Flutter`)
- flutter_compass (from `.symlinks/plugins/flutter_compass/ios`) - flutter_compass (from `.symlinks/plugins/flutter_compass/ios`)
- flutter_keyboard_visibility (from `.symlinks/plugins/flutter_keyboard_visibility/ios`) - flutter_keyboard_visibility (from `.symlinks/plugins/flutter_keyboard_visibility/ios`)
@ -47,6 +50,8 @@ SPEC REPOS:
- GoogleMaps - GoogleMaps
EXTERNAL SOURCES: EXTERNAL SOURCES:
camera_avfoundation:
:path: ".symlinks/plugins/camera_avfoundation/ios"
Flutter: Flutter:
:path: Flutter :path: Flutter
flutter_compass: flutter_compass:
@ -69,7 +74,8 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/url_launcher_ios/ios" :path: ".symlinks/plugins/url_launcher_ios/ios"
SPEC CHECKSUMS: SPEC CHECKSUMS:
Flutter: 50d75fe2f02b26cc09d224853bb45737f8b3214a camera_avfoundation: 07c77549ea54ad95d8581be86617c094a46280d9
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
flutter_compass: cbbd285cea1584c7ac9c4e0c3e1f17cbea55e855 flutter_compass: cbbd285cea1584c7ac9c4e0c3e1f17cbea55e855
flutter_keyboard_visibility: 0339d06371254c3eb25eeb90ba8d17dca8f9c069 flutter_keyboard_visibility: 0339d06371254c3eb25eeb90ba8d17dca8f9c069
FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a
@ -82,6 +88,6 @@ SPEC CHECKSUMS:
sqflite: 6d358c025f5b867b29ed92fc697fd34924e11904 sqflite: 6d358c025f5b867b29ed92fc697fd34924e11904
url_launcher_ios: 839c58cdb4279282219f5e248c3321761ff3c4de url_launcher_ios: 839c58cdb4279282219f5e248c3321761ff3c4de
PODFILE CHECKSUM: 0793805c7f7ae4910c8f6c28aaed7fe0a31e9dce PODFILE CHECKSUM: a1c2f8dde3796ecc1697a15e7c75eb5205d8a740
COCOAPODS: 1.11.2 COCOAPODS: 1.11.2

View File

@ -357,7 +357,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES; GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.0; IPHONEOS_DEPLOYMENT_TARGET = 11.0;
MTL_ENABLE_DEBUG_INFO = NO; MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos; SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos; SUPPORTED_PLATFORMS = iphoneos;
@ -435,7 +435,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES; GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.0; IPHONEOS_DEPLOYMENT_TARGET = 11.0;
MTL_ENABLE_DEBUG_INFO = YES; MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES; ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos; SDKROOT = iphoneos;
@ -484,7 +484,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES; GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.0; IPHONEOS_DEPLOYMENT_TARGET = 11.0;
MTL_ENABLE_DEBUG_INFO = NO; MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos; SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos; SUPPORTED_PLATFORMS = iphoneos;

View File

@ -42,6 +42,10 @@
<string>LaunchScreen</string> <string>LaunchScreen</string>
<key>UIMainStoryboardFile</key> <key>UIMainStoryboardFile</key>
<string>Main</string> <string>Main</string>
<key>NSCameraUsageDescription</key>
<string>Need camera to get photo when finish rogaining</string>
<key>NSMicrophoneUsageDescription</key>
<string>Need to store capture sound.</string>
<key>UISupportedInterfaceOrientations</key> <key>UISupportedInterfaceOrientations</key>
<array> <array>
<string>UIInterfaceOrientationPortrait</string> <string>UIInterfaceOrientationPortrait</string>

47
lib/model/Rogaining.dart Normal file
View File

@ -0,0 +1,47 @@
class Rogaining {
int? rog_id;
int? course_id;
int? user_id;
int? location_id;
double? lat;
double? lon;
int? time_stamp;
Rogaining({
this.rog_id,
this.course_id,
this.user_id,
this.location_id,
this.lat,
this.lon,
this.time_stamp
});
factory Rogaining.fromMap(Map<String, dynamic> json) {
return Rogaining(
rog_id: json['rog_id'],
course_id: json['course_id'],
user_id: json['user_id'],
location_id: json['location_id'],
lat: json['lat'],
lon: json['lon'],
time_stamp: json['time_stamp']
);
}
Map<String, dynamic> toMap(){
return {
'rog_id':rog_id,
'course_id': course_id,
'user_id': user_id,
'location_id': location_id,
'lat': lat,
'lon': lon,
'time_stamp': time_stamp
};
}
}

View File

@ -0,0 +1,77 @@
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:rogapp/pages/destination/destination_controller.dart';
class CameraPage extends StatelessWidget {
CameraPage({Key? key}) : super(key: key);
DestinationController destinationController = Get.find<DestinationController>();
ImageProvider getFinishImage(){
if(destinationController.photos.isNotEmpty){
return FileImage(destinationController.photos[0]);
}
else{
return AssetImage('assets/images/empty_image.png');
}
}
// void finishRog(){
// destinationController.addToRogaining(destinationController.current_lat, destinationController.current_lon, destination_id)
// }
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text("finishing_rogaining".tr),
),
body: Column(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
Padding(
padding: EdgeInsets.all(8.0),
child: Center(
child: Obx(() =>
Container(
width: MediaQuery.of(context).size.width,
height: 370,
decoration: BoxDecoration(
image:
DecorationImage(
image: getFinishImage(),
fit: BoxFit.cover
)
),
),
),
),
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
ElevatedButton(
onPressed: (){
destinationController.openCamera(context);
},
child: Text("take_photo of the clock".tr)
),
Obx(() =>
destinationController.photos.isNotEmpty ?
ElevatedButton(
style: ElevatedButton.styleFrom(
primary: Colors.red
),
onPressed: (){
},
child: Text("finish_goal".tr)
):
Container()
)
],
)
],
),
);
}
}

View File

@ -0,0 +1,163 @@
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:rogapp/pages/index/index_controller.dart';
import 'package:rogapp/routes/app_pages.dart';
class ChangePasswordPage extends StatelessWidget {
ChangePasswordPage({Key? key}) : super(key: key);
IndexController indexController = Get.find<IndexController>();
TextEditingController oldPasswordController = TextEditingController();
TextEditingController newPasswordController = TextEditingController();
@override
Widget build(BuildContext context) {
return Scaffold(
resizeToAvoidBottomInset: false,
backgroundColor: Colors.white,
appBar: AppBar(
elevation: 0,
brightness: Brightness.light,
backgroundColor: Colors.white,
leading:
IconButton( onPressed: (){
Navigator.pop(context);
},icon:Icon(Icons.arrow_back_ios,size: 20,color: Colors.black,)),
),
body:
Container(
width: double.infinity,
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Column(
children: [
Column(
children: [
Container(
child: Text("change_password".tr, style: TextStyle(fontSize: 24.0),),
),
SizedBox(height: 30,),
],
),
Padding(
padding: EdgeInsets.symmetric(
horizontal: 40
),
child: Column(
children: [
makeInput(label: "old_password".tr, controller: oldPasswordController),
makeInput(label: "new_password".tr, controller: newPasswordController, obsureText: true),
],
),
),
Padding(
padding: EdgeInsets.symmetric(horizontal: 40),
child: Container(
padding: EdgeInsets.only(top: 3,left: 3),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(40),
),
child: Obx((() =>
indexController.is_loading == true ? MaterialButton(
minWidth: double.infinity,
height:60,
onPressed: (){
},
color: Colors.grey[400],
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(40)
),
child: CircularProgressIndicator(),
) :
Column(
children: [
MaterialButton(
minWidth: double.infinity,
height:60,
onPressed: (){
if(oldPasswordController.text.isEmpty || newPasswordController.text.isEmpty){
Get.snackbar(
"no_values".tr,
"values_required".tr,
icon: Icon(Icons.assistant_photo_outlined, size: 40.0, color: Colors.blue),
snackPosition: SnackPosition.TOP,
duration: Duration(milliseconds: 800),
backgroundColor: Colors.yellow,
//icon:Image(image:AssetImage("assets/images/dora.png"))
);
return;
}
indexController.is_loading.value = true;
indexController.changePassword(oldPasswordController.text, newPasswordController.text, context);
//indexController.login(oldPasswordController.text, newPasswordController.text, context);
},
color: Colors.indigoAccent[400],
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(40)
),
child: Text("ログイン",style: TextStyle(
fontWeight: FontWeight.w600,fontSize: 16,color: Colors.white70
),
),
),
SizedBox(height: 10.0,),
],
)
),
),
)
),
SizedBox(height: 20,),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
],
)
],
),
],
),
)
);
}
Widget makeInput({label, required TextEditingController controller, obsureText = false}){
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(label,style:TextStyle(
fontSize: 15,
fontWeight: FontWeight.w400,
color: Colors.black87
),),
SizedBox(height: 5,),
TextField(
controller: controller,
obscureText: obsureText,
decoration: InputDecoration(
contentPadding: EdgeInsets.symmetric(vertical: 0,horizontal: 10),
enabledBorder: OutlineInputBorder(
borderSide: BorderSide(
color: (Colors.grey[400])!,
),
),
border: OutlineInputBorder(
borderSide: BorderSide(color: (Colors.grey[400])!
),
),
),
),
SizedBox(height: 30.0,)
],
);
}
}

View File

@ -1,16 +1,20 @@
import 'dart:convert'; import 'dart:convert';
import 'dart:io';
import 'package:camera_camera/camera_camera.dart';
import 'package:flutter/foundation.dart'; import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:geojson/geojson.dart'; import 'package:geojson/geojson.dart';
import 'package:geolocator/geolocator.dart'; import 'package:geolocator/geolocator.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import 'package:latlong2/latlong.dart'; import 'package:latlong2/latlong.dart';
import 'package:rogapp/model/Rogaining.dart';
import 'package:rogapp/model/destination.dart'; import 'package:rogapp/model/destination.dart';
import 'package:rogapp/pages/index/index_controller.dart'; import 'package:rogapp/pages/index/index_controller.dart';
import 'package:rogapp/routes/app_pages.dart'; import 'package:rogapp/routes/app_pages.dart';
import 'package:rogapp/services/action_service.dart';
import 'package:rogapp/services/destination_service.dart'; import 'package:rogapp/services/destination_service.dart';
import 'package:rogapp/services/maxtrix_service.dart'; import 'package:rogapp/services/maxtrix_service.dart';
import 'package:rogapp/services/reacking_service.dart'; import 'package:rogapp/services/reacking_service.dart';
@ -18,6 +22,7 @@ import 'package:rogapp/utils/database_helper.dart';
import 'dart:async'; import 'dart:async';
import 'package:rogapp/widgets/bottom_sheet_widget.dart'; import 'package:rogapp/widgets/bottom_sheet_widget.dart';
import 'package:sqflite/sqlite_api.dart';
class DestinationController extends GetxController { class DestinationController extends GetxController {
@ -26,9 +31,14 @@ class DestinationController extends GetxController {
var destinationCount = 0.obs; var destinationCount = 0.obs;
List<Destination> destinations = <Destination>[].obs; List<Destination> destinations = <Destination>[].obs;
List<Map<String, dynamic>> destination_index_data = <Map<String, dynamic>>[].obs; List<Map<String, dynamic>> destination_index_data = <Map<String, dynamic>>[].obs;
double current_lat = 0.0;
double current_lon = 0.0;
List<Destination> currentSelectedDestinations = <Destination>[].obs; List<Destination> currentSelectedDestinations = <Destination>[].obs;
var is_in_rog = false.obs;
List<Rogaining> rogainings = <Rogaining>[].obs;
bool checking_in = false; bool checking_in = false;
var isSelected = false.obs; var isSelected = false.obs;
BuildContext? context; BuildContext? context;
@ -41,8 +51,56 @@ class DestinationController extends GetxController {
Map<String, dynamic> matrix = {}; Map<String, dynamic> matrix = {};
final photos = <File>[].obs;
final IndexController indexController = Get.find<IndexController>(); final IndexController indexController = Get.find<IndexController>();
Timer? _timer;
int _start = 1;
var rogaining_counted = false.obs;
void startTimer(Destination d, double distance) {
const oneSec = const Duration(seconds: 1);
_timer = Timer.periodic(
oneSec,
(Timer timer) {
if (_start == 0) {
if(is_in_rog.value == false){
is_in_rog.value = true;
addToRogaining(current_lat, current_lon, d.location_id!);
Get.snackbar("Rogaining Started ", "Rogaining session started");
}
else{
//finish rogiain
//is_in_rog.value = true;
if (rogaining_counted.value && distance <=250){
Get.toNamed(AppPages.CAMERA_PAGE);
}
}
timer.cancel();
} else {
_start--;
}
},
);
}
void openCamera(BuildContext context) {
photos.clear();
Navigator.push(
context,
MaterialPageRoute(
builder: (_) => CameraCamera(
onFile: (file) {
photos.add(file);
Navigator.pop(context);
print("----image file is : ${file}----");
//setState(() {});
},
)));
}
void getRoutePoints() { void getRoutePoints() {
indexController.routePoints = []; indexController.routePoints = [];
indexController.routePointLenght.value = 0; indexController.routePointLenght.value = 0;
@ -63,7 +121,12 @@ class DestinationController extends GetxController {
} }
} }
checkForCheckin(double la, double ln){ // void addToRogaining(Rogaining rog){
// DatabaseHelper db = DatabaseHelper.instance;
// db.insertRogaining(rog);
// }
checkForCheckin(double la, double ln){
for(final d in destinations){ for(final d in destinations){
@ -79,6 +142,14 @@ class DestinationController extends GetxController {
double rad = value!.checkin_radious ?? double.infinity; double rad = value!.checkin_radious ?? double.infinity;
bool auto_checkin = value.auto_checkin == 0 ? false : true; bool auto_checkin = value.auto_checkin == 0 ? false : true;
if(d.cp != -1 && is_in_rog == true){
rogaining_counted.value == true;
}
if(d.cp == -1 && dist <= 250 && rogaining_counted.value == false){
startTimer(d, dist);
}
indexController.currentDestinationFeature.add(value); indexController.currentDestinationFeature.add(value);
//indexController.getAction(); //indexController.getAction();
@ -127,6 +198,22 @@ class DestinationController extends GetxController {
} }
} }
void addToRogaining(double lat, double lon, int destination_id){
Rogaining rog = Rogaining(
rog_id: null,
course_id: 1,
user_id: indexController.currentUser[0]['user']['id'],
location_id: destination_id,
lat: lat,
lon:lon,
time_stamp: DateTime.now().toUtc().microsecondsSinceEpoch
);
DatabaseHelper db = DatabaseHelper.instance;
db.insertRogaining(rog).then((value){
print("----- inserted value ${value} ---------");
});
}
void makeCheckin(Destination destination, bool action) async { void makeCheckin(Destination destination, bool action) async {
print("@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ ressssss ${action}@@@@@@@@@@@"); print("@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ ressssss ${action}@@@@@@@@@@@");
DatabaseHelper db = DatabaseHelper.instance; DatabaseHelper db = DatabaseHelper.instance;
@ -139,6 +226,15 @@ class DestinationController extends GetxController {
PopulateDestinations(); PopulateDestinations();
print("@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ after populating ${res} @@@@@@@@@@@"); print("@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ after populating ${res} @@@@@@@@@@@");
print("---- database update resulr ------ res : ${res}-------"); print("---- database update resulr ------ res : ${res}-------");
/// post to NATNAT
if(indexController.currentUser.length > 0){
String cp_num = destination.cp.toString();
String team_name = indexController.currentUser[0]['user']['group'];
ActionService.postCheckin(cp_num, team_name).then((value){
print('------- NATNAT RES ${value} ------------');
});
}
} }
@ -187,6 +283,9 @@ class DestinationController extends GetxController {
StreamSubscription<Position> positionStream = Geolocator.getPositionStream(locationSettings: locationSettings).listen( StreamSubscription<Position> positionStream = Geolocator.getPositionStream(locationSettings: locationSettings).listen(
(Position? position) { (Position? position) {
current_lat = position != null ? position.latitude : 0;
current_lon = position != null ? position.longitude : 0;
if(isSelected.value){ if(isSelected.value){
double czoom = indexController.rogMapController!.zoom; double czoom = indexController.rogMapController!.zoom;
indexController.rogMapController!.move(LatLng(position!.latitude, position!.longitude), czoom); indexController.rogMapController!.move(LatLng(position!.latitude, position!.longitude), czoom);
@ -220,6 +319,19 @@ class DestinationController extends GetxController {
} }
} }
Destination? destinationById(int id){
Destination? d = null;
print("--- target des - ${id} ----");
for(Destination ss in destinations){
print("--- des - ${ss.location_id} ----");
if(ss.location_id == id){
d = ss;
break;
}
}
return d;
}
void deleteDestination(Destination d){ void deleteDestination(Destination d){
//int id = destinations[index].location_id!; //int id = destinations[index].location_id!;
//print("---- index ${destinations[index].location_id!}-----"); //print("---- index ${destinations[index].location_id!}-----");

View File

@ -1,9 +1,12 @@
import 'dart:developer'; import 'dart:developer';
import 'dart:io';
import 'package:camera_camera/camera_camera.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:geolocator/geolocator.dart'; import 'package:geolocator/geolocator.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import 'package:latlong2/latlong.dart'; import 'package:latlong2/latlong.dart';
import 'package:rogapp/pages/camera/camera_page.dart';
import 'package:rogapp/pages/destination/destination_controller.dart'; import 'package:rogapp/pages/destination/destination_controller.dart';
import 'package:rogapp/pages/destination_map/destination_map_page.dart'; import 'package:rogapp/pages/destination_map/destination_map_page.dart';
import 'package:rogapp/pages/drawer/drawer_page.dart'; import 'package:rogapp/pages/drawer/drawer_page.dart';
@ -156,6 +159,13 @@ class DestnationPage extends StatelessWidget {
automaticallyImplyLeading: true, automaticallyImplyLeading: true,
title: Text("app_title".tr), title: Text("app_title".tr),
actions: [ actions: [
// TextButton(
// onPressed: (){
// //destinationController.openCamera(context);
// Get.toNamed(AppPages.CAMERA_PAGE);
// },
// child: Icon(Icons.ac_unit),
// ),
Obx(() => Obx(() =>
ToggleButtons( ToggleButtons(
disabledColor: Colors.grey.shade200, disabledColor: Colors.grey.shade200,
@ -185,193 +195,3 @@ class DestnationPage extends StatelessWidget {
} }
} }
// class DestinationPage extends StatefulWidget {
// DestinationPage({ Key? key }) : super(key: key);
// @override
// State<DestinationPage> createState() => _DestinationPageState();
// }
// class DestinationPage extends State<DestinationPage> {
// final DestinationController destinationController = Get.find<DestinationController>();
// final IndexController indexController = Get.find<IndexController>();
// final List<int> _items = List<int>.generate(50, (int index) => index);
// DestinationWidget dest = DestinationWidget();
// DestinationMapPage destMap = DestinationMapPage();
// Future<void> showCurrentPosition() async {
// LocationPermission permission = await Geolocator.checkPermission();
// if (permission != LocationPermission.whileInUse ||
// permission != LocationPermission.always) {
// permission = await Geolocator.requestPermission();
// }
// Position position = await Geolocator.getCurrentPosition(
// desiredAccuracy: LocationAccuracy.high);
// indexController.rogMapController?.move(LatLng(position.latitude, position.longitude), 14);
// }
// Image getImage(int index){
// if(destinationController.destinations[index].photos == null || destinationController.destinations[index].photos == ""){
// return Image(image: AssetImage('assets/images/empty_image.png'));
// }
// else{
// return Image(image: NetworkImage(destinationController.destinations[index].photos!));
// }
// }
// Widget getRoutingImage(int route){
// switch (route) {
// case 0:
// return Image(image: AssetImage('assets/images/p4_9_man.png'), width: 27.0,);
// case 1:
// return Image(image: AssetImage('assets/images/p4_8_car.png'), width: 27.0,);
// case 2:
// return Image(image: AssetImage('assets/images/p4_10_train.png'), width: 27.0,);
// default:
// return Image(image: AssetImage('assets/images/p4_9_man.png'), width: 27.0,);
// }
// }
// @override
// void initState() {
// //destinationController.context = context;
// //destinationController.PopulateDestinations();
// super.initState();
// }
// @override
// Widget build(BuildContext context) {
// final ColorScheme colorScheme = Theme.of(context).colorScheme;
// final Color oddItemColor = colorScheme.primary.withOpacity(0.05);
// final Color evenItemColor = colorScheme.primary.withOpacity(0.15);
// return WillPopScope(
// onWillPop: () async {
// indexController.switchPage(AppPages.INITIAL);
// return false;
// },
// child: Scaffold(
// drawer: DrawerPage(),
// bottomNavigationBar: BottomAppBar(
// child: Row(
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
// children: <Widget>[
// Padding(
// padding: const EdgeInsets.only(left:13.0),
// child: InkWell(
// child: Obx((() => getRoutingImage(destinationController.travelMode.value))),
// onTap: (){
// Get.bottomSheet(
// Obx(() =>
// ListView(
// children: [
// Padding(
// padding: const EdgeInsets.only(top:30.0, bottom: 30),
// child: Center(child: Text("select_travel_mode".tr, style: TextStyle(fontSize: 22.0, color:Colors.red, fontWeight:FontWeight.bold),),),
// ),
// ListTile(
// selected: destinationController.travelMode == 0 ? true : false,
// selectedTileColor: Colors.amber.shade200,
// leading: Image(image: AssetImage('assets/images/p4_9_man.png'),),
// title: Text("walking".tr),
// onTap:(){
// destinationController.travelMode.value = 0;
// Get.back();
// },
// ),
// ListTile(
// selected: destinationController.travelMode == 1 ? true : false,
// selectedTileColor: Colors.amber.shade200,
// leading: Image(image: AssetImage('assets/images/p4_8_car.png'),),
// title: Text("driving".tr),
// onTap:(){
// destinationController.travelMode.value = 1;
// Get.back();
// },
// ),
// ListTile(
// selected: destinationController.travelMode == 2 ? true : false,
// selectedTileColor: Colors.amber.shade200,
// leading: Image(image: AssetImage('assets/images/p4_10_train.png'),),
// title: Text("transit".tr),
// onTap:(){
// destinationController.travelMode.value = 2;
// Get.back();
// },
// ),
// ],
// ),
// ),
// isScrollControlled:false,
// backgroundColor: Colors.white,
// );
// destinationController.PopulateDestinations();
// destMap.
// }
// ),
// )
// ,
// IconButton(
// icon: const Icon(Icons.travel_explore),
// onPressed: (){
// indexController.switchPage(AppPages.INITIAL);
// }
// ),
// ],
// ),
// ),
// floatingActionButton: FloatingActionButton(
// onPressed: (){
// //print("######");
// indexController.toggleDestinationMode();
// },
// tooltip: 'Increment',
// child: Obx(() =>
// indexController.desination_mode == 1 ?
// Image(image: AssetImage('assets/images/list2.png'))
// :
// Image(image: AssetImage('assets/images/map.png'))
// ),
// elevation: 4.0,
// ),
// floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked,
// appBar:AppBar(
// automaticallyImplyLeading: true,
// title: Text("app_title".tr),
// actions: [
// //Obx(() =>
// ToggleButtons(
// disabledColor: Colors.grey.shade200,
// selectedColor: Colors.red,
// children: <Widget>[
// Icon(Icons.explore
// )],
// onPressed: (int index) {
// setState(() {
// destinationController.isSelected[index] = !destinationController.isSelected[index];
// });
// },
// isSelected: destinationController.isSelected,
// ),
// //),
// // IconButton(onPressed: (){
// // showCurrentPosition();
// // },
// // icon: Icon(Icons.location_on_outlined))
// ],
// ),
// body: Obx(() =>
// indexController.desination_mode.value == 0 ?
// dest:
// destMap
// )
// ),
// );
// }
// }

View File

@ -14,6 +14,7 @@ import 'package:rogapp/model/destination.dart';
import 'package:rogapp/pages/destination/destination_controller.dart'; import 'package:rogapp/pages/destination/destination_controller.dart';
import 'package:rogapp/pages/index/index_controller.dart'; import 'package:rogapp/pages/index/index_controller.dart';
import 'package:rogapp/services/destination_service.dart'; import 'package:rogapp/services/destination_service.dart';
import 'package:rogapp/utils/text_util.dart';
import 'package:rogapp/widgets/bottom_sheet_new.dart'; import 'package:rogapp/widgets/bottom_sheet_new.dart';
import 'package:rogapp/widgets/bottom_sheet_widget.dart'; import 'package:rogapp/widgets/bottom_sheet_widget.dart';
import 'package:rogapp/widgets/bread_crum_widget.dart'; import 'package:rogapp/widgets/bread_crum_widget.dart';
@ -38,21 +39,6 @@ class DestinationMapPage extends StatelessWidget {
return pts; return pts;
} }
String getDisplaytext(Destination dp){
RegExp regex = RegExp(r'([.]*0)(?!.*\d)');
String txt = "";
if(dp.cp! > 0){
txt = "${dp.cp.toString().replaceAll(regex, '')}";
if(dp.checkin_point != null && dp.checkin_point! > 0){
txt = txt + "{${dp.checkin_point.toString().replaceAll(regex, '')}}";
}
if(dp.buy_point != null && dp.buy_point! > 0){
txt = txt + "[${dp.buy_point.toString().replaceAll(regex, '')}]";
}
}
return txt;
}
List<Marker>? getMarkers() { List<Marker>? getMarkers() {
List<Marker> pts = []; List<Marker> pts = [];
int index = -1; int index = -1;
@ -99,7 +85,7 @@ class DestinationMapPage extends StatelessWidget {
), ),
), ),
), ),
Container( color: Colors.yellow, child: Text(getDisplaytext(d), style: TextStyle(fontSize: 15.0, fontWeight: FontWeight.bold, overflow: TextOverflow.visible),)), Container( color: Colors.yellow, child: Text(TextUtils.getDisplaytext(d), style: TextStyle(fontSize: 15.0, fontWeight: FontWeight.bold, overflow: TextOverflow.visible),)),
], ],
), ),
); );
@ -119,7 +105,10 @@ class DestinationMapPage extends StatelessWidget {
indexController.is_rog_mapcontroller_loaded.value == false ? indexController.is_rog_mapcontroller_loaded.value == false ?
Center(child: CircularProgressIndicator()) Center(child: CircularProgressIndicator())
: :
BreadCrumbWidget(mapController:indexController.rogMapController), Padding(
padding: const EdgeInsets.only(left:8.0),
child: BreadCrumbWidget(mapController:indexController.rogMapController),
),
Padding( Padding(
padding: const EdgeInsets.only(top:50.0), padding: const EdgeInsets.only(top:50.0),
//child: TravelMap(), //child: TravelMap(),

View File

@ -62,7 +62,9 @@ class DrawerPage extends StatelessWidget {
ListTile( ListTile(
leading: const Icon(Icons.password), leading: const Icon(Icons.password),
title: Text("change_password".tr), title: Text("change_password".tr),
onTap: (){}, onTap: (){
Get.toNamed(AppPages.CHANGE_PASSWORD);
},
) : ) :
Container(width: 0, height: 0,), Container(width: 0, height: 0,),
indexController.currentUser.length == 0 ? indexController.currentUser.length == 0 ?

View File

@ -173,6 +173,8 @@ void login(String email, String password, BuildContext context){
is_loading.value = false; is_loading.value = false;
Navigator.pop(context); Navigator.pop(context);
loadUserDetails(); loadUserDetails();
loadLocationsBound();
cats.clear();
if(currentFeature.isNotEmpty){ if(currentFeature.isNotEmpty){
getAction(); getAction();
} }
@ -199,6 +201,37 @@ void login(String email, String password, BuildContext context){
}); });
} }
void changePassword(String oldpassword, String newpassword, BuildContext context){
String _token = currentUser[0]['token'];
//print("------- change password ######## ${currentUser[0]['token']} ###### --------");
AuthService.changePassword(oldpassword, newpassword, _token).then((value){
print("------- change password ######## ${value} ###### --------");
if(value.isNotEmpty){
is_loading.value = false;
Navigator.pop(context);
if(rog_mode.value == 1){
switchPage(AppPages.TRAVEL);
}
else{
switchPage(AppPages.INITIAL);
}
//Get.toNamed(AppPages.INITIAL);
}else{
Get.snackbar(
'failed'.tr,
'password_change_failed_please_try_again'.tr,
icon: Icon(Icons.error, size: 40.0, color: Colors.blue),
snackPosition: SnackPosition.TOP,
duration: Duration(milliseconds: 800),
backgroundColor: Colors.yellow,
//icon:Image(image:AssetImage("assets/images/dora.png"))
);
}
});
is_loading.value = false;
}
void logout() async{ void logout() async{
locations.clear(); locations.clear();
DatabaseHelper db = DatabaseHelper.instance; DatabaseHelper db = DatabaseHelper.instance;
@ -209,6 +242,7 @@ void login(String email, String password, BuildContext context){
} }
}); });
currentUser.clear(); currentUser.clear();
cats.clear();
} }
void register(String email, String password, BuildContext context){ void register(String email, String password, BuildContext context){
@ -223,8 +257,8 @@ void login(String email, String password, BuildContext context){
}else{ }else{
is_loading.value = false; is_loading.value = false;
Get.snackbar( Get.snackbar(
"Failed", 'failed'.tr,
"User registration failed, please try again.", 'user_registration_failed_please_try_again'.tr,
icon: Icon(Icons.error, size: 40.0, color: Colors.blue), icon: Icon(Icons.error, size: 40.0, color: Colors.blue),
snackPosition: SnackPosition.TOP, snackPosition: SnackPosition.TOP,
duration: Duration(milliseconds: 800), duration: Duration(milliseconds: 800),
@ -248,9 +282,23 @@ void login(String email, String password, BuildContext context){
} }
String getCatText(){
String _cat = 'all'.tr;
if(currentUser.length > 0){
Map<String, dynamic> _urs = currentUser[0];
print('-- is_rogaining :-- ${_urs['user']['is_rogaining']} ------');
if(_urs['user']['is_rogaining'] == true){
_cat = 'rogaining'.tr;
}
else {
_cat = 'sight_seeing'.tr;
}
}
return _cat;
}
void loadCatsv2(){ void loadCatsv2(){
dynamic initVal = {'category':'-all-'}; dynamic initVal = {'category':getCatText()};
LatLngBounds bounds = mapController!.bounds!; LatLngBounds bounds = mapController!.bounds!;
if(bounds.southEast != null && bounds.southWest != null && bounds.northEast != null && bounds.southEast != null ){ if(bounds.southEast != null && bounds.southWest != null && bounds.northEast != null && bounds.southEast != null ){
CatService.loadCats(bounds.southWest!.latitude, bounds.southWest!.longitude, bounds.northWest.latitude, bounds.northWest.longitude, bounds.northEast!.latitude, bounds.northEast!.longitude, bounds.southEast.latitude, bounds.southEast.longitude).then((value) { CatService.loadCats(bounds.southWest!.latitude, bounds.southWest!.longitude, bounds.northWest.latitude, bounds.northWest.longitude, bounds.northEast!.latitude, bounds.northEast!.longitude, bounds.southEast.latitude, bounds.southEast.longitude).then((value) {
@ -266,7 +314,7 @@ void login(String email, String password, BuildContext context){
} }
void loadCatForCity(String city){ void loadCatForCity(String city){
dynamic initVal = {'category':'-all-'}; dynamic initVal = {'category':getCatText()};
LatLngBounds bounds = mapController!.bounds!; LatLngBounds bounds = mapController!.bounds!;
if(bounds.southEast != null && bounds.southWest != null && bounds.northEast != null && bounds.southEast != null ){ if(bounds.southEast != null && bounds.southWest != null && bounds.northEast != null && bounds.southEast != null ){
CatService.loadCatByCity(city).then((value) { CatService.loadCatByCity(city).then((value) {

View File

@ -111,7 +111,7 @@ class IndexPage extends GetView<IndexController> {
child: Column( child: Column(
children: [ children: [
Container( Container(
padding: const EdgeInsets.symmetric(horizontal: 16.0), padding: const EdgeInsets.symmetric(horizontal: 8.0),
alignment: Alignment.centerLeft, alignment: Alignment.centerLeft,
height: 50.0, height: 50.0,
//child: SingleChildScrollView( //child: SingleChildScrollView(

View File

@ -1,6 +1,8 @@
import 'package:get/get.dart'; import 'package:get/get.dart';
import 'package:get/get_navigation/src/routes/get_route.dart'; import 'package:get/get_navigation/src/routes/get_route.dart';
import 'package:rogapp/pages/camera/camera_page.dart';
import 'package:rogapp/pages/category/category_page.dart'; import 'package:rogapp/pages/category/category_page.dart';
import 'package:rogapp/pages/changepassword/change_password_page.dart';
import 'package:rogapp/pages/city/city_page.dart'; import 'package:rogapp/pages/city/city_page.dart';
import 'package:rogapp/pages/destination/destination_binding.dart'; import 'package:rogapp/pages/destination/destination_binding.dart';
import 'package:rogapp/pages/destination/destination_page.dart'; import 'package:rogapp/pages/destination/destination_page.dart';
@ -42,6 +44,8 @@ class AppPages {
static const SUBPERF = Routes.SUBPERF; static const SUBPERF = Routes.SUBPERF;
static const CITY = Routes.CITY; static const CITY = Routes.CITY;
static const CATEGORY = Routes.CATEOGORY; static const CATEGORY = Routes.CATEOGORY;
static const CHANGE_PASSWORD = Routes.CHANGE_PASSWORD;
static const CAMERA_PAGE = Routes.CAMERA_PAGE;
static final routes = [ static final routes = [
// GetPage( // GetPage(
@ -123,6 +127,14 @@ class AppPages {
GetPage( GetPage(
name: Routes.CATEOGORY, name: Routes.CATEOGORY,
page: () => CategoryPage(), page: () => CategoryPage(),
),
GetPage(
name: Routes.CHANGE_PASSWORD,
page: () => ChangePasswordPage(),
),
GetPage(
name: Routes.CAMERA_PAGE,
page: () => CameraPage(),
) )
]; ];
} }

View File

@ -21,4 +21,6 @@ abstract class Routes {
static const SUBPERF = '/subperf'; static const SUBPERF = '/subperf';
static const CITY = '/city'; static const CITY = '/city';
static const CATEOGORY = '/category'; static const CATEOGORY = '/category';
static const CHANGE_PASSWORD = '/change_password';
static const CAMERA_PAGE = '/camera_page';
} }

View File

@ -5,6 +5,27 @@ import 'package:rogapp/utils/const.dart';
class ActionService{ class ActionService{
static Future<Map<String, dynamic>> postCheckin(String cp_num, String team_name) async{
Map<String, dynamic> checkin_res = {};
String url = 'https://natnats.mobilous.com/post_from_rogapp_ogaki';
//print('---- toekn is ${token} -----');
final http.Response response = await http.post(
Uri.parse(url),
headers: <String, String>{
'Content-Type': 'application/json; charset=UTF-8',
},
body: jsonEncode(<String, String>{
'team_name': team_name,
'cp_number': cp_num.toString()
}),
);
if (response.statusCode == 200) {
checkin_res = json.decode(utf8.decode(response.bodyBytes));
}
return checkin_res;
}
static Future<Map<String, dynamic>> makeAction(int user_id, int location_id, bool wanttogo, bool like, bool checkin) async { static Future<Map<String, dynamic>> makeAction(int user_id, int location_id, bool wanttogo, bool like, bool checkin) async {
print("----- action is ---- ${like}-- ${wanttogo}-- ${checkin}"); print("----- action is ---- ${like}-- ${wanttogo}-- ${checkin}");
Map<String, dynamic> cats = {}; Map<String, dynamic> cats = {};

View File

@ -6,6 +6,30 @@ import '../utils/const.dart';
class AuthService{ class AuthService{
static Future<Map<String, dynamic>> changePassword(String oldpassword, String newpassword, String token) async {
Map<String, dynamic> changePassword = {};
String server_url = ConstValues.currentServer();
String url = '${server_url}/api/change-password/';
print('---- toekn is ${token} -----');
final http.Response response = await http.put(
Uri.parse(url),
headers: <String, String>{
'Content-Type': 'application/json; charset=UTF-8',
'Authorization': 'Token ${token}'
},
body: jsonEncode(<String, String>{
'old_password': oldpassword,
'new_password': newpassword
}),
);
if (response.statusCode == 200) {
changePassword = json.decode(utf8.decode(response.bodyBytes));
}
return changePassword;
}
static Future<Map<String, dynamic>> login(String email, String password) async { static Future<Map<String, dynamic>> login(String email, String password) async {
Map<String, dynamic> cats = {}; Map<String, dynamic> cats = {};
String server_url = ConstValues.currentServer(); String server_url = ConstValues.currentServer();

View File

@ -8,31 +8,31 @@ import 'package:rogapp/utils/const.dart';
class LocationService{ class LocationService{
static Future<GeoJsonFeatureCollection?> loadLocations() async { // static Future<GeoJsonFeatureCollection?> loadLocations() async {
final IndexController indexController = Get.find<IndexController>(); // final IndexController indexController = Get.find<IndexController>();
String server_url = ConstValues.currentServer(); // String server_url = ConstValues.currentServer();
String url = ""; // String url = "";
if(indexController.currentUser.length > 0){ // if(indexController.currentUser.length > 0){
url = '${server_url}/api/location/?is_rog=True'; // url = '${server_url}/api/location/?is_rog=True';
} // }
else { // else {
url = '${server_url}/api/location/'; // url = '${server_url}/api/location/';
} // }
//String url = 'http://localhost:8100/api/location/'; // //String url = 'http://localhost:8100/api/location/';
final response = await http.get(Uri.parse(url), // final response = await http.get(Uri.parse(url),
headers: <String, String>{ // headers: <String, String>{
'Content-Type': 'application/json; charset=UTF-8', // 'Content-Type': 'application/json; charset=UTF-8',
}, // },
); // );
if (response.statusCode == 200) { // if (response.statusCode == 200) {
return featuresFromGeoJson(utf8.decode(response.bodyBytes)); // return featuresFromGeoJson(utf8.decode(response.bodyBytes));
} // }
return null; // return null;
} // }
static Future<GeoJsonFeatureCollection?> loadLocationsFor(String perfecture, String cat) async { static Future<GeoJsonFeatureCollection?> loadLocationsFor(String perfecture, String cat) async {
final IndexController indexController = Get.find<IndexController>(); final IndexController indexController = Get.find<IndexController>();
@ -40,18 +40,22 @@ class LocationService{
String server_url = ConstValues.currentServer(); String server_url = ConstValues.currentServer();
if(cat.isNotEmpty){ if(cat.isNotEmpty){
if(indexController.currentUser.length > 0){ if(indexController.currentUser.isNotEmpty){
bool _rog = indexController.currentUser[0]['user']['is_rogaining'];
String r = _rog == true ? 'True': 'False';
var grp = indexController.currentUser[0]['user']['group']; var grp = indexController.currentUser[0]['user']['group'];
url = '${server_url}/api/inperf/?rog=True&perf=' + perfecture + '&cat=' + cat + "&grp=${grp}"; url = '${server_url}/api/inperf/?rog=${r}&perf=' + perfecture + '&cat=' + cat + "&grp=${grp}";
} }
else { else {
url = '${server_url}/api/inperf/?perf=' + perfecture + '&cat=' + cat; url = '${server_url}/api/inperf/?perf=' + perfecture + '&cat=' + cat;
} }
} }
else{ else{
if(indexController.currentUser.length > 0){ if(indexController.currentUser.isNotEmpty){
bool _rog = indexController.currentUser[0]['user']['is_rogaining'];
String r = _rog == true ? 'True': 'False';
var grp = indexController.currentUser[0]['user']['group']; var grp = indexController.currentUser[0]['user']['group'];
url = '${server_url}/api/inperf/?rog=True&perf=' + perfecture + "&grp=${grp}"; url = '${server_url}/api/inperf/?rog=${r}&perf=' + perfecture + "&grp=${grp}";
} }
else { else {
url = '${server_url}/api/inperf/?perf=' + perfecture; url = '${server_url}/api/inperf/?perf=' + perfecture;
@ -78,18 +82,22 @@ class LocationService{
String url = ""; String url = "";
String server_url = ConstValues.currentServer(); String server_url = ConstValues.currentServer();
if(cat.isNotEmpty){ if(cat.isNotEmpty){
if(indexController.currentUser.length > 0){ if(indexController.currentUser.isNotEmpty){
bool _rog = indexController.currentUser[0]['user']['is_rogaining'];
String r = _rog == true ? 'True': 'False';
var grp = indexController.currentUser[0]['user']['group']; var grp = indexController.currentUser[0]['user']['group'];
url = '${server_url}/api/insubperf?rog=True&subperf=' + subperfecture + '&cat=' + cat + "&grp=${grp}"; url = '${server_url}/api/insubperf?rog=${r}&subperf=' + subperfecture + '&cat=' + cat + "&grp=${grp}";
} }
else{ else{
url = '${server_url}/api/insubperf?subperf=' + subperfecture + '&cat=' + cat; url = '${server_url}/api/insubperf?subperf=' + subperfecture + '&cat=' + cat;
} }
} }
else{ else{
if(indexController.currentUser.length > 0){ if(indexController.currentUser.isNotEmpty){
bool _rog = indexController.currentUser[0]['user']['is_rogaining'];
String r = _rog == true ? 'True': 'False';
var grp = indexController.currentUser[0]['user']['group']; var grp = indexController.currentUser[0]['user']['group'];
url = '${server_url}/api/insubperf?rog=True&subperf=' + subperfecture + "&grp=${grp}"; url = '${server_url}/api/insubperf?rog=${r}&subperf=' + subperfecture + "&grp=${grp}";
} }
else{ else{
url = '${server_url}/api/insubperf?subperf=' + subperfecture; url = '${server_url}/api/insubperf?subperf=' + subperfecture;
@ -117,19 +125,23 @@ class LocationService{
String url = ""; String url = "";
String server_url = ConstValues.currentServer(); String server_url = ConstValues.currentServer();
if(cat.isNotEmpty){ if(cat.isNotEmpty){
if(indexController.currentUser.length > 0){ if(indexController.currentUser.isNotEmpty){
bool _rog = indexController.currentUser[0]['user']['is_rogaining'];
String r = _rog == true ? 'True': 'False';
var grp = indexController.currentUser[0]['user']['group']; var grp = indexController.currentUser[0]['user']['group'];
url = '${server_url}/api/inbound?rog=True&ln1=${lon1}&la1=${lat1}&ln2=${lon2}&la2=${lat2}&ln3=${lon3}&la3=${lat3}&ln4=${lon4}&la4=${lat4}' + '&cat=' + cat + "&grp=${grp}"; url = '${server_url}/api/inbound?rog=${r}&ln1=${lon1}&la1=${lat1}&ln2=${lon2}&la2=${lat2}&ln3=${lon3}&la3=${lat3}&ln4=${lon4}&la4=${lat4}' + '&cat=' + cat + "&grp=${grp}";
} }
else{ else{
url = '${server_url}/api/inbound?ln1=${lon1}&la1=${lat1}&ln2=${lon2}&la2=${lat2}&ln3=${lon3}&la3=${lat3}&ln4=${lon4}&la4=${lat4}' + '&cat=' + cat; url = '${server_url}/api/inbound?ln1=${lon1}&la1=${lat1}&ln2=${lon2}&la2=${lat2}&ln3=${lon3}&la3=${lat3}&ln4=${lon4}&la4=${lat4}' + '&cat=' + cat;
} }
} }
else{ else{
if(indexController.currentUser.length > 0){ if(indexController.currentUser.isNotEmpty){
bool _rog = indexController.currentUser[0]['user']['is_rogaining'];
String r = _rog == true ? 'True': 'False';
var grp = indexController.currentUser[0]['user']['group']; var grp = indexController.currentUser[0]['user']['group'];
print("-------- requested user group ${grp} -------------"); print("-------- requested user group ${grp} -------------");
url = '${server_url}/api/inbound?rog=True&ln1=${lon1}&la1=${lat1}&ln2=${lon2}&la2=${lat2}&ln3=${lon3}&la3=${lat3}&ln4=${lon4}&la4=${lat4}' + '&grp=${grp}'; url = '${server_url}/api/inbound?rog=${r}&ln1=${lon1}&la1=${lat1}&ln2=${lon2}&la2=${lat2}&ln3=${lon3}&la3=${lat3}&ln4=${lon4}&la4=${lat4}' + '&grp=${grp}';
} }
else{ else{
url = '${server_url}/api/inbound?ln1=${lon1}&la1=${lat1}&ln2=${lon2}&la2=${lat2}&ln3=${lon3}&la3=${lat3}&ln4=${lon4}&la4=${lat4}'; url = '${server_url}/api/inbound?ln1=${lon1}&la1=${lat1}&ln2=${lon2}&la2=${lat2}&ln3=${lon3}&la3=${lat3}&ln4=${lon4}&la4=${lat4}';
@ -168,18 +180,22 @@ class LocationService{
String server_url = ConstValues.currentServer(); String server_url = ConstValues.currentServer();
print("loadCustomLocations url is ----- ${cat}"); print("loadCustomLocations url is ----- ${cat}");
if(cat.isNotEmpty){ if(cat.isNotEmpty){
if(indexController.currentUser.length > 0){ if(indexController.currentUser.isNotEmpty){
bool _rog = indexController.currentUser[0]['user']['is_rogaining'];
String r = _rog == true ? 'True': 'False';
var grp = indexController.currentUser[0]['user']['group']; var grp = indexController.currentUser[0]['user']['group'];
url = '${server_url}/api/custom_area/?rog=True&&cat=' + cat + "&grp=${grp}"; url = '${server_url}/api/custom_area/?rog=${r}&&cat=' + cat + "&grp=${grp}";
} }
else{ else{
url = '${server_url}/api/custom_area/?&cat=' + cat; url = '${server_url}/api/custom_area/?&cat=' + cat;
} }
} }
else{ else{
if(indexController.currentUser.length > 0){ if(indexController.currentUser.isNotEmpty){
bool _rog = indexController.currentUser[0]['user']['is_rogaining'];
String r = _rog == true ? 'True': 'False';
var grp = indexController.currentUser[0]['user']['group']; var grp = indexController.currentUser[0]['user']['group'];
url = '${server_url}/api/customarea?rog=True&name=${name}' + "&grp=${grp}"; url = '${server_url}/api/customarea?rog=${r}&name=${name}' + "&grp=${grp}";
} }
else{ else{
url = '${server_url}/api/customarea?name=${name}'; url = '${server_url}/api/customarea?name=${name}';

View File

@ -8,6 +8,6 @@ class ConstValues{
static const dev_home_ip_server = "http://172.20.10.9:8100"; static const dev_home_ip_server = "http://172.20.10.9:8100";
static String currentServer(){ static String currentServer(){
return server_uri; return dev_server;
} }
} }

View File

@ -1,5 +1,6 @@
import 'dart:io'; import 'dart:io';
import 'package:path_provider/path_provider.dart'; import 'package:path_provider/path_provider.dart';
import 'package:rogapp/model/Rogaining.dart';
import 'package:rogapp/model/destination.dart'; import 'package:rogapp/model/destination.dart';
import 'package:sqflite/sqflite.dart'; import 'package:sqflite/sqflite.dart';
import 'package:path/path.dart'; import 'package:path/path.dart';
@ -47,8 +48,78 @@ class DatabaseHelper{
buy_point REAL buy_point REAL
) )
'''); ''');
await db.execute('''
CREATE TABLE rogaining(
rog_id INTEGER PRIMARY KEY AUTOINCREMENT,
course_id INTEGER,
location_id INTEGER,
user_id INTEGER,
lat REAL,
lon REAL,
time_stamp INTEGER
)
''');
} }
Future<List<Rogaining>> allRogianing() async {
Database db = await instance.database;
var rog = await db.query('rogaining');
List<Rogaining> roglist = rog.isNotEmpty ?
rog.map((e) => Rogaining.fromMap(e)).toList() : [];
print("--------- ${rog}");
return roglist;
}
Future<List<Rogaining>> getRogainingByLatLon(double lat, double lon) async {
Database db = await instance.database;
var rog = await db.query('rogaining', where: "lat = ${lat} and lon= ${lon}");
List<Rogaining> roglist = rog.isNotEmpty
? rog.map((e) => Rogaining.fromMap(e)).toList() : [];
return roglist;
}
Future<int> deleteRogaining(int rog_id) async {
Database db = await instance.database;
var rog = await db.delete('rogaining', where: "rog_id = ${rog_id}");
int ret = rog > 0 ? rog : -1;
return ret;
}
Future<void> deleteAllRogaining() async {
Database db = await instance.database;
await db.delete('rogaining');
}
Future<bool>isRogAlreadyAvailable(int rog_id) async{
Database db = await instance.database;
var rog = await db.query('rogaining', where: "rog_id = ${rog_id}");
return rog.length > 0 ? true : false;
}
Future<int> insertRogaining(Rogaining rog) async {
Database db = await instance.database;
int? next_order = Sqflite.firstIntValue(await db.rawQuery('SELECT MAX(rog_id) FROM rogaining'));
next_order = next_order==null ? 0 : next_order;
next_order = next_order + 1;
rog.rog_id = next_order;
int res = await db.insert(
'rogaining',
rog.toMap(),
conflictAlgorithm: ConflictAlgorithm.replace,
);
print("------ database helper insert ${res}-----------::::::::");
return res;
}
Future<List<Destination>> getDestinations() async { Future<List<Destination>> getDestinations() async {
Database db = await instance.database; Database db = await instance.database;
var dest = await db.query('destination', orderBy: 'list_order'); var dest = await db.query('destination', orderBy: 'list_order');

View File

@ -42,7 +42,19 @@ class StringValues extends Translations{
'cancel': 'Cancel', 'cancel': 'Cancel',
'all_destinations_are_deleted_successfully' : 'All destinations are deleted successfully', 'all_destinations_are_deleted_successfully' : 'All destinations are deleted successfully',
'deleted': 'Deleted', 'deleted': 'Deleted',
'remarks' : 'Remarks' 'remarks' : 'Remarks',
'old_password' : 'Old Password',
'new_password' : 'New Password',
'values_required' : 'Values Required',
'failed' : 'Failed',
'password_change_failed_please_try_again' : 'Password change failed, please try again.',
'user_registration_failed_please_try_again' : 'User registration failed, please try again.',
'all': 'All',
'sight_seeing': 'Sight seeing',
'rogaining' : 'Rogaining',
'finishing_rogaining' : 'Finishing Rogaining',
'take_photo of the clock' : 'Take photo of the clock',
'finish_goal': 'finish Goal',
}, },
'ja_JP': { 'ja_JP': {
'drawer_title':'ロゲイニング参加者はログイン するとチェックポイントが参照 できます', 'drawer_title':'ロゲイニング参加者はログイン するとチェックポイントが参照 できます',
@ -85,7 +97,19 @@ class StringValues extends Translations{
'cancel': 'キャンセル', 'cancel': 'キャンセル',
'all_destinations_are_deleted_successfully' : 'すべての宛先が正常に削除されました', 'all_destinations_are_deleted_successfully' : 'すべての宛先が正常に削除されました',
'deleted': "削除された", 'deleted': "削除された",
'remarks' : '備考' 'remarks' : '備考',
'old_password' : '以前のパスワード',
'new_password' : '新しいパスワード',
'values_required' : '必要な値',
'failed' : '失敗した',
'password_change_failed_please_try_again' : 'パスワードの変更に失敗しました。もう一度お試しください',
'user_registration_failed_please_try_again' : 'ユーザー登録に失敗しました。もう一度お試しください',
'all': '全て',
'sight_seeing': '観光',
'rogaining' : 'ロゲイニング',
'finishing_rogaining' : 'ロゲイニングを終えて',
'take_photo of the clock' : '時計の写真を撮る',
'finish_goal': 'フィニッシュゴール',
}, },
}; };
} }

25
lib/utils/text_util.dart Normal file
View File

@ -0,0 +1,25 @@
import 'package:rogapp/model/destination.dart';
class TextUtils{
static String getDisplaytext(Destination dp){
RegExp regex = RegExp(r'([.]*0)(?!.*\d)');
String txt = "";
if(dp.cp! > 0){
txt = "${dp.cp.toString().replaceAll(regex, '')}";
if(dp.checkin_point != null && dp.checkin_point! > 0){
txt = txt + "{${dp.checkin_point.toString().replaceAll(regex, '')}}";
}
if(dp.buy_point != null && dp.buy_point! > 0){
txt = txt + "[${dp.buy_point.toString().replaceAll(regex, '')}]";
}
}
return txt;
}
static String getDisplayText(String num){
RegExp regex = RegExp(r'([.]*0)(?!.*\d)');
return "${num.replaceAll(regex, '')}";
}
}

View File

@ -9,6 +9,7 @@ import 'package:rogapp/pages/destination/destination_controller.dart';
import 'package:rogapp/pages/index/index_controller.dart'; import 'package:rogapp/pages/index/index_controller.dart';
import 'package:rogapp/routes/app_pages.dart'; import 'package:rogapp/routes/app_pages.dart';
import 'package:rogapp/utils/database_helper.dart'; import 'package:rogapp/utils/database_helper.dart';
import 'package:rogapp/utils/text_util.dart';
import 'package:rogapp/widgets/bottom_sheet_controller.dart'; import 'package:rogapp/widgets/bottom_sheet_controller.dart';
import 'package:url_launcher/url_launcher.dart'; import 'package:url_launcher/url_launcher.dart';
@ -127,27 +128,21 @@ class BottomSheetNew extends GetView<BottomSheetController> {
child: Container( child: Container(
alignment: Alignment.center, alignment: Alignment.center,
child: Obx(() => child: Obx(() =>
Text(indexController.currentDestinationFeature[0].name!, style: TextStyle( indexController.currentUser.length > 0 ?
fontSize: 15.0, Text("${TextUtils.getDisplayText(indexController.currentDestinationFeature[0].cp.toString())} : ${TextUtils.getDisplayText(indexController.currentDestinationFeature[0].checkin_point.toString())} : ${indexController.currentDestinationFeature[0].name!}", style: TextStyle(
fontWeight: FontWeight.bold, fontSize: 15.0,
), fontWeight: FontWeight.bold,
) ),
)
:
Text("${indexController.currentDestinationFeature[0].name!}", style: TextStyle(
fontSize: 15.0,
fontWeight: FontWeight.bold,
),
)
), ),
), ),
), ),
// MaterialButton(
// onPressed: () {
// destinationController.makeNext(indexController.currentDestinationFeature[0]);
// },
// color: Colors.blue,
// textColor: Colors.white,
// child: Icon(
// Icons.arrow_forward_ios,
// size: 14,
// ),
// padding: EdgeInsets.all(16),
// shape: CircleBorder(),
// ),
], ],
), ),
), ),
@ -248,20 +243,6 @@ class BottomSheetNew extends GetView<BottomSheetController> {
), ),
), ),
), ),
// MaterialButton(
// onPressed: () {
// //print("----- next is ${indexController.currentFeature[0]} ------");
// indexController.makeNext(indexController.currentFeature[0]);
// },
// color: Colors.blue,
// textColor: Colors.white,
// child: Icon(
// Icons.arrow_forward_ios,
// size: 14,
// ),
// padding: EdgeInsets.all(16),
// shape: CircleBorder(),
// ),
], ],
), ),
), ),
@ -302,16 +283,6 @@ class BottomSheetNew extends GetView<BottomSheetController> {
], ],
), ),
), ),
// Expanded(
// child: Row(
// mainAxisAlignment: MainAxisAlignment.start,
// children: [
// Icon(Icons.thumb_up_alt_sharp, color: Colors.blue,),
// SizedBox(width: 10.0,),
// Text("Like"),
// ],
// ),
// ),
], ],
), ),
SizedBox(height: 8.0,), SizedBox(height: 8.0,),
@ -379,7 +350,7 @@ class BottomSheetNew extends GetView<BottomSheetController> {
], ],
), ),
), ),
Text('${indexController.currentFeature[0].properties!["cp"].toString()} - id: ${indexController.currentFeature[0].properties!["checkin_point"].toString()}'), // Text('${TextUtils.getDisplayText(indexController.currentFeature[0].properties!["cp"].toString())} - id: ${TextUtils.getDisplayText(indexController.currentFeature[0].properties!["checkin_point"].toString())}'),
], ],
), ),
) )
@ -391,6 +362,7 @@ class BottomSheetNew extends GetView<BottomSheetController> {
} }
Future<Widget> wantToGo(BuildContext context)async { Future<Widget> wantToGo(BuildContext context)async {
bool _selected = false; bool _selected = false;
print('---target-- ${indexController.currentFeature[0].properties!["location_id"]}----'); print('---target-- ${indexController.currentFeature[0].properties!["location_id"]}----');
for(Destination d in destinationController.destinations){ for(Destination d in destinationController.destinations){
@ -413,15 +385,49 @@ class BottomSheetNew extends GetView<BottomSheetController> {
IconButton( IconButton(
icon: Icon(Icons.pin_drop_sharp, size: 32, color: _selected == true ? Colors.amber : Colors.blue,), icon: Icon(Icons.pin_drop_sharp, size: 32, color: _selected == true ? Colors.amber : Colors.blue,),
onPressed: (){ onPressed: (){
if(_selected){return;} if(_selected){
// show remove from destination
Get.defaultDialog(
title: "本当にこのポイントを通過順から外しますか?",
middleText: "場所は目的地リストから削除されます",
backgroundColor: Colors.blue.shade300,
titleStyle: TextStyle(color: Colors.white),
middleTextStyle: TextStyle(color: Colors.white),
textConfirm: "はい",
textCancel: "いいえ",
cancelTextColor: Colors.white,
confirmTextColor: Colors.blue,
buttonColor: Colors.white,
barrierDismissible: false,
radius: 10,
content: Column(
children: [
],
),
onConfirm: (){
int _id = indexController.currentFeature[0].properties!["location_id"];
Destination? d = destinationController.destinationById(_id);
print('--- des id is : ${d} -----');
if(d != null) {
//print('--- des id is : ${d.location_id} -----');
destinationController.deleteDestination(d);
Get.back();
Get.back();
Get.snackbar("追加した", "場所が削除されました");
}
}
);
return;
}
// show add to destination
Get.defaultDialog( Get.defaultDialog(
title: "この場所を登録してもよろしいですか", title: "この場所を登録してもよろしいですか",
middleText: "ロケーションがロガニング リストに追加されます", middleText: "ロケーションがロガニング リストに追加されます",
backgroundColor: Colors.blue.shade300, backgroundColor: Colors.blue.shade300,
titleStyle: TextStyle(color: Colors.white), titleStyle: TextStyle(color: Colors.white),
middleTextStyle: TextStyle(color: Colors.white), middleTextStyle: TextStyle(color: Colors.white),
textConfirm: "確認", textConfirm: "はい",
textCancel: "キャンセル", textCancel: "いいえ",
cancelTextColor: Colors.white, cancelTextColor: Colors.white,
confirmTextColor: Colors.blue, confirmTextColor: Colors.blue,
buttonColor: Colors.white, buttonColor: Colors.white,
@ -459,6 +465,7 @@ class BottomSheetNew extends GetView<BottomSheetController> {
); );
destinationController.addDestinations(dest); destinationController.addDestinations(dest);
Get.back(); Get.back();
Get.back();
Get.snackbar("追加した", "場所が追加されました"); Get.snackbar("追加した", "場所が追加されました");
} }
); );
@ -581,13 +588,16 @@ class BottomSheetNew extends GetView<BottomSheetController> {
} }
}, },
child: Text(text, child: Container(
style: TextStyle( width: MediaQuery.of(context).size.width - 160,
color: Colors.blue, child: Expanded(
), child: Text(text,
overflow: TextOverflow.ellipsis, style: TextStyle(
maxLines: 5, color: isurl ? Colors.blue : Colors.black,
),
),
), ),
),
), ),
], ],
); );

View File

@ -1,5 +1,4 @@
import 'dart:ffi'; import 'dart:ffi';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:geojson/geojson.dart'; import 'package:geojson/geojson.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';

View File

@ -205,7 +205,7 @@ class _PerfectureWidgetState extends State<PerfectureWidget> {
//CatWidget(indexController: widget.indexController,), //CatWidget(indexController: widget.indexController,),
widget.indexController.cats.length > 0 ? widget.indexController.cats.length > 0 ?
DropdownButton<String>( DropdownButton<String>(
value: widget.indexController.cateogory, value: widget.indexController.getCatText(),
icon: const Icon(Icons.arrow_downward), icon: const Icon(Icons.arrow_downward),
elevation: 16, elevation: 16,
style: const TextStyle(color: Colors.deepPurple), style: const TextStyle(color: Colors.deepPurple),
@ -238,123 +238,3 @@ class _PerfectureWidgetState extends State<PerfectureWidget> {
); );
} }
} }
// class PerfectureWidget extends StatefulWidget {
// HomeController homeController;
// MapController mapController;
// PerfectureWidget({required this.homeController, required this.mapController});
// @override
// State<PerfectureWidget> createState() => _PerfectureWidgetState();
// }
// class _PerfectureWidgetState extends State<PerfectureWidget> {
// String dropdownValue = "9";
// List<DropdownMenuItem<String>> getDropdownItems() {
// List<DropdownMenuItem<String>> dropDownItems = [];
// for (Map<String, dynamic> currency in widget.homeController.perfectures[0]) {
// //print(currency["id"].toString());
// var newDropdown = DropdownMenuItem(
// child: Text(currency["adm1_ja"].toString()),
// value: currency["id"].toString(),
// );
// dropDownItems.add(newDropdown);
// }
// return dropDownItems;
// }
// List<DropdownMenuItem<String>> getSubDropdownItems() {
// List<DropdownMenuItem<String>> dropDownItems = [];
// if(widget.homeController.subPerfs.length > 0){
// for (Map<String, dynamic> currency in widget.homeController.subPerfs[0]) {
// var newDropdown = DropdownMenuItem(
// child: Text(currency["adm2_ja"].toString()),
// value: currency["id"].toString(),
// );
// dropDownItems.add(newDropdown);
// }
// }
// return dropDownItems;
// }
// @override
// void initState() {
// super.initState();
// widget.homeController.loadSubPerfFor("9");
// widget.homeController.zoomtoMainPerf("9", widget.mapController);
// }
// @override
// Widget build(BuildContext context) {
// return Obx(() =>
// Row(
// children: [
// DropdownButton<String>(
// value: dropdownValue,
// icon: const Icon(Icons.arrow_downward),
// elevation: 16,
// style: const TextStyle(color: Colors.deepPurple),
// underline: Container(
// height: 2,
// color: Colors.deepPurpleAccent,
// ),
// onChanged: (String? newValue) {
// //setState(() {
// if(newValue != null){
// dropdownValue = newValue;
// widget.homeController.loadLocationforPerf(newValue, widget.mapController);
// widget.homeController.loadSubPerfFor(newValue);
// //SubDropdownValue = widget.homeController.getSubInitialVal();
// //widget.mapController.fitBounds(widget.homeController.currentBound[0]);
// widget.homeController.zoomtoMainPerf(newValue, widget.mapController);
// }
// //});
// },
// items: getDropdownItems()
// ),
// widget.homeController.subPerfs.length > 0 ?
// DropdownButton<String>(
// value: widget.homeController.SubDropdownValue,
// icon: const Icon(Icons.arrow_downward),
// elevation: 16,
// style: const TextStyle(color: Colors.deepPurple),
// hint: Container(
// child: Text("select"),
// ),
// underline: Container(
// height: 2,
// color: Colors.deepPurpleAccent,
// ),
// onChanged: (String? newValue) {
// //setState(() {
// if(newValue != null){
// widget.homeController.loadLocationforSubPerf(newValue, widget.mapController);
// widget.homeController.SubDropdownValue = newValue;
// widget.homeController.zoomtoSubPerf(newValue, widget.mapController);
// }
// //});
// },
// items:
// getSubDropdownItems()
// ) :
// Text("")
// ],
// ),
// );
// }
// }

View File

@ -28,7 +28,7 @@ packages:
name: async name: async
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.8.2" version: "2.9.0"
boolean_selector: boolean_selector:
dependency: transitive dependency: transitive
description: description:
@ -36,20 +36,55 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.1.0" version: "2.1.0"
camera:
dependency: transitive
description:
name: camera
url: "https://pub.dartlang.org"
source: hosted
version: "0.10.0+3"
camera_android:
dependency: transitive
description:
name: camera_android
url: "https://pub.dartlang.org"
source: hosted
version: "0.10.0+3"
camera_avfoundation:
dependency: transitive
description:
name: camera_avfoundation
url: "https://pub.dartlang.org"
source: hosted
version: "0.9.8+6"
camera_camera:
dependency: "direct main"
description:
name: camera_camera
url: "https://pub.dartlang.org"
source: hosted
version: "3.0.0-dev"
camera_platform_interface:
dependency: transitive
description:
name: camera_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "2.2.2"
camera_web:
dependency: transitive
description:
name: camera_web
url: "https://pub.dartlang.org"
source: hosted
version: "0.3.0+1"
characters: characters:
dependency: transitive dependency: transitive
description: description:
name: characters name: characters
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.2.0" version: "1.2.1"
charcode:
dependency: transitive
description:
name: charcode
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.1"
checked_yaml: checked_yaml:
dependency: transitive dependency: transitive
description: description:
@ -77,7 +112,7 @@ packages:
name: clock name: clock
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.1.0" version: "1.1.1"
collection: collection:
dependency: "direct main" dependency: "direct main"
description: description:
@ -119,7 +154,7 @@ packages:
name: fake_async name: fake_async
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.3.0" version: "1.3.1"
ffi: ffi:
dependency: transitive dependency: transitive
description: description:
@ -254,6 +289,13 @@ packages:
description: flutter description: flutter
source: sdk source: sdk
version: "0.0.0" version: "0.0.0"
font_awesome_flutter:
dependency: transitive
description:
name: font_awesome_flutter
url: "https://pub.dartlang.org"
source: hosted
version: "10.2.1"
geodesy: geodesy:
dependency: transitive dependency: transitive
description: description:
@ -491,14 +533,14 @@ packages:
name: matcher name: matcher
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.12.11" version: "0.12.12"
material_color_utilities: material_color_utilities:
dependency: transitive dependency: transitive
description: description:
name: material_color_utilities name: material_color_utilities
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.1.4" version: "0.1.5"
material_design_icons_flutter: material_design_icons_flutter:
dependency: "direct main" dependency: "direct main"
description: description:
@ -512,7 +554,7 @@ packages:
name: meta name: meta
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.7.0" version: "1.8.0"
mgrs_dart: mgrs_dart:
dependency: transitive dependency: transitive
description: description:
@ -526,7 +568,7 @@ packages:
name: path name: path
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.8.1" version: "1.8.2"
path_provider: path_provider:
dependency: "direct main" dependency: "direct main"
description: description:
@ -706,7 +748,7 @@ packages:
name: source_span name: source_span
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.8.2" version: "1.9.0"
sqflite: sqflite:
dependency: "direct main" dependency: "direct main"
description: description:
@ -748,7 +790,7 @@ packages:
name: string_scanner name: string_scanner
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.1.0" version: "1.1.1"
synchronized: synchronized:
dependency: transitive dependency: transitive
description: description:
@ -762,14 +804,14 @@ packages:
name: term_glyph name: term_glyph
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.2.0" version: "1.2.1"
test_api: test_api:
dependency: transitive dependency: transitive
description: description:
name: test_api name: test_api
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.4.9" version: "0.4.12"
timeline_tile: timeline_tile:
dependency: "direct main" dependency: "direct main"
description: description:

View File

@ -69,6 +69,7 @@ dependencies:
flutter_launcher_icons: ^0.10.0 flutter_launcher_icons: ^0.10.0
rename: ^2.0.1 rename: ^2.0.1
circular_menu: ^2.0.1 circular_menu: ^2.0.1
camera_camera: ^3.0.0-dev
flutter_icons: flutter_icons:
android: true android: true