update logs
This commit is contained in:
@ -56,7 +56,7 @@ android {
|
|||||||
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
|
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
|
||||||
applicationId "com.dvox.gifunavi"
|
applicationId "com.dvox.gifunavi"
|
||||||
minSdkVersion 23
|
minSdkVersion 23
|
||||||
targetSdkVersion flutter.targetSdkVersion
|
targetSdkVersion 33
|
||||||
versionCode flutterVersionCode.toInteger()
|
versionCode flutterVersionCode.toInteger()
|
||||||
versionName flutterVersionName
|
versionName flutterVersionName
|
||||||
multiDexEnabled true
|
multiDexEnabled true
|
||||||
|
|||||||
@ -189,6 +189,7 @@ class DestinationController extends GetxController {
|
|||||||
if (d.cp == -1 && DateTime.now().difference(last_goal_at).inHours >= 24) {
|
if (d.cp == -1 && DateTime.now().difference(last_goal_at).inHours >= 24) {
|
||||||
chekcs = 1;
|
chekcs = 1;
|
||||||
//start
|
//start
|
||||||
|
print("~~~~ calling start ~~~~");
|
||||||
print("---- in start -----");
|
print("---- in start -----");
|
||||||
chekcs = 1;
|
chekcs = 1;
|
||||||
is_in_checkin.value = true;
|
is_in_checkin.value = true;
|
||||||
@ -656,6 +657,7 @@ class DestinationController extends GetxController {
|
|||||||
|
|
||||||
Future<void> makeCheckin(
|
Future<void> makeCheckin(
|
||||||
Destination destination, bool action, String imageurl) async {
|
Destination destination, bool action, String imageurl) async {
|
||||||
|
print("~~~~ calling checkin function ~~~~");
|
||||||
print(
|
print(
|
||||||
"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ ressssss ${destination.sub_loc_id}@@@@@@@@@@@");
|
"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ ressssss ${destination.sub_loc_id}@@@@@@@@@@@");
|
||||||
DatabaseHelper db = DatabaseHelper.instance;
|
DatabaseHelper db = DatabaseHelper.instance;
|
||||||
@ -666,6 +668,7 @@ class DestinationController extends GetxController {
|
|||||||
destination.checkedin = true;
|
destination.checkedin = true;
|
||||||
destination.checkin_image = imageurl;
|
destination.checkin_image = imageurl;
|
||||||
await db.insertDestination(destination);
|
await db.insertDestination(destination);
|
||||||
|
print("~~~~ inserted into db ~~~~");
|
||||||
}
|
}
|
||||||
|
|
||||||
await GallerySaver.saveImage(imageurl);
|
await GallerySaver.saveImage(imageurl);
|
||||||
|
|||||||
@ -78,6 +78,8 @@ class ExternalService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Future<Map<String, dynamic>> makeCheckpoint(int userId, String token, String checkinTime, String teamname, int cp, String eventcode, String imageurl) async {
|
Future<Map<String, dynamic>> makeCheckpoint(int userId, String token, String checkinTime, String teamname, int cp, String eventcode, String imageurl) async {
|
||||||
|
print("~~~~ in API call function ~~~~");
|
||||||
|
print("~~~~ cp is ${cp} ~~~~");
|
||||||
//print("--cpcp-- ${cp}");
|
//print("--cpcp-- ${cp}");
|
||||||
Map<String, dynamic> _res = {};
|
Map<String, dynamic> _res = {};
|
||||||
String url = 'https://rogaining.sumasen.net/gifuroge/checkin_from_rogapp';
|
String url = 'https://rogaining.sumasen.net/gifuroge/checkin_from_rogapp';
|
||||||
@ -85,7 +87,6 @@ class ExternalService {
|
|||||||
final IndexController indexController = Get.find<IndexController>();
|
final IndexController indexController = Get.find<IndexController>();
|
||||||
|
|
||||||
if(imageurl != null){
|
if(imageurl != null){
|
||||||
|
|
||||||
if(indexController.connectionStatusName != "wifi" && indexController.connectionStatusName != "mobile"){
|
if(indexController.connectionStatusName != "wifi" && indexController.connectionStatusName != "mobile"){
|
||||||
DatabaseHelper db = DatabaseHelper.instance;
|
DatabaseHelper db = DatabaseHelper.instance;
|
||||||
Rog _rog = Rog(
|
Rog _rog = Rog(
|
||||||
@ -106,6 +107,8 @@ class ExternalService {
|
|||||||
final im1Bytes = File(imageurl).readAsBytesSync();
|
final im1Bytes = File(imageurl).readAsBytesSync();
|
||||||
String im1_64 = base64Encode(im1Bytes);
|
String im1_64 = base64Encode(im1Bytes);
|
||||||
|
|
||||||
|
print("~~~~ before calling api 1 ~~~~");
|
||||||
|
|
||||||
final http.Response response = await http.post(
|
final http.Response response = await http.post(
|
||||||
Uri.parse(url1),
|
Uri.parse(url1),
|
||||||
headers: <String, String>{
|
headers: <String, String>{
|
||||||
@ -124,11 +127,14 @@ class ExternalService {
|
|||||||
);
|
);
|
||||||
|
|
||||||
_res = json.decode(utf8.decode(response.bodyBytes));
|
_res = json.decode(utf8.decode(response.bodyBytes));
|
||||||
|
print("~~~~ api1 result ${_res} ~~~~");
|
||||||
print("-----@@@@@ checkin $_res -----");
|
//print("-----@@@@@ checkin $_res -----");
|
||||||
|
|
||||||
if(response.statusCode == 201){
|
if(response.statusCode == 201){
|
||||||
|
print("~~~~ image from api1 ${_res["checkinimage"].toString()} ~~~~");
|
||||||
//print('---- toekn is ${token} -----');
|
//print('---- toekn is ${token} -----');
|
||||||
|
print("~~~~ token is ${token} ~~~~");
|
||||||
|
print("~~~~ before callling api2 ~~~~");
|
||||||
final http.Response response2 = await http.post(
|
final http.Response response2 = await http.post(
|
||||||
Uri.parse(url),
|
Uri.parse(url),
|
||||||
headers: <String, String>{
|
headers: <String, String>{
|
||||||
@ -147,8 +153,9 @@ class ExternalService {
|
|||||||
'event_code': eventcode,
|
'event_code': eventcode,
|
||||||
'image': _res["checkinimage"].toString().replaceAll('http://localhost:8100', 'http://rogaining.sumasen.net')
|
'image': _res["checkinimage"].toString().replaceAll('http://localhost:8100', 'http://rogaining.sumasen.net')
|
||||||
});
|
});
|
||||||
print("--json-- $vv");
|
print("~~~~ api 2 values ${vv} ~~~~");
|
||||||
print("--- checnin response ${response2.statusCode}----");
|
//print("--json-- $vv");
|
||||||
|
//print("--- checnin response ${response2.statusCode}----");
|
||||||
if (response2.statusCode == 200) {
|
if (response2.statusCode == 200) {
|
||||||
_res = json.decode(utf8.decode(response2.bodyBytes));
|
_res = json.decode(utf8.decode(response2.bodyBytes));
|
||||||
print('----checkin res _res : $_res ----');
|
print('----checkin res _res : $_res ----');
|
||||||
@ -204,6 +211,7 @@ class ExternalService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
print("~~~~ done checkin ~~~~");
|
||||||
return _res;
|
return _res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -10,6 +10,7 @@ class ConstValues{
|
|||||||
static const dev_home_ip_mserver = "http://192.168.1.10:8100";
|
static const dev_home_ip_mserver = "http://192.168.1.10:8100";
|
||||||
|
|
||||||
static String currentServer(){
|
static String currentServer(){
|
||||||
|
//return dev_ip_server;
|
||||||
return server_uri;
|
return server_uri;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -451,6 +451,7 @@ class BottomSheetNew extends GetView<BottomSheetController> {
|
|||||||
? ElevatedButton(
|
? ElevatedButton(
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
await destinationController.resetRogaining();
|
await destinationController.resetRogaining();
|
||||||
|
print("~~~~ start button ~~~~");
|
||||||
destinationController.is_in_rog.value =
|
destinationController.is_in_rog.value =
|
||||||
true;
|
true;
|
||||||
destinationController.addToRogaining(
|
destinationController.addToRogaining(
|
||||||
@ -561,6 +562,7 @@ class BottomSheetNew extends GetView<BottomSheetController> {
|
|||||||
backgroundColor:
|
backgroundColor:
|
||||||
Theme.of(context).colorScheme.secondary),
|
Theme.of(context).colorScheme.secondary),
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
|
print("~~~~ manual checkin button ~~~~");
|
||||||
if (destination.cp == -1) {
|
if (destination.cp == -1) {
|
||||||
destinationController.is_in_rog.value = true;
|
destinationController.is_in_rog.value = true;
|
||||||
destinationController.addToRogaining(
|
destinationController.addToRogaining(
|
||||||
@ -908,6 +910,7 @@ class BottomSheetNew extends GetView<BottomSheetController> {
|
|||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
Destination dest =
|
Destination dest =
|
||||||
indexController.currentDestinationFeature[0];
|
indexController.currentDestinationFeature[0];
|
||||||
|
print("~~~~ before checking button ~~~~");
|
||||||
//print("------ curent destination is ${dest!.checkedIn}-------");
|
//print("------ curent destination is ${dest!.checkedIn}-------");
|
||||||
destinationController.makeCheckin(
|
destinationController.makeCheckin(
|
||||||
dest, !dest.checkedin!, "");
|
dest, !dest.checkedin!, "");
|
||||||
|
|||||||
@ -15,7 +15,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
|
|||||||
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
|
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
|
||||||
# Read more about iOS versioning at
|
# Read more about iOS versioning at
|
||||||
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
|
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
|
||||||
version: 1.0.23+23
|
version: 1.0.24+24
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: '>=3.1.0 <4.0.0'
|
sdk: '>=3.1.0 <4.0.0'
|
||||||
|
|||||||
Reference in New Issue
Block a user