updateManifestNode method

  1. @override
Future<void> updateManifestNode(
  1. String manifestFileType,
  2. ManifestNode node
)
override

Implementation

@override
Future<void> updateManifestNode(
  String manifestFileType,
  ManifestNode node,
) async {
  var manifest = getManifest(manifestFileType);
  var result = manifest.filterBy(node);
  if (result.length == 1) {
    ManifestNode preNode = result[0];
    preNode.update(node);
    if (!manifestFiles.containsKey(manifestFileType)) {
      throw Exception(
        "Manifest file for type $manifestFileType not found",
      );
    }
    manifestFiles[manifestFileType]!.writeAsStringSync(manifest.toXml());
  }
}