Open dovahkiin98 opened 1 month ago
I have code using classes like AssetBundlePictureKey, ExactAssetPicture, etc. But I can't seem to find any migration guide for that code?
AssetBundlePictureKey
ExactAssetPicture
Can someone help me?
class DynamicAssetPicture extends ExactAssetPicture { final int cacheHash; DynamicAssetPicture( super.assetName, super.decoderBuilder, this.cacheHash, ); @override Future<OverrideSvgKey> obtainKey(PictureConfiguration picture) { return SynchronousFuture<OverrideSvgKey>( OverrideSvgKey( bundle: bundle ?? picture.bundle ?? rootBundle, name: keyName, colorFilter: colorFilter, cacheHash: cacheHash, ), ); } @override bool operator ==(Object other) { if (other is DynamicAssetPicture) { return cacheHash == other.cacheHash; } return false; } @override int get hashCode => Object.hash(super.hashCode, cacheHash); } class OverrideSvgKey extends AssetBundlePictureKey { final int cacheHash; const OverrideSvgKey({ required super.bundle, required super.name, super.colorFilter, required this.cacheHash, }) : super( theme: const SvgTheme(), ); @override bool operator ==(dynamic other) => hashCode == other.hashCode; @override int get hashCode => Object.hash(super.hashCode, cacheHash); }
I have code using classes like
AssetBundlePictureKey
,ExactAssetPicture
, etc. But I can't seem to find any migration guide for that code?Can someone help me?