startExplorer method Null safety

void startExplorer(
  1. String distribution,
  2. {String path = ''}
)

Start Explorer @param distribution: String

Implementation

void startExplorer(String distribution, {String path = ''}) async {
  String fullPath = '\\\\wsl.localhost\\$distribution';
  if (path != '') {
    path = path.replaceAll('/', '\\');
    fullPath += path;
  }
  Process.start('start', ['explorer.exe', fullPath],
      mode: ProcessStartMode.normal, runInShell: true);
}