createAndroidNotificationIcons function

Future<void> createAndroidNotificationIcons(
  1. Config config
)

Implementation

Future<void> createAndroidNotificationIcons(Config config) async {
  if (!config.validateIconName) {
    throw Exception('Invalid icon name: ${config.iconName}');
  }
  final image = await decodeImageFromFilePath(config.imagePath);
  if (!checkTransparency(image)) {
    stderr.writeln(
        'Image is not transparent: ${config.imagePath} \n You need to check the display of notification icons');
  }
  await Future.wait(
    AndroidNotificationIconType.values.map(
      (type) => createImage(
        androidNotificationIconType: type,
        iconName: config.iconName,
        image: image,
      ),
    ),
  );
}