diff --git a/packages/flutter_local_notifications/flutter_local_notifications_aurora/pubspec.yaml b/packages/flutter_local_notifications/flutter_local_notifications_aurora/pubspec.yaml index 60136cd..eeed050 100644 --- a/packages/flutter_local_notifications/flutter_local_notifications_aurora/pubspec.yaml +++ b/packages/flutter_local_notifications/flutter_local_notifications_aurora/pubspec.yaml @@ -13,6 +13,10 @@ dependencies: dbus: ^0.7.8 plugin_platform_interface: ^2.0.2 flutter_local_notifications_platform_interface: ^7.0.0 + package_info_plus: 4.0.0 + package_info_plus_aurora: + path: ../../package_info_plus/package_info_plus_aurora + dev_dependencies: flutter_test: diff --git a/packages/package_info_plus/package_info_plus_aurora/example/lib/main.dart b/packages/package_info_plus/package_info_plus_aurora/example/lib/main.dart index 53a4b2b..2dfbe8d 100644 --- a/packages/package_info_plus/package_info_plus_aurora/example/lib/main.dart +++ b/packages/package_info_plus/package_info_plus_aurora/example/lib/main.dart @@ -1,7 +1,6 @@ import 'package:flutter/material.dart'; import 'dart:async'; -import 'package:flutter/services.dart'; import 'package:package_info_plus/package_info_plus.dart'; void main() { @@ -19,8 +18,6 @@ class _MyAppState extends State { String? _error; String? _appName; String? _packageName; - String? _version; - String? _buildNumber; @override void initState() { @@ -34,15 +31,11 @@ class _MyAppState extends State { String appName = packageInfo.appName; String packageName = packageInfo.packageName; - String version = packageInfo.version; - String buildNumber = packageInfo.buildNumber; // Update state variable setState(() { _appName = appName; _packageName = packageName; - _version = version; - _buildNumber = buildNumber; }); } on Exception catch (e) { setState(() { @@ -132,28 +125,6 @@ class _MyAppState extends State { _packageName ?? 'Not found.', style: textStylePath, ), - - spaceMedium, - const Text( - 'Version', - style: textStyleTitle, - ), - spaceSmall, - Text( - _version ?? 'Not found.', - style: textStylePath, - ), - - spaceMedium, - const Text( - 'Build Number', - style: textStyleTitle, - ), - spaceSmall, - Text( - _buildNumber ?? 'Not found.', - style: textStylePath, - ), ], ), ), diff --git a/packages/package_info_plus/package_info_plus_aurora/lib/package_info_plus_aurora.dart b/packages/package_info_plus/package_info_plus_aurora/lib/package_info_plus_aurora.dart index b15db4e..a6d2eab 100644 --- a/packages/package_info_plus/package_info_plus_aurora/lib/package_info_plus_aurora.dart +++ b/packages/package_info_plus/package_info_plus_aurora/lib/package_info_plus_aurora.dart @@ -37,18 +37,16 @@ class PackageInfoPlusAurora extends PackageInfoPlatform { .readAsLines()) .where((element) => element.contains('Name=')); + // @todo // Get application versions - final result = (await Process.run('rpm', - ['-q', '--queryformat', '%{VERSION}\n%{RELEASE}', packageName])) - .stdout - .toString() - .split('\n'); + // rpm -q --queryformat %{VERSION} + // not working even with Compatibility permission return { 'app_name': desktop.isNotEmpty ? desktop.first.substring(5) : null, 'package_name': packageName, - 'version': result[0], - 'build_number': result[1], + 'version': '', + 'build_number': '', }; } catch (e) { debugPrint(e.toString());