Skip to content

Add option to customise data table sorting icon(#91801) - #102870

Closed
dheerajv09 wants to merge 4 commits into
flutter:masterfrom
dheerajv09:Add-option-to-customise-DataTable-sorting-icon
Closed

dheerajv09 wants to merge 4 commits into
flutter:masterfrom
dheerajv09:Add-option-to-customise-DataTable-sorting-icon

Conversation

@dheerajv09

Copy link
Copy Markdown
Contributor

Adds option to add customized icon in place of default sorting icon.

fixes #91801

@flutter-dashboard flutter-dashboard Bot added p: material_ui material_ui package in flutter/packages framework flutter/packages/flutter repository. See also f: labels. labels Apr 30, 2022
@dheerajv09

Copy link
Copy Markdown
Contributor Author

@danagbemava-nc

@HansMuller
HansMuller requested a review from Renzo-Olivares May 6, 2022 21:52
@Renzo-Olivares

Copy link
Copy Markdown
Contributor

Hi @dheerajv09, thank you for your contribution! I think this is great, but what do you think about making the sorting icon a Widget? This would cover a wider range of follow up requests for changing the sorting icon's properties rather than only limiting it to an Icon.

@dheerajv09

Copy link
Copy Markdown
Contributor Author

Hi, @Renzo-Olivares , can you tell what's all the failed check error means??.

@Renzo-Olivares

Copy link
Copy Markdown
Contributor

Looks like it might be unrelated. Try syncing your PR up to master.

@flutter-dashboard

Copy link
Copy Markdown

This pull request executed golden file tests, but it has not been updated in a while (20+ days). Test results from Gold expire after as many days, so this pull request will need to be updated with a fresh commit in order to get results from Gold.

For more guidance, visit Writing a golden file test for package:flutter.

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.


/// The icon to customize sorting icon in header.
///
/// By default uses Icon(Icons.arrow_upward,size: 16.0)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/// By default uses Icon(Icons.arrow_upward,size: 16.0)
/// By default, this uses `Icon(Icons.arrow_upward, size: 16.0)`.

..setTranslationRaw(0.0, _arrowIconBaselineOffset, 0.0),
alignment: Alignment.center,
child: const Icon(
child: widget.sortIcon ?? const Icon(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this just be the default value of the constructor parameter for DataTable? That would make this a compile-time test rather than a runtime test.

@Hixie

Hixie commented Aug 23, 2022

Copy link
Copy Markdown
Contributor

@dheerajv09 Will you be able to continue working on this? It's totally fine if not; we can take it over (though it might take longer). I'm just asking because I'm trying to clean out our review queue.

@Hixie

Hixie commented Nov 9, 2022

Copy link
Copy Markdown
Contributor

I'm going to close this PR for now to get it off our review queue, but please don't hesitate to submit a new PR if you have the time to get back to it. In the meantime I'll mention this PR on the issue so that anyone else who wants to pick it up can do so. Thanks again for your contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

framework flutter/packages/flutter repository. See also f: labels. p: material_ui material_ui package in flutter/packages

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Proposal] Add option to customise DataTable sorting icon

3 participants