getAppInfo static method

Future<AppInfo?> getAppInfo(
  1. String packageName
)

Returns AppInfo metadata (label, system flag, version, install times) for packageName, or null if the package cannot be resolved.

Implementation

static Future<AppInfo?> getAppInfo(String packageName) async {
  final response = await _channel.invokeMethod('getAppInfo', {
    'packageName': packageName,
  });
  if (response == null) return null;
  return AppInfo.fromMap(response as Map);
}