createBrandingImageForAndroid12 function

Future<void> createBrandingImageForAndroid12(
  1. String drawableFolder,
  2. File brandingImageSource
)

Create branding image for the Android 12+

Implementation

Future<void> createBrandingImageForAndroid12(
  String drawableFolder,
  File brandingImageSource,
) async {
  final imagePath = '$drawableFolder/${AndroidStrings.android12BrandingImage}';

  final file = File(imagePath);
  if (await file.exists()) {
    await file.delete();
  }

  /// Creating a branding image from the provided asset source
  await brandingImageSource.copy(imagePath);

  log("Branding image added");
}