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:
@@ -1,5 +1,5 @@
|
|||||||
sdk.dir=C:\\Users\\Housh11\\AppData\\Local\\Android\\sdk
|
sdk.dir=C:\\Users\\Housh11\\AppData\\Local\\Android\\sdk
|
||||||
flutter.sdk=C:\\src\\flutter
|
flutter.sdk=C:\\src\\flutter
|
||||||
flutter.buildMode=release
|
flutter.buildMode=debug
|
||||||
flutter.versionName=1.3.42
|
flutter.versionName=1.3.42
|
||||||
flutter.versionCode=38
|
flutter.versionCode=38
|
||||||
@@ -14,6 +14,7 @@ class SplashLogic extends GetxController with GetTickerProviderStateMixin {
|
|||||||
RxBool hasUpdated = false.obs;
|
RxBool hasUpdated = false.obs;
|
||||||
RxBool onUpdateDownload = false.obs;
|
RxBool onUpdateDownload = false.obs;
|
||||||
RxDouble percent = 0.0.obs;
|
RxDouble percent = 0.0.obs;
|
||||||
|
RxString strVersion = ''.obs;
|
||||||
final RxnString _updateFilePath = RxnString();
|
final RxnString _updateFilePath = RxnString();
|
||||||
final platform = MethodChannel('apk_installer');
|
final platform = MethodChannel('apk_installer');
|
||||||
final Dio _dio = Dio();
|
final Dio _dio = Dio();
|
||||||
@@ -170,8 +171,6 @@ class SplashLogic extends GetxController with GetTickerProviderStateMixin {
|
|||||||
if (target != null) {
|
if (target != null) {
|
||||||
var mFuns = getFunctionsList(target.functions);
|
var mFuns = getFunctionsList(target.functions);
|
||||||
await Future.wait(mFuns ?? []);
|
await Future.wait(mFuns ?? []);
|
||||||
|
|
||||||
iLog("target.route ===>${target.route!}");
|
|
||||||
Get.offAndToNamed(target.route!);
|
Get.offAndToNamed(target.route!);
|
||||||
}
|
}
|
||||||
} catch (e, st) {
|
} catch (e, st) {
|
||||||
@@ -190,7 +189,9 @@ class SplashLogic extends GetxController with GetTickerProviderStateMixin {
|
|||||||
Future<bool> checkVersion() async {
|
Future<bool> checkVersion() async {
|
||||||
try {
|
try {
|
||||||
final info = await PackageInfo.fromPlatform();
|
final info = await PackageInfo.fromPlatform();
|
||||||
int version = info.version.versionNumber;
|
strVersion.value = info.version;
|
||||||
|
int version = strVersion.value.versionNumber;
|
||||||
|
|
||||||
var res = await _dio.get(
|
var res = await _dio.get(
|
||||||
"https://rsibackend.rasadyar.com/app/rasadyar-app-info/",
|
"https://rsibackend.rasadyar.com/app/rasadyar-app-info/",
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -10,35 +10,51 @@ class SplashPage extends GetView<SplashLogic> {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
backgroundColor: AppColor.blueDarker,
|
backgroundColor: AppColor.blueDarker,
|
||||||
body: Center(
|
body: Column(
|
||||||
child: Stack(
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
alignment: Alignment.center,
|
children: [
|
||||||
children: [
|
Spacer(),
|
||||||
ObxValue((data) {
|
Center(
|
||||||
return ScaleTransition(
|
child: Stack(
|
||||||
scale: data.value!,
|
alignment: Alignment.center,
|
||||||
child: Padding(
|
children: [
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 1),
|
ObxValue((data) {
|
||||||
child: Assets.images.innerSplash.image(
|
return ScaleTransition(
|
||||||
width: 190,
|
scale: data.value!,
|
||||||
height: 190,
|
child: Padding(
|
||||||
),
|
padding: const EdgeInsets.symmetric(horizontal: 1),
|
||||||
),
|
child: Assets.images.innerSplash.image(
|
||||||
);
|
width: 190,
|
||||||
}, controller.scaleAnimation),
|
height: 190,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}, controller.scaleAnimation),
|
||||||
|
|
||||||
ObxValue((data) {
|
ObxValue((data) {
|
||||||
return RotationTransition(
|
return RotationTransition(
|
||||||
turns: data.value!,
|
turns: data.value!,
|
||||||
|
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 1),
|
padding: const EdgeInsets.symmetric(horizontal: 1),
|
||||||
child: Assets.images.outterSplash.image(),
|
child: Assets.images.outterSplash.image(),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}, controller.rotationAnimation),
|
}, controller.rotationAnimation),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
),
|
||||||
|
Spacer(),
|
||||||
|
ObxValue((data) {
|
||||||
|
return Text(
|
||||||
|
data.value,
|
||||||
|
style: AppFonts.yekan16.copyWith(
|
||||||
|
color: Colors.white.withAlpha(120),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}, controller.strVersion),
|
||||||
|
SizedBox(height: 30.h),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user