openFile method
Opens the file.
Implementation
Future<void> openFile(io.File file) async {
if (isTopLevelWindowInsideBrowser) {
throw StateError('Failed to mutate the main window inside a browser');
}
final content = await file.readAsString();
return openContent(content);
}