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", "logsLabel": "Logs",
"logsHint": "Share device debug logs", "logsHint": "Share device debug logs",
"aboutLabel": "About", "aboutLabel": "About",
"versionLabel": "Version" "snackbarMessage": "Copied to clipboard"
}, },
"appInfoView": { "appInfoView": {
"widgetTitle": "App Info", "widgetTitle": "App Info",

View file

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

View file

@ -5,13 +5,11 @@ 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;
return { return {
'version': packageInfo.version, 'version': packageInfo.version,
'buildNumber': packageInfo.buildNumber,
'model': info.model, 'model': info.model,
'androidVersion': info.version.release, 'androidVersion': info.version.release,
'arch': info.supported64BitAbis 'arch': info.supportedAbis.first
}; };
} }
} }