import 'package:get/get.dart';
import 'package:package_info_plus/package_info_plus.dart';
import 'package:wallpaperx/res/values/strings.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}';
  }
}
