mirror of
https://github.com/revanced/revanced-manager.git
synced 2025-04-29 13:34:25 +02:00
21 lines
653 B
Dart
21 lines
653 B
Dart
import 'package:device_info_plus/device_info_plus.dart';
|
|
import 'package:flutter/foundation.dart';
|
|
import 'package:package_info_plus/package_info_plus.dart';
|
|
|
|
class AboutInfo {
|
|
static Future<Map<String, dynamic>> getInfo() async {
|
|
final packageInfo = await PackageInfo.fromPlatform();
|
|
final info = await DeviceInfoPlugin().androidInfo;
|
|
const buildFlavor =
|
|
kReleaseMode ? 'release' : (kProfileMode ? 'profile' : 'debug');
|
|
|
|
return {
|
|
'version': packageInfo.version,
|
|
'flavor': buildFlavor,
|
|
'model': info.model,
|
|
'androidVersion': info.version.release,
|
|
'supportedArch': info.supportedAbis,
|
|
};
|
|
}
|
|
}
|