generateAndroidDarkImage function

Future<void> generateAndroidDarkImage(
  1. String image,
  2. String drawable
)

Implementation

Future<void> generateAndroidDarkImage(String image, String drawable) async {
  final imagePath = '$drawable/${AndroidStrings.splashImageDarkPng}';
  final sourceImage = File(image);
  if (await sourceImage.exists()) {
    /// Creating a splash image from the provided asset source
    await sourceImage.copy(imagePath);
  } else {
    throw SplashMasterException(message: '$image does not exists.');
  }
  log("Dark splash image added.");
}