Skip to content

Commit

Permalink
refactor: kWindowsIconSize to windowsDefaultIconSize
Browse files Browse the repository at this point in the history
  • Loading branch information
RatakondalaArun authored and MarkOSullivan94 committed Jul 26, 2022
1 parent 645dc67 commit 3f30632
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/constants.dart
Expand Up @@ -54,7 +54,7 @@ String windowsIconFilePath = path.join(windowsResourcesDirPath, 'app_icon.ico');

/// Default windows icon size for flutter
///
const int kWindowsIconSize = 48;
const int windowsDefaultIconSize = 48;

const String errorMissingImagePath =
'Missing "image_path" or "image_path_android" + "image_path_ios" within configuration';
Expand Down
3 changes: 2 additions & 1 deletion lib/windows/windows_icon_generator.dart
Expand Up @@ -67,7 +67,8 @@ class WindowsIconGenerator extends IconGenerator {
}

void _generateIcon(Image image) {
final favIcon = utils.createResizedImage(context.windowsConfig!.iconSize ?? constants.kWindowsIconSize, image);
final favIcon =
utils.createResizedImage(context.windowsConfig!.iconSize ?? constants.windowsDefaultIconSize, image);
final favIconFile = utils.createFileIfNotExist(path.join(context.prefixPath, constants.windowsIconFilePath));
favIconFile.writeAsBytesSync(encodeIco(favIcon));
}
Expand Down

0 comments on commit 3f30632

Please sign in to comment.