modifyContentsFile function

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

Create the Contents.json file

Implementation

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