createGoogleDocsViewerUrl static method
Creates a URL for viewing a file using the Google Docs web viewer.
Parameters:
fileUrl
: The URL of the file to be viewed.
Returns:
- A string representing the viewer URL.
Implementation
static String createGoogleDocsViewerUrl(String fileUrl) {
fileUrl = Uri.encodeComponent(fileUrl);
return "https://docs.google.com/gview?embedded=true&url=$fileUrl";
}