import 'package:get/get.dart';
import 'package:package_info_plus/package_info_plus.dart';

class AboutController extends GetxController {
  var versionName = ''.obs;

  @override
  void onReady()  {
    super.onReady();
    _getVersion();
  }

  /// 获取版本号
  void _getVersion() async {
    final packageInfo = await PackageInfo.fromPlatform();
    versionName.value = 'App Version：${packageInfo.version}';
  }
}
