Wallpaper-Genie/lib/page/about/about_controller.dart
Fson 23e35c5bd8 1.增加埋点
2.调整广告开关配置逻辑
2024-08-15 09:52:49 +08:00

20 lines
513 B
Dart
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import 'package:get/get.dart';
import 'package:package_info_plus/package_info_plus.dart';
import 'package:wallpaperx/global/app_config.dart';
class AboutController extends GetxController {
var versionName = ''.obs;
@override
void onReady() {
super.onReady();
loadAppVersion(appName: appName);
}
/// 获取版本号
void loadAppVersion({String? appName}) async {
final packageInfo = await PackageInfo.fromPlatform();
versionName.value = 'App Version${packageInfo.version}';
}
}