Skip to content

Document how to achieve blank cells in Table/TableRow #42523

@duzenko

Description

@duzenko

Use case

Sometimes we need to leave Table cells blank (no child widget) by design.
Right now the workaround is e,g, to put a blank Container() in to imitate emptiness. However it clutters the widget tree and building code.

Proposal

Instead of throwing a FlutterError( 'One of the children of one of the rows of the table was null.\n' 'The children of a TableRow must not be null.' ); accept null and treat it the same way you now treat an empty Container() as a child.

Metadata

Metadata

Assignees

Labels

P2Important issues not at the top of the work listc: new featureNothing broken; request for a new capabilityd: api docsIssues with https://api.flutter.dev/frameworkflutter/packages/flutter repository. See also f: labels.team-frameworkOwned by Framework teamtriaged-frameworkTriaged by Framework teamwaiting for PR to land (fixed)A fix is in flight

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions