SFStorageService class
Service pour gérer les uploads de fichiers vers Firebase Storage.
Constructors
- SFStorageService.new({FirebaseStorage? storage, String basePath = 'uploads'})
- Crée une nouvelle instance du service de stockage.
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
-
deleteFile(
String fileUrl) → Future< void> - Supprime un fichier de Firebase Storage.
-
getSignedUrl(
String fileUrl, {Duration expirationDuration = const Duration(hours: 1)}) → Future< String> - Génère une URL de téléchargement signée avec une durée d'expiration.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
uploadData(
{required Uint8List data, required String fileName, required String contentType, String? folder, String? userId, Map< String, String> ? metadata}) → Future<String> - Télécharge des données binaires vers Firebase Storage et retourne l'URL.
-
uploadXFile(
{required XFile file, String? folder, String? userId, String? customFileName, Map< String, String> ? metadata}) → Future<String> - Télécharge un fichier XFile vers Firebase Storage et retourne son URL.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited