fix: We do not need build number for now

This commit is contained in:
Alberto Ponces 2022-09-14 12:25:35 +01:00
parent a4ace61401
commit 6c30f9a63a
3 changed files with 3 additions and 13 deletions

View File

@ -111,7 +111,7 @@
"logsLabel": "Logs",
"logsHint": "Share device debug logs",
"aboutLabel": "About",
"versionLabel": "Version"
"snackbarMessage": "Copied to clipboard"
},
"appInfoView": {
"widgetTitle": "App Info",

View File

@ -38,7 +38,6 @@ class _AboutWidgetState extends State<AboutWidget> {
Clipboard.setData(
ClipboardData(
text: 'Version: ${snapshot.data!['version']}\n'
'Build: ${snapshot.data!['buildNumber']}\n'
'Model: ${snapshot.data!['model']}\n'
'Android Version: ${snapshot.data!['androidVersion']}\n'
'Arch: ${snapshot.data!['arch']}\n',
@ -46,7 +45,7 @@ class _AboutWidgetState extends State<AboutWidget> {
);
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(
content: const Text('Copied to clipboard'),
content: I18nText('settingsView.snackbarMessage'),
backgroundColor:
Theme.of(context).colorScheme.secondary,
),
@ -62,13 +61,6 @@ class _AboutWidgetState extends State<AboutWidget> {
fontWeight: FontWeight.w300,
),
),
Text(
'Build: ${snapshot.data!['buildNumber']}',
style: const TextStyle(
fontSize: 13,
fontWeight: FontWeight.w300,
),
),
Text(
'Model: ${snapshot.data!['model']}',
style: const TextStyle(

View File

@ -5,13 +5,11 @@ class AboutInfo {
static Future<Map<String, dynamic>> getInfo() async {
final packageInfo = await PackageInfo.fromPlatform();
final info = await DeviceInfoPlugin().androidInfo;
return {
'version': packageInfo.version,
'buildNumber': packageInfo.buildNumber,
'model': info.model,
'androidVersion': info.version.release,
'arch': info.supported64BitAbis
'arch': info.supportedAbis.first
};
}
}