StorageService class
Properties
enableFilePickerExceptionHandler
↔ bool
enableFilePickerExceptionHandler is a flag to enable the exception
handler. If it is true, it will show an error toast message when the user
denies the permission to access the camera or the gallery. By default,
it is true. If you want to handle the exception by yourself, set it to
false.
getter/setter pair
hashCode
→ int
The hash code for this object.
no setter inherited
runtimeType
→ Type
A representation of the runtime type of the object.
no setter inherited
Methods
chooseUploadSource ({required BuildContext context , bool camera = true , bool gallery = true })
→ Future <ImageSource? >
이미지 업로드 소스(갤러리 또는 카메라) 선택창을 보여주고, 선택된 소스를 반환한다.
delete (String ? url )
→ Future <void >
Delete the uploaded file in Firebase Storage by the url.
getFilePathFromPicker ({required BuildContext context , required ImageSource? source , double maxHeight = 1024 , double maxWidth = 1024 })
→ Future <String ? >
init ({bool ? enableFilePickerExceptionHandler })
→ dynamic
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 BuildContext context , dynamic progress (double )?, dynamic complete ()?, int compressQuality = 80 , String ? saveAs , bool camera = true , bool gallery = true , double maxHeight = 1024 , double maxWidth = 1024 })
→ Future <String ? >
Update photos in the Firebase Storage.
uploadAt ({required BuildContext context , required DocumentReference<Object ? > ref , dynamic progress (double )?, dynamic complete ()?, int compressQuality = 80 , String ? saveAs , bool camera = true , bool gallery = true , double maxHeight = 1024 , double maxWidth = 1024 })
→ Future <String ? >
Upload a file (or an image) and save the url at the document reference in Firestore
uploadFile ({dynamic progress (double )?, Function ? complete , int compressQuality = 0 , String ? path , String ? saveAs , String ? type })
→ Future <String ? >
Upload a file (or an image) to Firebase Storage.
uploadFrom ({required BuildContext context , required ImageSource? source , dynamic progress (double )?, Function ? complete , int compressQuality = 80 , String ? saveAs , String ? type , double maxHeight = 1024 , double maxWidth = 1024 })
→ Future <String ? >
Call this if method of uploading (like, from camera) is already known.
uploadMultiple ({dynamic progress (double )?, Function ? complete , int compressQuality = 80 , String ? type , double maxHeight = 1024 , double maxWidth = 1024 })
→ Future <List <String ? > ? >