setWindowsAppUserModelId method
Sets the AppUserModelID for the current process on Windows.
This is used by Windows to identify the application in the system media center. If not set, the application might show up as "Unknown Application".
Provide displayName (and optionally iconPath) to dynamically create a
Start Menu shortcut. This is highly recommended for unpackaged/portable apps.
If your app is packaged via MSIX or uses an installer to create shortcuts,
you should omit displayName to avoid creating duplicate shortcuts.
This method is only effective on Windows.
Implementation
@override
Future<void> setWindowsAppUserModelId(String id,
{String? displayName, String? iconPath}) async {
await methodChannel.invokeMethod('setWindowsAppUserModelId', {
'id': id,
if (displayName != null) 'displayName': displayName,
if (iconPath != null) 'iconPath': iconPath,
});
}