feat : privacyPolicyWidget
This commit is contained in:
@@ -151,8 +151,8 @@ class SplashLogic extends GetxController with GetTickerProviderStateMixin {
|
||||
|
||||
Future.delayed(const Duration(milliseconds: 250), () async {
|
||||
try {
|
||||
final isUpdateNeeded = await checkVersion();
|
||||
if (isUpdateNeeded) return;
|
||||
/* final isUpdateNeeded = await checkVersion();
|
||||
if (isUpdateNeeded) return;*/
|
||||
|
||||
final module = tokenService.appModule.value;
|
||||
final target = getTargetPage(module);
|
||||
@@ -178,7 +178,7 @@ class SplashLogic extends GetxController with GetTickerProviderStateMixin {
|
||||
|
||||
appInfoModel = AppInfoModel.fromJson(res.data);
|
||||
|
||||
if ((appInfoModel?.info.version.versionNumber ?? 0) > version) {
|
||||
if ((appInfoModel?.info?.version?.versionNumber ?? 0) > version) {
|
||||
hasUpdated.value = !hasUpdated.value;
|
||||
return true;
|
||||
}
|
||||
@@ -191,7 +191,7 @@ class SplashLogic extends GetxController with GetTickerProviderStateMixin {
|
||||
Future<void> fileDownload() async {
|
||||
onUpdateDownload.value = true;
|
||||
final dir = await getApplicationDocumentsDirectory();
|
||||
final filePath = "${dir.path}/app-release.apk";
|
||||
final filePath = "${dir.path}/rasadyar.apk";
|
||||
final file = File(filePath);
|
||||
if (await file.exists()) {
|
||||
await file.delete();
|
||||
@@ -203,7 +203,7 @@ class SplashLogic extends GetxController with GetTickerProviderStateMixin {
|
||||
while (attempts < retryCount && !success) {
|
||||
try {
|
||||
await _dio.download(
|
||||
appInfoModel?.downloadLink ?? '',
|
||||
appInfoModel?.download_link ?? '',
|
||||
filePath,
|
||||
onReceiveProgress: (count, total) {
|
||||
if (total != -1 && total > 0) {
|
||||
@@ -226,8 +226,6 @@ class SplashLogic extends GetxController with GetTickerProviderStateMixin {
|
||||
if (success) {
|
||||
_updateFilePath.value = filePath;
|
||||
|
||||
tLog(filePath);
|
||||
fLog(_updateFilePath.value);
|
||||
}
|
||||
|
||||
onUpdateDownload.value = false;
|
||||
|
||||
Reference in New Issue
Block a user