setValuesDirFileStringValue method

void setValuesDirFileStringValue({
  1. required String attributeName,
  2. required String targetKey,
  3. required String targetValue,
})

Implementation

void setValuesDirFileStringValue({
  required String attributeName,
  required String targetKey,
  required String targetValue,
}) {
  final allFiles = FileUtil.listFilesByExtensions(valuesDir.path, ['xml']);
  for (final filePath in allFiles) {
    final tmpFile = File(filePath);
    if (!tmpFile.existsSync()) continue;

    final valueDoc = XmlDocument.parse(tmpFile.readAsStringSync());
    setDocStringValue(
      doc: valueDoc,
      name: 'name',
      attributeName: attributeName,
      targetKey: targetKey,
      targetValue: targetValue,
    );
  }
}