سلام خسته نباشید
وقتی عکس جدید به asset اضافه میکنم و دستور flutter packages pub run build_runner build رو میزنم داخل فایل assets.gen به دو تا خط ارور میده
جلوی دو تا خط ارور رو به صورت کامنت نوشتم
class SvgGenImage {
const SvgGenImage(this._assetName);
final String _assetName;
SvgPicture svg({
Key? key,
bool matchTextDirection = false,
AssetBundle? bundle,
String? package,
double? width,
double? height,
BoxFit fit = BoxFit.contain,
AlignmentGeometry alignment = Alignment.center,
bool allowDrawingOutsideViewBox = false,
WidgetBuilder? placeholderBuilder,
String? semanticsLabel,
bool excludeFromSemantics = false,
SvgTheme theme = const SvgTheme(),
ColorFilter? colorFilter,
@deprecated Color? color,
@deprecated BlendMode colorBlendMode = BlendMode.srcIn,
@deprecated Clip? clipBehavior,
@deprecated bool cacheColorFilter = false,
}) {
return SvgPicture.asset(
_assetName,
key: key,
matchTextDirection: matchTextDirection,
bundle: bundle,
package: package,
width: width,
height: height,
fit: fit,
alignment: alignment,
allowDrawingOutsideViewBox: allowDrawingOutsideViewBox,
placeholderBuilder: placeholderBuilder,
semanticsLabel: semanticsLabel,
excludeFromSemantics: excludeFromSemantics,
theme: theme,
colorFilter: colorFilter, //(The named parameter 'colorFilter' isn't defined.)
color: color,
colorBlendMode: colorBlendMode,
clipBehavior: clipBehavior, //(The argument type 'Clip?' can't be assigned to the parameter type 'Clip'.)
cacheColorFilter: cacheColorFilter,
);
}
String get path => _assetName;
String get keyName => _assetName;
}