revanced-manager/lib/utils/about_info.dart

18 lines
574 B
Dart
Raw Normal View History

2022-09-16 17:39:57 +02:00
import 'package:flutter/foundation.dart';
import 'package:package_info_plus/package_info_plus.dart';
import 'package:device_info_plus/device_info_plus.dart';
class AboutInfo {
static Future<Map<String, dynamic>> getInfo() async {
final packageInfo = await PackageInfo.fromPlatform();
final info = await DeviceInfoPlugin().androidInfo;
return {
'version': packageInfo.version,
2022-09-16 17:39:57 +02:00
'flavor': kReleaseMode ? 'release' : 'debug',
'model': info.model,
'androidVersion': info.version.release,
'arch': info.supportedAbis.first
};
}
}