dispose method
Implementation
Future<void> dispose() async {
if (is_desktop && is_init) {
await webview_desktop_controller.close();
}
for (final file in _temporaryAssetFiles) {
try {
final directory = file.parent;
if (await directory.exists()) {
await directory.delete(recursive: true);
}
} on FileSystemException {
// A native WebView can retain the file briefly while shutting down.
}
}
_temporaryAssetFiles.clear();
is_init = false;
}