createAdaptiveIconMipmapXmlFile function
Creates the xml file required for the adaptive launcher icon FILE LOCATED HERE: res/mipmap-anydpi/{icon-name-from-yaml-config}.xml
Implementation
void createAdaptiveIconMipmapXmlFile(
Config config,
String? flavor,
) {
if (config.isCustomAndroidFile) {
File(
constants.androidAdaptiveXmlFolder(flavor) + config.android + '.xml',
).create(recursive: true).then((File adaptiveIcon) {
adaptiveIcon.writeAsString(xml_template.icLauncherXml);
});
} else {
File(
constants.androidAdaptiveXmlFolder(flavor) +
constants.androidDefaultIconName +
'.xml',
).create(recursive: true).then((File adaptiveIcon) {
adaptiveIcon.writeAsString(xml_template.icLauncherXml);
});
}
}