createNewColorsFile function

void createNewColorsFile(
  1. String backgroundColor,
  2. String? flavor
)

Creates a colors.xml file if it was missing from android/app/src/main/res/values/colors.xml

Implementation

void createNewColorsFile(String backgroundColor, String? flavor) {
  File(constants.androidColorsFile(flavor))
      .create(recursive: true)
      .then((File colorsFile) {
    colorsFile.writeAsString(xml_template.colorsXml).then((File file) {
      updateColorsFile(colorsFile, backgroundColor);
    });
  });
}