addManifestNodeToRoot method

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

Implementation

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