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

GridBuilder doesn't work. #5

Closed
nknotats opened this issue Feb 6, 2023 · 1 comment
Closed

GridBuilder doesn't work. #5

nknotats opened this issue Feb 6, 2023 · 1 comment

Comments

@nknotats
Copy link

nknotats commented Feb 6, 2023

When I use GridBuilder in masamune/lib/ui/grid_builder.dart, error occurs.

  1. With GridBuilder.count, error message is "maxCrossAxisExtent != null && maxCrossAxisExtent > 0 is not true"
  2. With GridBuilder.extent, error message is "crossAxisCount != null && crossAxisCount > 0 is not ture"

I guess it needs to set non-zero value to each of them.

}) : maxCrossAxisExtent = 0.0,

mathrunet added a commit that referenced this issue Feb 6, 2023
@mathrunet
Copy link
Owner

mathrunet commented Feb 6, 2023

@nknotats
Thank you very much.
It was simply that the following were reversed.

gridDelegate: crossAxisCount == 0
? SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: crossAxisCount,
mainAxisSpacing: mainAxisSpacing,
crossAxisSpacing: crossAxisSpacing,
childAspectRatio: childAspectRatio,
mainAxisExtent: mainAxisExtent,
)
: SliverGridDelegateWithMaxCrossAxisExtent(
maxCrossAxisExtent: maxCrossAxisExtent,
mainAxisSpacing: mainAxisSpacing,
crossAxisSpacing: crossAxisSpacing,
childAspectRatio: childAspectRatio,
mainAxisExtent: mainAxisExtent,
),

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants