Closed codemonza closed 2 years ago
Fail to compile code from the Usage section demo. The trayManager.setContextMenu() function is expecting 'Menu' type as parameter. The demo is passing in List.
List items = [ MenuItem( key: 'show_window', label: 'Show Window', ), MenuItem.separator(), MenuItem( key: 'quit_app', label: 'Quit', ), ]; await trayManager.setContextMenu(items);
Errors: List items Type: List
The argument type 'List' can't be assigned to the parameter type 'Menu'.dartargument_type_not_assignable
Changing to the following will fix the issue. I could create a PR if this is ok.
List items = [ MenuItem( key: 'show_window', label: 'Show Window', ), MenuItem.separator(), MenuItem( key: 'quit_app', label: 'Quit', ), ];
Menu menu = Menu(items: items); await trayManager.setContextMenu(menu);
Fail to compile code from the Usage section demo. The trayManager.setContextMenu() function is expecting 'Menu' type as parameter. The demo is passing in List
List
Errors: List
The argument type 'List' can't be assigned to the parameter type 'Menu'.dartargument_type_not_assignable