createIcons method

  1. @override
void createIcons()
override

Creates icons for this platform.

Implementation

@override
void createIcons() {
  final imgFilePath = path.join(
    context.prefixPath,
    context.windowsConfig!.imagePath ?? context.config.imagePath,
  );

  context.logger
      .verbose('Decoding and loading image file from $imgFilePath...');
  final imgFile = utils.decodeImageFile(imgFilePath);
  // TODO(RatakondalaArun): remove null check
  // #utils.decodeImageFile never returns null instead it throws Exception
  if (imgFile == null) {
    context.logger
        .error('Image File not found at given path $imgFilePath...');
    throw FileNotFoundException(imgFilePath);
  }

  context.logger.verbose('Generating icon from $imgFilePath...');
  _generateIcon(imgFile);
}