setIcon method

Future<void> setIcon(
  1. String iconPath
)

Sets window/taskbar icon.

@platforms windows

Implementation

Future<void> setIcon(String iconPath) async {
  final Map<String, dynamic> arguments = {
    'iconPath': path.joinAll([
      path.dirname(Platform.resolvedExecutable),
      'data/flutter_assets',
      iconPath,
    ]),
  };

  await _channel.invokeMethod('setIcon', arguments);
}