createNewColorsFile function

Future<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

Future<void> createNewColorsFile(String backgroundColor, String? flavor) async {
  final colorsFile = await File(constants.androidColorsFile(flavor))
      .create(recursive: true);
  await colorsFile.writeAsString(xml_template.colorsXml);
  await updateColorsFile(colorsFile, backgroundColor);
}