fromAsset static method
dynamic
fromAsset({})
Implementation
static fromAsset({
required String asset,
required double size,
String errorText = "Error",
Color errorBackgroundColor = Colors.grey,
Color? errorTextColor = Colors.white,
}) {
return renderWidget(
Image.asset(
asset,
fit: BoxFit.cover,
width: size,
height: size,
errorBuilder: (context, error, stackTrace) => errorBuilder(
context,
error,
stackTrace,
size,
size / 2,
errorBackgroundColor,
errorTextColor,
errorText,
),
frameBuilder: frameBuilder,
),
size,
);
}