uninstallApp method

Future<void> uninstallApp(
  1. String packageName
)

This method prompts a dialog to the user that asks for his confirmation to uninstall the specified app.

Implementation

Future<void> uninstallApp(String packageName) async {
  assert(packageName.isNotEmpty, "packageName can not be empty");
  try {
    await _channel.invokeMethod(
      "uninstallApp",
      {"packageName": packageName},
    );
  } on PlatformException catch (e) {
    throwError(e, "uninstalling $packageName");
  }
}