Open prodigeomid opened 3 months ago
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!);
return SvgPicture.file(file);
}
// Handle error and loading states
return const CircularProgressIndicator();
},
);
Hello how i can cache svg using firebase ?