feat: Distinguish between release, debug, and profile variants

Signed-off-by: validcube <pun.butrach@gmail.com>
This commit is contained in:
validcube 2025-03-06 23:12:35 +07:00
parent 00950c79f0
commit 64cbb68344
No known key found for this signature in database
GPG Key ID: DBA94253E1D3F267

View File

@ -6,9 +6,12 @@ class AboutInfo {
static Future<Map<String, dynamic>> getInfo() async { static Future<Map<String, dynamic>> getInfo() async {
final packageInfo = await PackageInfo.fromPlatform(); final packageInfo = await PackageInfo.fromPlatform();
final info = await DeviceInfoPlugin().androidInfo; final info = await DeviceInfoPlugin().androidInfo;
const buildFlavor =
kReleaseMode ? 'release' : (kProfileMode ? 'profile' : 'debug');
return { return {
'version': packageInfo.version, 'version': packageInfo.version,
'flavor': kReleaseMode ? 'release' : 'debug', 'flavor': buildFlavor,
'model': info.model, 'model': info.model,
'androidVersion': info.version.release, 'androidVersion': info.version.release,
'supportedArch': info.supportedAbis, 'supportedArch': info.supportedAbis,