FileService class

A service class for handling file-related operations.

Provides methods for determining file types, launching URLs, creating viewer URLs for office and Google Docs, and retrieving appropriate icons for different file types.

Constructors

FileService()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

createGoogleDocsViewerUrl(String fileUrl) String
Creates a URL for viewing a file using the Google Docs web viewer.
createOfficeViewerUrl(String fileUrl) String
Creates a URL for viewing an office file using the Microsoft Office web viewer.
iconData(String filename) IconData
Retrieves the appropriate icon for the given filename.
isDocFile(String filename) bool
Checks if the given filename corresponds to a document file.
isImageFile(String filename) bool
Checks if the given filename corresponds to an image file.
isOfficeFile(String filename) bool
Checks if the given filename corresponds to an office file.
isPDFFile(String filename) bool
Checks if the given filename corresponds to a PDF file.
isPresentationFile(String filename) bool
Checks if the given filename corresponds to a presentation file.
isSpreadSheetFile(String filename) bool
Checks if the given filename corresponds to a spreadsheet file.
isSupportedFile(String filename) bool
Checks if the given filename corresponds to a supported file type.
launchUrl(String url) Future<void>
Launches the specified URL using the default web browser.