prepareSplashImage static method

String? prepareSplashImage(
  1. String? sourcePath,
  2. String outputPath, {
  3. required RebrandConfig config,
})

Implementation

static String? prepareSplashImage(
  String? sourcePath,
  String outputPath, {
  required RebrandConfig config,
}) {
  if (sourcePath == null) {
    return null;
  }

  if (!config.splashAutoPad) {
    return sourcePath;
  }

  final processedImage = processImage(
    sourcePath,
    scaling: config.splashScreenScale,
  );
  File(outputPath).writeAsBytesSync(img.encodePng(processedImage));
  return outputPath;
}