clear method

Future clear({
  1. bool clearExplorer = true,
  2. bool clearNetworkFiles = true,
})

Implementation

Future clear({
  bool clearExplorer = true,
  bool clearNetworkFiles = true,
}) async {
  if (clearExplorer && _explorer != null) await explorer.clear();
  if (clearNetworkFiles &&
      _explorer != null &&
      explorer.networkFilesIsInitialized) {
    await explorer.networkFiles.clear();
  }

  await source.clear();

  for (Function onClearFunc in _onClear) {
    onClearFunc();
  }
}