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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃悰 A child of Button has an unbound height constraint. #1039

Closed
fischerscode opened this issue Mar 15, 2024 · 0 comments 路 Fixed by #1040
Closed

馃悰 A child of Button has an unbound height constraint. #1039

fischerscode opened this issue Mar 15, 2024 · 0 comments 路 Fixed by #1040
Labels
bug Something isn't working

Comments

@fischerscode
Copy link
Contributor

Describe the bug
A child of Button has an unbound height constraint.

To Reproduce
Steps to reproduce the behavior:

  1. run this example
void main() {
  runApp(FluentApp(
    home: Stack(
      children: [
        ConstrainedBox(
          constraints: BoxConstraints(
              maxHeight: 100, minHeight: 10, minWidth: 10, maxWidth: 100),
          child: LayoutBuilder(builder: (context, constraints) {
            print("outer: $constraints");
            return Button(
              child: LayoutBuilder(
                builder: (context, constraints) {
                  print("inner: $constraints");
                  return Container();
                },
              ),
              onPressed: () {},
            );
          }),
        ),
      ],
    ),
  ));
  1. Logs:
flutter: outer: BoxConstraints(10.0<=w<=100.0, 10.0<=h<=100.0)
flutter: inner: BoxConstraints(0.0<=w<=76.0, 0.0<=h<=Infinity)

Expected behavior
Centering a child that's to small seems reasonable, but the upper bound should be respected.

Screenshots
none

Additional context
I think ef3cd87 broke this.

@fischerscode fischerscode changed the title 馃悰 馃悰 A child of Button has an unbound height constraint. Mar 15, 2024
@bdlukaa bdlukaa added the bug Something isn't working label Mar 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants