Skip to content

Frustrations with DataTable #151005

@nate-thegrate

Description

@nate-thegrate

google search pages

There was a lot of pagination back in the good old days, but modern apps have transitioned to use infinite scrolling.


ListTile

Flutter list tiles are fantastic—instead of just a single class, the material library also supplies AboutListTile, CheckboxListTile, RadioListTile, and SwitchListTile, each with their own onTap configuration.


DataTable

Conversely, it's impossible to set an onTap callback for a DataRow.

There's an onLongPress option, but the only way to have a callback for a tap is to use onSelectChanged, which automatically adds a column of checkboxes. And there's no option to wrap with an InkWell or GestureDetector, since DataRow isn't a widget.


I'm currently working with a nonprofit to make a Flutter app. My friend @ChaAbby went to the effort of implementing a DataTable, only to discover that its performance drops off quickly as it grows in length. We'll have to either scrap it and switch to a CustomScrollView, or use the paginated version and work with a user interface that belongs in the previous decade.



Every widget in the Material library applies to a Material 3 component, with one exception.
If we end up implementing something along the lines of #143499 for older widgets, it should also apply to DataTable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    c: performanceRelates to speed or footprint issues (see "perf:" labels)f: material designflutter/packages/flutter/material repository.f: scrollingViewports, list views, slivers, etc.perf: speedPerformance issues related to (mostly rendering) speedteam-designOwned by Design Languages team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions