You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
How I have mentioned in discord, I forked this project now, i have updated the method 'getFileView' and make fews changes to obtain a url in same method.
So then, storage.getFileView(), storage.getFilePreview() and storage.getFileDownload() can obtain a URL and show a Image with widget Image.network().
And bonus, a method to get a URL passing bucketId and fileId outside methods above.
Example:
FutureBuilder(
future: Services.instance.storage.getFileView(
bucketId: '62d5a2b48e1af6936615',
fileId: '62d5a2cdf08aa4f45e6e',
getURL: true, //Set getURL to [true] to obtain a URL Link,
//if set to [false] or remove it obtain a [Uint8List].
),
builder: (context, snapshot) {
if (!snapshot.hasData) {
return const Center(
child: CircularProgressIndicator(),
);
}
return Column(
children: [
const Text(
'Obtain a url with getURL',
style: TextStyle(fontWeight: FontWeight.bold),
),
const SizedBox(height: 10),
Text(
'${snapshot.data}',
),
const SizedBox(height: 10),
const Text(
'Obtain a url with getURL and show'
' a image using Image.network()',
style: TextStyle(fontWeight: FontWeight.bold),
),
const SizedBox(height: 10),
Image.network('${snapshot.data}'),
],
);
},
),
Activity
silvinhodev commentedon Jul 21, 2022
Don't is necessary only a method to get URL?
silvinhodev commentedon Jul 21, 2022
How I have mentioned in discord, I forked this project now, i have updated the method 'getFileView' and make fews changes to obtain a url in same method.
So then,
storage.getFileView(),storage.getFilePreview()andstorage.getFileDownload()can obtain a URL and show a Image with widgetImage.network().And bonus, a method to get a URL passing
bucketIdandfileIdoutside methods above.Example: