buildImage method
Implementation
@protected
Widget buildImage(BuildParameters params) {
final props = params.props;
final fallbackSpec = params.widgets["fallback"];
var imageProvider = params.buildProp("provider", argument: props["value"]);
imageProvider ??= const AssetImage("assets/logo");
return Image(
key: properties.getKey(params.id),
image: imageProvider,
errorBuilder: fallbackSpec != null
? (context, ex, stack) {
return builder.buildWidget(
context, fallbackSpec, params.state, params.parentContext);
}
: null,
color: tryParseColor(props["color"]),
width: tryParseDouble(props["width"]),
height: tryParseDouble(props["height"]),
alignment: params.buildProp("alignment") ?? Alignment.center,
fit: params.buildProp("fit"),
);
}