Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Dynamic row height #53

Open
vixez opened this issue Jul 10, 2024 · 4 comments
Open

[Feature] Dynamic row height #53

vixez opened this issue Jul 10, 2024 · 4 comments
Labels
enhancement New feature or request stale

Comments

@vixez
Copy link

vixez commented Jul 10, 2024

Hello,

I had opened this feature request a long time ago in the original repo, but it never got implemented.
So I was hoping there is a chance of having it implemented it now with the new maintainers.

My original request was:

Is it possible to have dynamic row height?
Some of my rows use a renderer with a variable widget height. Since the height is currently fixed, the widgets are cut off.

Kind regards

@vixez vixez added the enhancement New feature or request label Jul 10, 2024
@doonfrs
Copy link
Owner

doonfrs commented Jul 10, 2024

Hi, @vixez
Could you please open it again on the current repo.
I will try to deploy it ASAP.

@vixez
Copy link
Author

vixez commented Jul 10, 2024

Hey @doonfrs,
There was no code written for it, it was only a request if the author could add this functionality.
But this was never implemented.

@stan-at-work
Copy link

Hey @doonfrs, There was no code written for it, it was only a request if the author could add this functionality. But this was never implemented.

This is my approach:

double rowHeight = 75;
final _pageLimit = 25;
final columnHeight = 75;
final footerHeight = 75;

if (widget.fixedRowHeight != null) {
  // Row height is fixed
  rowHeight = widget.fixedRowHeight!;
} else {
  // Row height is calculated
  rowHeight = (((constraints.maxHeight) - (widget.columnHeight + widget.footerHeight)) / _pageLimit) - 1.2;

  rowHeight = rowHeight.clamp(40, 75);
}

Copy link

This issue is stale because it has been open for 30 days with no activity.

@github-actions github-actions bot added the stale label Dec 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request stale
Projects
None yet
Development

No branches or pull requests

3 participants