createBackgroundImage function
Implementation
Future<void> createBackgroundImage(Image image, File imageFile) async {
const iosAssetsFolder = CmdStrings.iosBackgroundImageDirectory;
final file = await File('$iosAssetsFolder/${IOSStrings.iosContentJson}')
.create(recursive: true);
final iosContent = IosContentJsonDm(
images: [image],
info: const Info(author: 'xcode', version: 1),
);
final iosContentJson = iosContent.toJson();
encoder.convert(iosContentJson);
file.writeAsString(encoder.convert(iosContentJson));
final backgroundImage =
File('$iosAssetsFolder/${IOSStrings.backgroundImageSnakeCase}.png');
await backgroundImage.writeAsBytes(await imageFile.readAsBytes());
}