setAppId method

  1. @override
Future<void> setAppId(
  1. String id, {
  2. String? displayName,
  3. String? iconPath,
})
override

Sets the application identity (App ID / AUMID / DesktopEntry) for the current process.

On Windows, this sets the AppUserModelID (AUMID) and can create a Start Menu shortcut with displayName and iconPath for unpackaged/portable apps. On Linux, this sets the MPRIS DesktopEntry (to associate with .desktop files) and Identity (with displayName).

Implementation

@override
Future<void> setAppId(String id,
    {String? displayName, String? iconPath}) async {
  await methodChannel.invokeMethod('setAppId', {
    'id': id,
    if (displayName != null) 'displayName': displayName,
    if (iconPath != null) 'iconPath': iconPath,
  });
}