prepareSplashImage static method
String?
prepareSplashImage(
- String? sourcePath,
- String outputPath, {
- 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;
}