Skip to content

Feature request: specify a flexible width column for DataTable #51799

@shaynekellyii

Description

@shaynekellyii

Use case

Currently, the DataTable column widths aren't flexible unless you only have one column that contains only text:

if (dataColumnIndex == _onlyTextColumn) {
    tableColumns[displayColumnIndex] = const IntrinsicColumnWidth(flex: 1.0);
} else {
    tableColumns[displayColumnIndex] = const IntrinsicColumnWidth();
}

It would be nice to be able to specify a column of your choice to have flexible width.

Proposal

Add a field like flexibleColumnIndex to DataTable that can be used to set the IntrinsicColumnWidth flex to 1.0 if the field is non-null.

I can put in a PR for this if this makes sense.

Metadata

Metadata

Assignees

Labels

P3Issues that are less important to the Flutter projectc: new featureNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to Flutterf: material designflutter/packages/flutter/material repository.frameworkflutter/packages/flutter repository. See also f: labels.r: solvedIssue is closed as solvedteam-designOwned by Design Languages teamtriaged-designTriaged by Design Languages team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions