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
This package supports caching any kind of file, But it can not render SVG because Flutter does not yet support SVG files. One workaround over this is to use FutureBuilder to get the cached file path and display the SVG image using the flutter_svg package.
Example
FutureBuilder<String>(
future:FirebaseCacheManager()
getSingleFile(FirebaseUrl("gs://bucket_f233/logo.svg")),
builder: (context, snapshot) {
if (snapshot.hasData) {
final file =File(snapshot.data!);
returnSvgPicture.file(file);
}
// Handle error and loading statesreturnconstCircularProgressIndicator();
},
);
Hello how i can cache svg using firebase ?
The text was updated successfully, but these errors were encountered: