CoffeeFileStorage class
The CoffeeFileStorage
class is responsible for handling file storage operations
in the Coffee application. It leverages the functionalities provided by the CoffeeService
to interact with the backend server for file-related actions.
This class includes methods for uploading files to a server, with optional additional
processing such as resizing. The communication with the server is managed through the
CoffeeService
, ensuring a consistent approach to network operations and error handling.
Usage of this class typically involves creating an instance by passing a CoffeeService
object, which it uses for all its network operations.
Example:
var coffeeFileStorage = CoffeeFileStorage(coffeeService: coffeeService);
Constructors
- CoffeeFileStorage({required CoffeeService coffeeService})
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
-
upload(
{required String filePath, required String storageName, bool scheduleResize = false}) → Future< CoffeeFile?> - Uploads a file to a specified storage.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited