m3_lightmeter/lib/utils/platform_utils.dart

11 lines
376 B
Dart
Raw Normal View History

2024-05-23 09:34:11 +00:00
import 'package:package_info_plus/package_info_plus.dart';
class PlatformUtils {
const PlatformUtils();
Future<String> get version async => (await PackageInfo.fromPlatform()).version;
Future<({String version, String buildNumber})> get buildVersion async =>
PackageInfo.fromPlatform().then((value) => (version: value.version, buildNumber: value.buildNumber));
}