flutter_screen_lock icon indicating copy to clipboard operation
flutter_screen_lock copied to clipboard

How can I fix Footer widget overflow?

Open HsYooon opened this issue 2 years ago • 0 comments

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!,
            ],
          ),
        ),
      );
    }

HsYooon avatar Jan 04 '24 06:01 HsYooon