createOfficeViewerUrl static method
Creates a URL for viewing an office file using the Microsoft Office web viewer.
Parameters:
fileUrl
: The URL of the office file to be viewed.
Returns:
- A string representing the viewer URL.
Implementation
static String createOfficeViewerUrl(String fileUrl) {
fileUrl = Uri.encodeComponent(fileUrl);
return "https://view.officeapps.live.com/op/view.aspx?src=$fileUrl";
}