createIcons method

  1. @override
Future<void> createIcons()
override

Creates icons for this platform.

Implementation

@override
Future<void> createIcons() async {
  final imgFilePath = path.join(
    context.prefixPath,
    context.config.macOSConfig!.imagePath ?? context.config.imagePath,
  );

  context.logger
      .verbose('Decoding and loading image file at $imgFilePath...');
  final imgFile = await utils.decodeImageFile(imgFilePath);
  if (imgFile == null) {
    context.logger.error('Image File not found at give path $imgFilePath...');
    throw FileNotFoundException(imgFilePath);
  }

  context.logger.verbose('Generating icons $imgFilePath...');
  await _generateIcons(imgFile);
  context.logger.verbose('Updating contents.json');
  _updateContentsFile();
}