createGoogleDocsViewerUrl static method
Creates a URL for viewing a file using the Google Docs web viewer.
The generated URL can be used to view various document types (PDF, Office files, etc.) in a web browser using Google's document viewer service.
Parameters:
fileUrl: The URL of the file to view
Returns a formatted URL that can be opened in a web browser to view the document.
Implementation
static String createGoogleDocsViewerUrl(String fileUrl) {
return "https://docs.google.com/gview?embedded=true&url=${Uri.encodeComponent(fileUrl)}";
}