ToneSnap_FSX_Flutter/lib/modules/sidea/about/about_controller.dart
fengshengxiong 7611e78244 1.变声加入广告和Firebase
2.音乐播放器首页完成数据加载展示
2024-06-26 15:32:21 +08:00

19 lines
423 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';
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}';
}
}