chore: change Flutter build mode to debug in local.properties, add strVersion observable in SplashLogic, and update splash view layout to display version information
This commit is contained in:
@@ -14,6 +14,7 @@ class SplashLogic extends GetxController with GetTickerProviderStateMixin {
|
||||
RxBool hasUpdated = false.obs;
|
||||
RxBool onUpdateDownload = false.obs;
|
||||
RxDouble percent = 0.0.obs;
|
||||
RxString strVersion = ''.obs;
|
||||
final RxnString _updateFilePath = RxnString();
|
||||
final platform = MethodChannel('apk_installer');
|
||||
final Dio _dio = Dio();
|
||||
@@ -170,8 +171,6 @@ class SplashLogic extends GetxController with GetTickerProviderStateMixin {
|
||||
if (target != null) {
|
||||
var mFuns = getFunctionsList(target.functions);
|
||||
await Future.wait(mFuns ?? []);
|
||||
|
||||
iLog("target.route ===>${target.route!}");
|
||||
Get.offAndToNamed(target.route!);
|
||||
}
|
||||
} catch (e, st) {
|
||||
@@ -190,7 +189,9 @@ class SplashLogic extends GetxController with GetTickerProviderStateMixin {
|
||||
Future<bool> checkVersion() async {
|
||||
try {
|
||||
final info = await PackageInfo.fromPlatform();
|
||||
int version = info.version.versionNumber;
|
||||
strVersion.value = info.version;
|
||||
int version = strVersion.value.versionNumber;
|
||||
|
||||
var res = await _dio.get(
|
||||
"https://rsibackend.rasadyar.com/app/rasadyar-app-info/",
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user