diff --git a/gsf/android/app/build.gradle b/gsf/android/app/build.gradle
index 0110c2d..50fbad9 100644
--- a/gsf/android/app/build.gradle
+++ b/gsf/android/app/build.gradle
@@ -58,11 +58,11 @@ android {
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.getsetfit.gsf"
- // You can update the following values to match your application needs.
+ // You can update the following values to match yourx application needs.
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
minSdkVersion 26
targetSdkVersion 33
- versionCode 19//flutterVersionCode.toInteger()//3
+ versionCode 21//flutterVersionCode.toInteger()//3
versionName "1.0"//flutterVersionName //"1.0"
manifestPlaceholders['foregroundServiceType'] = 'health'
diff --git a/gsf/ios/Podfile.lock b/gsf/ios/Podfile.lock
index 6a2d284..a8dc99a 100644
--- a/gsf/ios/Podfile.lock
+++ b/gsf/ios/Podfile.lock
@@ -54,9 +54,9 @@ PODS:
- FirebaseCoreInternal (~> 10.0)
- GoogleUtilities/Environment (~> 7.8)
- GoogleUtilities/Logger (~> 7.8)
- - FirebaseCoreExtension (10.18.0):
+ - FirebaseCoreExtension (10.27.0):
- FirebaseCore (~> 10.0)
- - FirebaseCoreInternal (10.18.0):
+ - FirebaseCoreInternal (10.27.0):
- "GoogleUtilities/NSData+zlib (~> 7.8)"
- FirebaseCrashlytics (10.17.0):
- FirebaseCore (~> 10.5)
@@ -66,18 +66,19 @@ PODS:
- GoogleUtilities/Environment (~> 7.8)
- nanopb (< 2.30910.0, >= 2.30908.0)
- PromisesObjC (~> 2.1)
- - FirebaseInstallations (10.18.0):
+ - FirebaseInstallations (10.27.0):
- FirebaseCore (~> 10.0)
- GoogleUtilities/Environment (~> 7.8)
- GoogleUtilities/UserDefaults (~> 7.8)
- PromisesObjC (~> 2.1)
- - FirebaseSessions (10.18.0):
+ - FirebaseSessions (10.27.0):
- FirebaseCore (~> 10.5)
- FirebaseCoreExtension (~> 10.0)
- FirebaseInstallations (~> 10.0)
- GoogleDataTransport (~> 9.2)
- - GoogleUtilities/Environment (~> 7.10)
- - nanopb (< 2.30910.0, >= 2.30908.0)
+ - GoogleUtilities/Environment (~> 7.13)
+ - GoogleUtilities/UserDefaults (~> 7.13)
+ - nanopb (< 2.30911.0, >= 2.30908.0)
- PromisesSwift (~> 2.1)
- Flutter (1.0.0)
- flutter_blue_plus (0.0.1):
@@ -96,9 +97,9 @@ PODS:
- fluttertoast (0.0.2):
- Flutter
- Toast
- - FMDB (2.7.5):
- - FMDB/standard (= 2.7.5)
- - FMDB/standard (2.7.5)
+ - FMDB (2.7.11):
+ - FMDB/standard (= 2.7.11)
+ - FMDB/standard (2.7.11)
- geolocator_apple (1.2.0):
- Flutter
- GoogleAppMeasurement (10.17.0):
@@ -121,29 +122,38 @@ PODS:
- GoogleUtilities/Network (~> 7.11)
- "GoogleUtilities/NSData+zlib (~> 7.11)"
- nanopb (< 2.30910.0, >= 2.30908.0)
- - GoogleDataTransport (9.2.5):
+ - GoogleDataTransport (9.4.1):
- GoogleUtilities/Environment (~> 7.7)
- - nanopb (< 2.30910.0, >= 2.30908.0)
+ - nanopb (< 2.30911.0, >= 2.30908.0)
- PromisesObjC (< 3.0, >= 1.2)
- - GoogleUtilities/AppDelegateSwizzler (7.12.0):
+ - GoogleUtilities/AppDelegateSwizzler (7.13.3):
- GoogleUtilities/Environment
- GoogleUtilities/Logger
- GoogleUtilities/Network
- - GoogleUtilities/Environment (7.12.0):
+ - GoogleUtilities/Privacy
+ - GoogleUtilities/Environment (7.13.3):
+ - GoogleUtilities/Privacy
- PromisesObjC (< 3.0, >= 1.2)
- - GoogleUtilities/Logger (7.12.0):
+ - GoogleUtilities/Logger (7.13.3):
- GoogleUtilities/Environment
- - GoogleUtilities/MethodSwizzler (7.12.0):
+ - GoogleUtilities/Privacy
+ - GoogleUtilities/MethodSwizzler (7.13.3):
- GoogleUtilities/Logger
- - GoogleUtilities/Network (7.12.0):
+ - GoogleUtilities/Privacy
+ - GoogleUtilities/Network (7.13.3):
- GoogleUtilities/Logger
- "GoogleUtilities/NSData+zlib"
+ - GoogleUtilities/Privacy
- GoogleUtilities/Reachability
- - "GoogleUtilities/NSData+zlib (7.12.0)"
- - GoogleUtilities/Reachability (7.12.0):
+ - "GoogleUtilities/NSData+zlib (7.13.3)":
+ - GoogleUtilities/Privacy
+ - GoogleUtilities/Privacy (7.13.3)
+ - GoogleUtilities/Reachability (7.13.3):
- GoogleUtilities/Logger
- - GoogleUtilities/UserDefaults (7.12.0):
+ - GoogleUtilities/Privacy
+ - GoogleUtilities/UserDefaults (7.13.3):
- GoogleUtilities/Logger
+ - GoogleUtilities/Privacy
- health (1.0.4):
- Flutter
- icdevicemanager_flutter (1.0.0):
@@ -184,10 +194,10 @@ PODS:
- Flutter
- permission_handler_apple (9.0.4):
- Flutter
- - PromisesObjC (2.3.1)
- - PromisesSwift (2.3.1):
- - PromisesObjC (= 2.3.1)
- - ReachabilitySwift (5.0.0)
+ - PromisesObjC (2.4.0)
+ - PromisesSwift (2.4.0):
+ - PromisesObjC (= 2.4.0)
+ - ReachabilitySwift (5.2.3)
- share_plus (0.0.1):
- Flutter
- shared_preferences_foundation (0.0.1):
@@ -198,7 +208,7 @@ PODS:
- FMDB (>= 2.7.5)
- syncfusion_flutter_pdfviewer (0.0.1):
- Flutter
- - Toast (4.0.0)
+ - Toast (4.1.1)
- TOCropViewController (2.6.1)
- uni_links (0.0.1):
- Flutter
@@ -374,11 +384,11 @@ SPEC CHECKSUMS:
firebase_crashlytics: 6a564f58db90be49c49d9ac100bc5cc3fcbf8267
FirebaseAnalytics: b9284f9fff10157a843e0422e908711f7bf3b9f2
FirebaseCore: 534544dd98cabcf4bf8598d88ec683b02319a528
- FirebaseCoreExtension: 62b201498aa10535801cdf3448c7f4db5e24ed80
- FirebaseCoreInternal: 8eb002e564b533bdcf1ba011f33f2b5c10e2ed4a
+ FirebaseCoreExtension: 4ec89dd0c6de93d6becde32122d68b7c35f6bf5d
+ FirebaseCoreInternal: 4b297a2d56063dbea2c1d0d04222d44a8d058862
FirebaseCrashlytics: d78651ad7db206ef98269e103ac38d69d569200a
- FirebaseInstallations: e842042ec6ac1fd2e37d7706363ebe7f662afea4
- FirebaseSessions: f90fe9212ee2818641eda051c0835c9c4e30d9ae
+ FirebaseInstallations: 766dabca09fd94aef922538aaf144cc4a6fb6869
+ FirebaseSessions: 2fdf949f9e58295a57703ae8f2efc44f9fa3aa16
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
flutter_blue_plus: 5cb46a0d66c6cacebf7551e0e5a6bfa345ccc224
flutter_branch_sdk: cc0393df011973fe6ab0380bc54bce1a3726e8a3
@@ -387,11 +397,11 @@ SPEC CHECKSUMS:
flutter_native_splash: 52501b97d1c0a5f898d687f1646226c1f93c56ef
flutter_pdfview: 25f53dd6097661e6395b17de506e6060585946bd
fluttertoast: 48c57db1b71b0ce9e6bba9f31c940ff4b001293c
- FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a
+ FMDB: 57486c1117fd8e0e6b947b2f54c3f42bf8e57a4e
geolocator_apple: cc556e6844d508c95df1e87e3ea6fa4e58c50401
GoogleAppMeasurement: 4dcddfc7f102825c1c4e6422cb35567b101881a7
- GoogleDataTransport: 54dee9d48d14580407f8f5fbf2f496e92437a2f2
- GoogleUtilities: 0759d1a57ebb953965c2dfe0ba4c82e95ccc2e34
+ GoogleDataTransport: 6c09b596d841063d76d4288cc2d2f42cc36e1e2a
+ GoogleUtilities: ea963c370a38a8069cc5f7ba4ca849a60b6d7d15
health: 5a380c0f6c4f619535845992993964293962e99e
icdevicemanager_flutter: 88e2e000e6de2590bfe51a0af7f8c789d35edc44
image_cropper: 60c2789d1f1a78c873235d4319ca0c34a69f2d98
@@ -405,14 +415,14 @@ SPEC CHECKSUMS:
path_provider_foundation: c68054786f1b4f3343858c1e1d0caaded73f0be9
pedometer: 381969883680ade42559782cc41a3bbd453d8234
permission_handler_apple: 44366e37eaf29454a1e7b1b7d736c2cceaeb17ce
- PromisesObjC: c50d2056b5253dadbd6c2bea79b0674bd5a52fa4
- PromisesSwift: 28dca69a9c40779916ac2d6985a0192a5cb4a265
- ReachabilitySwift: 985039c6f7b23a1da463388634119492ff86c825
+ PromisesObjC: f5707f49cb48b9636751c5b2e7d227e43fba9f47
+ PromisesSwift: 9d77319bbe72ebf6d872900551f7eeba9bce2851
+ ReachabilitySwift: 7f151ff156cea1481a8411701195ac6a984f4979
share_plus: 056a1e8ac890df3e33cb503afffaf1e9b4fbae68
shared_preferences_foundation: 986fc17f3d3251412d18b0265f9c64113a8c2472
sqflite: 31f7eba61e3074736dff8807a9b41581e4f7f15a
syncfusion_flutter_pdfviewer: bb9998884b864cfedf72628df3503bdf57e397c0
- Toast: 91b396c56ee72a5790816f40d3a94dd357abc196
+ Toast: 1f5ea13423a1e6674c4abdac5be53587ae481c4e
TOCropViewController: edfd4f25713d56905ad1e0b9f5be3fbe0f59c863
uni_links: d97da20c7701486ba192624d99bffaaffcfc298a
url_launcher_ios: 08a3dfac5fb39e8759aeb0abbd5d9480f30fc8b4
diff --git a/gsf/ios/Runner.xcodeproj/project.pbxproj b/gsf/ios/Runner.xcodeproj/project.pbxproj
index 18e4556..0555418 100644
--- a/gsf/ios/Runner.xcodeproj/project.pbxproj
+++ b/gsf/ios/Runner.xcodeproj/project.pbxproj
@@ -637,6 +637,8 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
+ CODE_SIGN_IDENTITY = "Apple Development";
+ CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = 78P6PBS6GZ;
ENABLE_BITCODE = NO;
@@ -651,6 +653,7 @@
MARKETING_VERSION = 1.3.27;
PRODUCT_BUNDLE_IDENTIFIER = com.getsetfit;
PRODUCT_NAME = "$(TARGET_NAME)";
+ PROVISIONING_PROFILE_SPECIFIER = "";
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
SUPPORTS_MACCATALYST = NO;
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
@@ -780,6 +783,8 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
+ CODE_SIGN_IDENTITY = "Apple Development";
+ CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = 78P6PBS6GZ;
ENABLE_BITCODE = NO;
@@ -795,6 +800,7 @@
MARKETING_VERSION = 1.3.27;
PRODUCT_BUNDLE_IDENTIFIER = com.getsetfit;
PRODUCT_NAME = "$(TARGET_NAME)";
+ PROVISIONING_PROFILE_SPECIFIER = "";
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
SUPPORTS_MACCATALYST = NO;
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
@@ -815,6 +821,8 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
+ CODE_SIGN_IDENTITY = "Apple Development";
+ CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = 78P6PBS6GZ;
ENABLE_BITCODE = NO;
@@ -829,6 +837,7 @@
MARKETING_VERSION = 1.3.27;
PRODUCT_BUNDLE_IDENTIFIER = com.getsetfit;
PRODUCT_NAME = "$(TARGET_NAME)";
+ PROVISIONING_PROFILE_SPECIFIER = "";
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
SUPPORTS_MACCATALYST = NO;
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
diff --git a/gsf/ios/Runner/Info.plist b/gsf/ios/Runner/Info.plist
index ff121eb..cde08da 100644
--- a/gsf/ios/Runner/Info.plist
+++ b/gsf/ios/Runner/Info.plist
@@ -23,7 +23,7 @@
CFBundlePackageType
APPL
CFBundleShortVersionString
- 1.5.4
+ 1.5.11
CFBundleSignature
????
CFBundleURLTypes
@@ -81,6 +81,7 @@
UIBackgroundModes
+ audio
processing
UILaunchStoryboardName
diff --git a/gsf/lib/main.dart b/gsf/lib/main.dart
index b9f7497..9f88333 100644
--- a/gsf/lib/main.dart
+++ b/gsf/lib/main.dart
@@ -1,4 +1,5 @@
import 'dart:async';
+import 'dart:developer';
import 'dart:io';
// import 'package:firebase_dynamic_links/firebase_dynamic_links.dart';
@@ -128,9 +129,14 @@ class _MyAppState extends State {
}
storeSteps() {
- Timer.periodic(const Duration(minutes: 1), (timer) {
+ Timer.periodic(const Duration(seconds: 30), (timer) {
Map updata = {"step_count": _appStepCount};
StepCounts().storeSteps(updata);
+
+ // log("without condition updatxa ${updata["step_count"]}");
+ // if (updata["step_count"] != 0) {
+ // log("updata ${updata["step_count"]}");
+ // }
});
}
@@ -152,28 +158,106 @@ class _MyAppState extends State {
}
int finalSteps = 0;
- void onStepCount(StepCount event) async {
- if (_appStepCount == null) {
- // Set the initial step count when the stream first emits a value
- _storedStepCount = event.steps;
- await storeFirstEmittedValueOfDay(_storedStepCount);
- int stepsSinceLastStoredCount = event.steps - _storedStepCount;
- stepController.appStepCountGlobal.value = stepsSinceLastStoredCount;
- updateAndPersistStepCount(stepsSinceLastStoredCount);
- _appStepCount = stepsSinceLastStoredCount;
- } else {
- _storedStepCount = await getFirstEmittedValueOfDay();
- finalSteps = event.steps - _storedStepCount;
- _appStepCount = finalSteps;
- stepController.appStepCountGlobal.value = finalSteps;
- }
+ // old step count
+ // void onStepCount(StepCount event) async {
+ // if (_appStepCount == null) {
+ // // Set the initial step count when the stream first emits a value
+ // _storedStepCount = event.steps;
+ // await storeFirstEmittedValueOfDay(_storedStepCount);
+ // int stepsSinceLastStoredCount = event.steps - _storedStepCount;
+ // stepController.appStepCountGlobal.value = stepsSinceLastStoredCount;
+ // updateAndPersistStepCount(stepsSinceLastStoredCount);
+ // _appStepCount = stepsSinceLastStoredCount;
+ // } else {
+ // _storedStepCount = await getFirstEmittedValueOfDay();
+ // finalSteps = event.steps - _storedStepCount;
+ // _appStepCount = finalSteps;
+ // stepController.appStepCountGlobal.value = finalSteps;
+ // }
- // // Check if the step count is a multiple of 1000
- // if (_appStepCount! % 1000 == 0) {
- // // Call the API to store steps
- // Map updata = {"step_count": _appStepCount};
- // StepCounts().storeSteps(updata);
+ // // // Check if the step count is a multiple of 1000
+ // // if (_appStepCount! % 1000 == 0) {
+ // // // Call the API to store steps
+ // // Map updata = {"step_count": _appStepCount};
+ // // StepCounts().storeSteps(updata);
+ // // }
+ // }
+ void onStepCount(StepCount event) async {
+ // if (_appStepCount == null) {
+ // // Set the initial step count when the stream first emits a value
+ // _storedStepCount = event.steps;
+ // await storeFirstEmittedValueOfDay(_storedStepCount);
+ // int stepsSinceLastStoredCount = event.steps - _storedStepCount;
+ // stepController.appStepCountGlobal.value = stepsSinceLastStoredCount;
+ // updateAndPersistStepCount(stepsSinceLastStoredCount);
+ // _appStepCount = stepsSinceLastStoredCount;
+ // } else {
+
+ // _storedStepCount = await getFirstEmittedValueOfDay();
+ // finalSteps = event.steps - _storedStepCount;
+ // _appStepCount = finalSteps;
+ // stepController.appStepCountGlobal.value = finalSteps;
// }
+
+ //New Logic 25-Mar-2024
+ if (_appStepCount == null) {
+ savePrevStepData(event.steps);
+ stepController.appStepCountGlobal.value = 0;
+ _appStepCount = 0;
+ } else {
+ var totalSteps = event.steps;
+ var _currentSteps = await loadCurrentStepData();
+ var _previousSteps = await loadPreviousSteps();
+ if (totalSteps == 0 || totalSteps < _previousSteps) {
+ _previousSteps = totalSteps;
+ savePrevStepData(_previousSteps);
+ }
+ _currentSteps = _currentSteps + (totalSteps - _previousSteps);
+ _previousSteps = totalSteps;
+ saveCurrentStepData(_currentSteps);
+ savePrevStepData(_previousSteps);
+ stepController.appStepCountGlobal.value = _currentSteps;
+ _appStepCount = _currentSteps;
+ }
+ }
+
+ savePrevStepData(steps) async {
+ final prefs = await SharedPreferences.getInstance();
+ final currentDateKey = _currentDate
+ .toLocal()
+ .toString()
+ .split(' ')[0]; // Use the date as the key
+ prefs.setInt(currentDateKey, steps);
+ }
+
+ loadPreviousSteps() async {
+ final prefs = await SharedPreferences.getInstance();
+ final currentDateKey = _currentDate
+ .toLocal()
+ .toString()
+ .split(' ')[0]; // Use the date as the key
+ return prefs.getInt(currentDateKey);
+ }
+
+ saveCurrentStepData(steps) async {
+ final prefs = await SharedPreferences.getInstance();
+ final currentDateKey = "current" +
+ _currentDate
+ .toLocal()
+ .toString()
+ .split(' ')[0]; // Use the date as the key
+ prefs.setInt(currentDateKey, steps);
+ }
+
+ loadCurrentStepData() async {
+ final prefs = await SharedPreferences.getInstance();
+ final currentDateKey =
+ "current" + _currentDate.toLocal().toString().split(' ')[0];
+
+ var _storedCount = prefs.getInt(currentDateKey);
+ _appStepCount = _storedCount;
+ stepController.appStepCountGlobal.value = _appStepCount ?? 0;
+ return _storedCount ?? 0;
}
storeFirstEmittedValueOfDay(_storedStepCount) async {
diff --git a/gsf/lib/repository/endpoints.dart b/gsf/lib/repository/endpoints.dart
index 94a4bc8..ab03d00 100644
--- a/gsf/lib/repository/endpoints.dart
+++ b/gsf/lib/repository/endpoints.dart
@@ -3,6 +3,7 @@ class Endpoints {
static const _staging = "https://gsf.betadelivery.com/api/";
static const _base = "https://thegsf.co/api/";
+ // static const _base = "https://gsf.betadelivery.com/api/";
static const login = _base + "login";
static const generateOtp = _base + "otp/generate";
diff --git a/gsf/lib/repository/services/cj/leader_board_ranking.dart b/gsf/lib/repository/services/cj/leader_board_ranking.dart
index 328fd97..6e51919 100644
--- a/gsf/lib/repository/services/cj/leader_board_ranking.dart
+++ b/gsf/lib/repository/services/cj/leader_board_ranking.dart
@@ -73,7 +73,7 @@ class RankingLeaderboard extends GetConnect {
}
}
- Future getLeaderBoardDataWithoutFilter() async {
+ Future getLeaderBoardDataWithoutFilter() async {
var response = await post(Endpoints.getLeaderboraderRanking, {}, headers: {
"access-token": GetStorage().read("token"),
});
diff --git a/gsf/lib/view_model/Stepcounts.dart b/gsf/lib/view_model/Stepcounts.dart
index d5f9093..1e0ae4f 100644
--- a/gsf/lib/view_model/Stepcounts.dart
+++ b/gsf/lib/view_model/Stepcounts.dart
@@ -5,8 +5,7 @@ import '../api/base_manager.dart';
class StepCounts {
Future> storeSteps(updata) async {
- final response =
- await NetworkApi().postApi(url: Endpoints.storeSteps, data: updata);
+ final response = await NetworkApi().postApi(url: Endpoints.storeSteps, data: updata);
print("response from step count $response");
return response;
}
diff --git a/gsf/lib/views/pages/MenstrualCycleTracker/Helper/HelperMethods.dart b/gsf/lib/views/pages/MenstrualCycleTracker/Helper/HelperMethods.dart
index a5e067f..4372bb4 100644
--- a/gsf/lib/views/pages/MenstrualCycleTracker/Helper/HelperMethods.dart
+++ b/gsf/lib/views/pages/MenstrualCycleTracker/Helper/HelperMethods.dart
@@ -14,7 +14,7 @@ class HelperMethods extends GetxController {
RxString observableDateTimeOnTrackerHomePage =
DateFormat('dd MMMM').format(DateTime.now()).obs;
Rx updateDateForHomepage = DateTime.now().obs;
-
+ RxBool overviewButtonColorTransparent = false.obs;
changeObservableDateTimeOnTrackerHomePage(bool front) {
DateTime currentDate =
DateFormat('dd MMMM').parse(observableDateTimeOnTrackerHomePage.value);
diff --git a/gsf/lib/views/pages/MenstrualCycleTracker/TrackerHomePage.dart b/gsf/lib/views/pages/MenstrualCycleTracker/TrackerHomePage.dart
index 87852a9..7b747ca 100644
--- a/gsf/lib/views/pages/MenstrualCycleTracker/TrackerHomePage.dart
+++ b/gsf/lib/views/pages/MenstrualCycleTracker/TrackerHomePage.dart
@@ -382,6 +382,13 @@ class _TrackerHomePageState extends State {
() {
if (helperController.ovulatingDate.contains(
helperController.updateDateForHomepage.value)) {
+ Future.delayed(const Duration(milliseconds: 500),
+ () {
+ helperController.overviewButtonColorTransparent
+ .value = true;
+ });
+ helperController
+ .overviewButtonColorTransparent.value = true;
return Image.asset(
'assets/image/MCT_purple_new.png',
width: 156,
@@ -389,18 +396,32 @@ class _TrackerHomePageState extends State {
);
} else if (helperController.allDatesList.contains(
helperController.updateDateForHomepage.value)) {
+ Future.delayed(const Duration(milliseconds: 500),
+ () {
+ helperController.overviewButtonColorTransparent
+ .value = true;
+ });
return Image.asset(
'assets/image/MCT_red_new.png',
width: 156,
height: 156,
);
} else if (helperController.disabledNext.value) {
+ Future.delayed(const Duration(milliseconds: 500),
+ () {
+ helperController.overviewButtonColorTransparent
+ .value = false;
+ });
return Image.asset(
'assets/image/MCT_disabled_center_new.png',
width: 156,
height: 156,
);
} else {
+ // Future.delayed(const Duration(seconds: 1), () {
+ // helperController.overviewButtonColorTransparent
+ // .value = false; // Prints after 1 second.
+ // });
return Image.asset(
'assets/image/Icon5MCT_new.png',
width: 156,
@@ -447,21 +468,56 @@ class _TrackerHomePageState extends State {
],
),
),
- Positioned(
- bottom: 45,
- right: 47,
- child: InkWell(
- onTap: () {
- Get.to(() => const OverviewPage());
- },
- child: const Text(
- "Overview",
- style: TextStyle(
- color: Color.fromRGBO(0, 0, 0, 1),
- fontSize: 14,
- ),
- ),
- ),
+ Obx(
+ () => helperController
+ .overviewButtonColorTransparent.value
+ ? Positioned(
+ bottom: 45,
+ right: 47,
+ child: InkWell(
+ onTap: () {
+ Get.to(() => const OverviewPage());
+ },
+ child: const Text(
+ "Overview",
+ style: TextStyle(
+ color: Color.fromRGBO(0, 0, 0, 1),
+ fontSize: 14,
+ ),
+ ),
+ ),
+ )
+ : Positioned(
+ bottom: 40,
+ right: 41,
+ child: Container(
+ decoration: BoxDecoration(
+ color: const Color(0xFFBBF046),
+ borderRadius: BorderRadius.circular(
+ 20.0), // Adjust the radius as needed
+ border: Border.all(
+ color: const Color(
+ 0xFFBBF046), // Border color
+ ),
+ ),
+ child: InkWell(
+ onTap: () {
+ Get.to(() => const OverviewPage());
+ },
+ child: const Padding(
+ padding: EdgeInsets.all(
+ 4), // Adjust padding as needed
+ child: Text(
+ "Overview",
+ style: TextStyle(
+ color: Color.fromRGBO(0, 0, 0, 1),
+ fontSize: 14,
+ ),
+ ),
+ ),
+ ),
+ ),
+ ),
)
],
),
@@ -497,7 +553,7 @@ class _TrackerHomePageState extends State {
Obx(() => !helperController.endOfCycle.value
? const Text("Start of new Cycle")
: helperController.disabledNext.value
- ? const Text("Not tracking")
+ ? const Text("Enter Latest Dates")
: const Text("")),
const SizedBox(
height: 80,
diff --git a/gsf/lib/views/pages/StepCount/HealthApp.dart b/gsf/lib/views/pages/StepCount/HealthApp.dart
index 2afe9c6..6c04604 100644
--- a/gsf/lib/views/pages/StepCount/HealthApp.dart
+++ b/gsf/lib/views/pages/StepCount/HealthApp.dart
@@ -99,7 +99,7 @@ class calculateStepsFromHealthApp extends GetxController {
Future storeStepsInDB() async {
Map updata = {"step_count": finalSteps.value};
- StepCounts().storeSteps(updata);
+ await StepCounts().storeSteps(updata);
}
Future fetchStepDataForAndroid() async {
diff --git a/gsf/lib/views/pages/home/home.dart b/gsf/lib/views/pages/home/home.dart
index cd40b22..750cd22 100644
--- a/gsf/lib/views/pages/home/home.dart
+++ b/gsf/lib/views/pages/home/home.dart
@@ -537,7 +537,7 @@ class _HomeState extends State with SingleTickerProviderStateMixin {
future: bannerMoodOMeterFutureGroup
.future, //MoodOMeterService().getMoodOMeter(),
builder: (context, snapshot) {
- if (snapshot.connectionState == ConnectionState.waiting) {
+ if (snapshot.connectionState == ConnectionState.waiting) {
return Center(child: HomePageSkeleton());
} else if (snapshot.hasError) {
return Text('Error: ${snapshot.error}');
diff --git a/gsf/lib/views/pages/home/home_page.dart b/gsf/lib/views/pages/home/home_page.dart
index 6efb7e3..ceb6343 100644
--- a/gsf/lib/views/pages/home/home_page.dart
+++ b/gsf/lib/views/pages/home/home_page.dart
@@ -55,7 +55,6 @@ class _HomePageState extends State {
listenDynamicLinks();
callingBannerApiForHomeScreen();
analytics.setAnalyticsCollectionEnabled(true);
-
super.initState();
}
diff --git a/gsf/lib/views/pages/my_ranking/mvp_elites_leaderboard.dart b/gsf/lib/views/pages/my_ranking/mvp_elites_leaderboard.dart
index 6760eb4..bbc14fd 100644
--- a/gsf/lib/views/pages/my_ranking/mvp_elites_leaderboard.dart
+++ b/gsf/lib/views/pages/my_ranking/mvp_elites_leaderboard.dart
@@ -52,7 +52,9 @@ class _MVPelitesBoardState extends State
void _startTimer() {
_timer = Timer.periodic(Duration(seconds: 25), (Timer timer) async {
if (Platform.isIOS) {
- await stepscontroller.storeStepsInDB();
+ await stepscontroller
+ .fetchStepData()
+ .then((value) => stepscontroller.storeStepsInDB());
}
setState(() {});
@@ -64,7 +66,9 @@ class _MVPelitesBoardState extends State
super.initState();
_startTimer();
if (Platform.isIOS) {
- stepscontroller.storeStepsInDB();
+ stepscontroller
+ .fetchStepData()
+ .then((value) => stepscontroller.storeStepsInDB());
}
_animationController = AnimationController(
value: 0.0,
diff --git a/gsf/lib/views/pages/profile/pages/user_dashboard.dart b/gsf/lib/views/pages/profile/pages/user_dashboard.dart
index 61f128e..d47fe94 100644
--- a/gsf/lib/views/pages/profile/pages/user_dashboard.dart
+++ b/gsf/lib/views/pages/profile/pages/user_dashboard.dart
@@ -125,9 +125,9 @@ class _UserDashboardState extends State {
],
];
- // if (Platform.isIOS) {
- // _startTimer();
- // }
+ if (Platform.isIOS) {
+ _executeStoringOfSteps();
+ }
// if (Platform.isAndroid) {
// permissionDialog();
@@ -152,6 +152,11 @@ class _UserDashboardState extends State {
// stepscontroller.fetchStepData();
// });
// }
+ _executeStoringOfSteps() async {
+ await stepscontroller
+ .fetchStepData()
+ .then((value) => stepscontroller.storeStepsInDB());
+ }
@override
void dispose() {
@@ -453,7 +458,7 @@ class _UserDashboardState extends State {
),
),
const SizedBox(height: 8),
- Padding(
+ Padding(
padding: EdgeInsets.symmetric(horizontal: 22),
child: MoodOMeter(),
),
diff --git a/gsf/lib/views/pages/profile/profile_slider.dart b/gsf/lib/views/pages/profile/profile_slider.dart
index 7343bf1..cda45c5 100644
--- a/gsf/lib/views/pages/profile/profile_slider.dart
+++ b/gsf/lib/views/pages/profile/profile_slider.dart
@@ -28,8 +28,7 @@ class _ProfileSliderState extends State {
}
int _current = 0;
- final ProfileSliderController slidercontrollers =
- Get.put(ProfileSliderController());
+ final ProfileSliderController slidercontrollers = Get.put(ProfileSliderController());
@override
Widget build(BuildContext context) {
diff --git a/gsf/lib/views/pages/settings/setting_main.dart b/gsf/lib/views/pages/settings/setting_main.dart
index bdc0993..c6aa680 100644
--- a/gsf/lib/views/pages/settings/setting_main.dart
+++ b/gsf/lib/views/pages/settings/setting_main.dart
@@ -83,7 +83,7 @@ class _SettingsState extends State {
const Spacer(),
if (Platform.isIOS)
Text(
- packageInfo?.version ?? "1.5.3",
+ packageInfo?.version ?? "1.5.10",
style: TextStyle(
fontSize: 19,
color: (brightness == Brightness.light)
@@ -93,7 +93,7 @@ class _SettingsState extends State {
),
if (Platform.isAndroid)
Text(
- packageInfo?.buildNumber ?? "18",
+ packageInfo?.buildNumber ?? "21",
style: TextStyle(
fontSize: 19,
color: (brightness == Brightness.light)