i've cloned a git to build an app. In the storage section i've the following code:
class StorageRepo {
FirebaseStorage storage = FirebaseStorage(
storageBucket: ''
);
However it give me the error:
The class 'FirebaseStorage' doesn't have an unnamed constructor.
What's wrong?
CodePudding user response:
According to the documentation Doug linked, creating a FirebaseStorage
object for a specific bucket is done with:
firebase_storage.FirebaseStorage storage =
firebase_storage.FirebaseStorage.instanceFor(
bucket: 'secondary-storage-bucket');