createRenderObject method
Creates an instance of the RenderObject class that this RenderObjectWidget represents, using the configuration described by this RenderObjectWidget.
This method should not do anything with the children of the render object. That should instead be handled by the method that overrides RenderObjectElement.mount in the object rendered by this object's createElement method. See, for example, SingleChildRenderObjectElement.mount.
Implementation
@override
ExtendedRenderImage createRenderObject(BuildContext context) {
assert((!matchTextDirection && alignment is Alignment) ||
debugCheckHasDirectionality(context));
assert(
image?.debugGetOpenHandleStackTraces()?.isNotEmpty ?? true,
'Creator of a RawImage disposed of the image when the RawImage still '
'needed it.');
return ExtendedRenderImage(
image: image?.clone(),
debugImageLabel: debugImageLabel,
width: width,
height: height,
scale: scale,
color: color,
opacity: opacity,
colorBlendMode: colorBlendMode,
fit: fit,
alignment: alignment,
repeat: repeat,
centerSlice: centerSlice,
matchTextDirection: matchTextDirection,
textDirection: matchTextDirection || alignment is! Alignment
? Directionality.of(context)
: null,
invertColors: invertColors,
filterQuality: filterQuality,
sourceRect: sourceRect,
beforePaintImage: beforePaintImage,
afterPaintImage: afterPaintImage,
gestureDetails: gestureDetails,
editActionDetails: editActionDetails,
isAntiAlias: isAntiAlias,
layoutInsets: layoutInsets,
);
}