2023-01-30 13:35:06 +01:00
|
|
|
import 'package:device_info_plus/device_info_plus.dart';
|
2022-09-16 17:39:57 +02:00
|
|
|
import 'package:flutter/foundation.dart';
|
2022-08-19 15:04:40 +02:00
|
|
|
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;
|
|
|
|
return {
|
|
|
|
'version': packageInfo.version,
|
2022-09-16 17:39:57 +02:00
|
|
|
'flavor': kReleaseMode ? 'release' : 'debug',
|
2022-08-19 15:04:40 +02:00
|
|
|
'model': info.model,
|
|
|
|
'androidVersion': info.version.release,
|
2023-04-20 19:50:30 +02:00
|
|
|
'arch': info.supportedAbis
|
2022-08-19 15:04:40 +02:00
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|