removePermission method

void removePermission({
  1. required String name,
  2. RemoveComment? removeComments,
})

Removes a permission from the manifest by name.

removeComments Optional predicate to remove associated comments.

Implementation

void removePermission({
  required String name,
  RemoveComment? removeComments,
}) {
  remove(
    XmlRemoveElementEdit(
      path: 'manifest',
      tag: 'uses-permission',
      attributes: {'android:name': name},
      commentRemover: removeComments,
    ),
  );
}