mirror of
https://gitlab.com/comunic/comunicmobile
synced 2025-06-21 17:25:16 +00:00
Improve management of cache key
This commit is contained in:
@ -10,8 +10,9 @@ import 'package:url_launcher/url_launcher.dart';
|
||||
|
||||
class FullScreenImageRoute extends StatefulWidget {
|
||||
final String url;
|
||||
final String? cacheKey;
|
||||
|
||||
FullScreenImageRoute(this.url);
|
||||
FullScreenImageRoute({required this.url, this.cacheKey});
|
||||
|
||||
@override
|
||||
_FullScreenImageRouteState createState() => _FullScreenImageRouteState();
|
||||
@ -28,7 +29,12 @@ class _FullScreenImageRouteState extends State<FullScreenImageRoute> {
|
||||
icon: Icon(Icons.launch), onPressed: () => launch(widget.url))
|
||||
],
|
||||
),
|
||||
body: PhotoView(imageProvider: CachedNetworkImageProvider(widget.url)),
|
||||
body: PhotoView(
|
||||
loadingBuilder: (c, i) => Center(child: CircularProgressIndicator()),
|
||||
imageProvider: CachedNetworkImageProvider(
|
||||
widget.url,
|
||||
cacheKey: widget.cacheKey,
|
||||
)),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user