refactor: use ProxyImg widget

This commit is contained in:
2025-05-16 12:22:31 +01:00
parent 244a0aad38
commit dcf42e7a78
8 changed files with 73 additions and 63 deletions

View File

@ -44,10 +44,7 @@ class CategoryPage extends StatelessWidget {
info!.coverImage!,
fit: BoxFit.contain,
)
: CachedNetworkImage(
imageUrl: proxyImg(context, info!.coverImage!),
fit: BoxFit.cover,
),
: ProxyImg(url: info!.coverImage!),
),
Expanded(
child: Column(

View File

@ -36,10 +36,7 @@ class ProfilePage extends StatelessWidget {
SizedBox(
height: 140,
width: double.maxFinite,
child: CachedNetworkImage(
imageUrl: proxyImg(context, profile.banner!),
fit: BoxFit.cover,
),
child: ProxyImg(url: profile.banner!),
),
Row(
spacing: 8,

View File

@ -53,9 +53,7 @@ class _StreamPage extends State<StreamPage> {
autoPlay: true,
placeholder:
(widget.stream.info.image?.isNotEmpty ?? false)
? CachedNetworkImage(
imageUrl: proxyImg(context, widget.stream.info.image!),
)
? ProxyImg(url: widget.stream.info.image!)
: null,
);
});
@ -109,9 +107,7 @@ class _StreamPage extends State<StreamPage> {
color: LAYER_1,
child:
(stream.info.image?.isNotEmpty ?? false)
? CachedNetworkImage(
imageUrl: proxyImg(context, stream.info.image!),
)
? ProxyImg(url: stream.info.image!)
: null,
),
),