I would like to cache a Network Image from an S3 bucket URL against an id or key. I tried to use the key: parameter but it didn't work. Please advise how I can achieve this. Heres the Cached Network Image code with the 'key' parameter that doesn't seem to do what I intend.
CachedNetworkImage(
key: Key(uni['university_name'].toString()), // Doesn't seem to do the job
imageUrl: uni['image_url'],
placeholder: (context, url) => CardPlaceHolder(),
errorWidget: (context, url, error) => Padding(
padding: EdgeInsets.all(21),
child: Icon(
Icons.error,
size: 30,
color: Colors.red.withOpacity(0.8),
),
),
imageBuilder: (context, imageProvider) => ...