fix: Add build mode to about widget

This commit is contained in:
Alberto Ponces 2022-09-16 16:39:57 +01:00
parent ef0c59f693
commit a3dca8c142
2 changed files with 9 additions and 0 deletions

View File

@ -61,6 +61,13 @@ class _AboutWidgetState extends State<AboutWidget> {
fontWeight: FontWeight.w300,
),
),
Text(
'Build: ${snapshot.data!['flavor']}',
style: const TextStyle(
fontSize: 13,
fontWeight: FontWeight.w300,
),
),
Text(
'Model: ${snapshot.data!['model']}',
style: const TextStyle(

View File

@ -1,3 +1,4 @@
import 'package:flutter/foundation.dart';
import 'package:package_info_plus/package_info_plus.dart';
import 'package:device_info_plus/device_info_plus.dart';
@ -7,6 +8,7 @@ class AboutInfo {
final info = await DeviceInfoPlugin().androidInfo;
return {
'version': packageInfo.version,
'flavor': kReleaseMode ? 'release' : 'debug',
'model': info.model,
'androidVersion': info.version.release,
'arch': info.supportedAbis.first