createRenderObject method Null safety
- BuildContext context
override
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
RenderTable createRenderObject(BuildContext context) {
assert(debugCheckHasDirectionality(context));
return RenderTable(
columns: children.isNotEmpty ? children[0].children!.length : 0,
rows: children.length,
columnWidths: columnWidths,
defaultColumnWidth: defaultColumnWidth,
textDirection: textDirection ?? Directionality.of(context),
border: border,
rowDecorations: _rowDecorations,
configuration: createLocalImageConfiguration(context),
defaultVerticalAlignment: defaultVerticalAlignment,
textBaseline: textBaseline,
);
}