clear method

Future<void> clear(
  1. String packageName, {
  2. String? user,
  3. bool debug = false,
})

Clear the data of the package with the given packageName.

If user is provided, the data is cleared for the specified user.

Throws an exception if the package manager command fails.

Example:

await pm.clear('com.example.app');

Implementation

Future<void> clear(String packageName, {String? user, bool debug = false}) async {
  return _operation('clear', packageName: packageName, user: user, debug: debug);
}