modifyDefaultContentsFile function

void modifyDefaultContentsFile(
  1. String newIconName,
  2. String? darkIconName,
  3. String? tintedIconName
)

Modify default Contents.json file

Implementation

void modifyDefaultContentsFile(
  String newIconName,
  String? darkIconName,
  String? tintedIconName,
) {
  const String newIconFolder =
      iosAssetFolder + 'AppIcon.appiconset/Contents.json';
  File(newIconFolder).create(recursive: true).then((File contentsJsonFile) {
    final String contentsFileContent =
        generateContentsFileAsString(newIconName, darkIconName, tintedIconName);
    contentsJsonFile.writeAsString(contentsFileContent);
  });
}