FileHandler class
A platform-agnostic service for downloading and opening files.
This class provides a unified interface for downloading files from URLs and opening them using the platform's default application. The actual implementation is provided by platform-specific handlers:
- On mobile/desktop (dart:io): Uses
file_handler_io.dart - On web (dart:html): Uses
file_handler_web.dart
This service is registered as a singleton using the @singleton annotation,
making it available for dependency injection throughout the application.
- Annotations
-
- @singleton
Constructors
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
-
downloadAndOpen(
String url, String filename) → Future< void> - Downloads a file from the given URL and opens it with the default application.
-
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