Skip to content

DataColumn sorting arrow unclear in docs #80597

@S-ecki

Description

@S-ecki

Use case

I am designing a DataTable where the DataColumns need a fixed width, which is calculated based on the LayoutBuilder´s maxWidth.
Even though I accounted for horizontalMargin , columnSpacing and all Paddings, the calculation did not add up. Problem was that I provided empty onSort functions as placeholders and that reserved a width of 18 for every DataColumn.

However, the debugging process was rather hard as the docs never mention the sorting arrow reserving the space, even though the function does not return anything and no visible arrow is displayed. Even though the empty space can be identified as a RichText (with DevTools), that did not shed light on where it came from.

Furthermore, it would be useful to know the exact size of the sorting arrow and if it resized based on the device size.

A screenshot is provided to better understand my point.

Proposal

Add above mentioned informations the DataColumn or onSort documentation.

To reiterate, following information would be valueable:

  • space is taken for sorting arrow as soon as onSort of DataColumn is not null
  • size of onSort arrow

StackOverflow question regarding topic

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listd: api docsIssues with https://api.flutter.dev/f: material designflutter/packages/flutter/material repository.frameworkflutter/packages/flutter repository. See also f: labels.r: fixedIssue is closed as already fixed in a newer versionteam-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