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

How can I fix Footer widget overflow? #103

Open
HsYooon opened this issue Jan 4, 2024 · 0 comments
Open

How can I fix Footer widget overflow? #103

HsYooon opened this issue Jan 4, 2024 · 0 comments

Comments

@HsYooon
Copy link

HsYooon commented Jan 4, 2024

Hello, I have a question about using footer widget.
I used footer property for using custom text button, but it caused overflow when the orientation is Landscape.
so I checked the code and found OrientationBuilder widget builds Column widget.
How about wrapping Column widget with Singlechildscrollview? or Is there another solution about this problem?

Here is the code

[screen_lock.dart]
   ...
   Widget buildContent() {
      return OrientationBuilder(
        builder: (context, orientation) => SingleChildScrollView(
          child: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            children: [
              Flex(
                mainAxisAlignment: MainAxisAlignment.spaceEvenly,
                direction: orientations[orientation]!,
                children: [
                  Column(
                    mainAxisAlignment: MainAxisAlignment.center,
                    children: [
                      buildHeadingText(),
                      buildSecrets(),
                    ],
                  ),
                  buildKeyPad(),
                ],
              ),
              if (widget.footer != null) widget.footer!,
            ],
          ),
        ),
      );
    }
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

1 participant