-
Notifications
You must be signed in to change notification settings - Fork 74
Open
Description
Is there a way to control CacheManager?
Today we have added Blurhash like below, but I noticed we could also add in the actual url to blurhash as a parameter, and thus perhaps we could eliminate a lot of our own code (and hopefully piggyback-ride onto an smoother transition from blur to image).
CachedNetworkImage(
imageUrl: url,
fadeInCurve: Curves.linear,
fadeOutCurve: Curves.linear,
fit: BoxFit.cover,
width: width,
height: height,
fadeInDuration: Duration(milliseconds: 250),
fadeOutDuration: Duration(milliseconds: 250),
cacheManager: CacheManager(
Config(
url,
maxNrOfCacheObjects: 500,
stalePeriod: stalePeriod ?? const Duration(days: 30),
),
),
placeholder: Stack(
fit: StackFit.expand,
children: [
BlurHash(
hash: image.blurhash,
imageFit: BoxFit.cover,
),
Center(
child: LoadingSpinner(
radius: spinnerRadius ?? 15,
strokeWidth: spinnerStrokeWidth ?? 1,
),
),
],
),
errorWidget: (context, _, __) => ProfilePlaceholder(width: width, height: height),
)However, it would be ideal for us to control errorWidget as well as the cacheManager.
vtisnado, peerwaya, realmedik and ceopaludetto
Metadata
Metadata
Assignees
Labels
No labels