introduction_screen icon indicating copy to clipboard operation
introduction_screen copied to clipboard

Overflow error for dots navigation

Open polyGeek opened this issue 3 years ago • 5 comments

Using: v3.0.2 Flutter: 2.10.4 Emulator: Pixel 5 API 30 Resolution: 1080 x 2340 dp: 393x851

Screenshot_20220408_185819

I haven't messed with the intro screens in ages, but suddenly noticed this overflow today. (See screenshot.) I tried changing the "nextFlex" value around. It just moves the dots left and right. Oddly, I can't get the dots to center themselves on the screen.

If I remove two of the intro screens then the overflow fits. Obviously, that's not a solution.

Here's the error msg:

The following assertion was thrown during layout:
A RenderFlex overflowed by 32 pixels on the right.

The relevant error-causing widget was:
IntroductionScreen-[LabeledGlobalKey<IntroductionScreenState>#0db96]

The overflowing RenderFlex has an orientation of Axis.horizontal.
The edge of the RenderFlex that is overflowing has been marked in
the rendering with a yellow and black striped pattern. This is
usually caused by the contents being too big for the RenderFlex.
Consider applying a flex factor (e.g. using an Expanded widget)
to force the children of the RenderFlex to fit within the
available space instead of being sized to their natural size.
This is considered an error condition because it indicates that
there is content that cannot be seen. If the content is
legitimately bigger than the available space, consider clipping
it with a ClipRect widget before putting it in the flex, or using
a scrollable container rather than a Flex, like a ListView.
The specific RenderFlex in question is: RenderFlex#2acb8 relayoutBoundary=up8 OVERFLOWING:
parentData: (can use size)
constraints: BoxConstraints(0.0<=w<=120.2, 0.0<=h<=Infinity)
size: Size(120.2, 22.0)
direction: horizontal
mainAxisAlignment: center
mainAxisSize: min
crossAxisAlignment: center
textDirection: ltr
verticalDirection: down

polyGeek avatar Apr 08 '22 23:04 polyGeek

same here.

noahabe avatar Apr 12 '22 15:04 noahabe

same, is like is designed for 6 pages maximum, and the alineation of the dots is not center. (this can interfer with "next" button)

lcyper avatar Jun 27 '22 01:06 lcyper

I have 5 pages, and I also got an overflow. I resolved it by using this:

// Default is EdgeInsets.all(16.0), but this causes horizontal overflow on Pixel 3
controlsPadding: const EdgeInsets.symmetric(horizontal: 0.0),

EnduringBeta avatar Jul 11 '22 19:07 EnduringBeta

i think i resolve it by changing the flex property

lcyper avatar Jul 12 '22 14:07 lcyper

same as Icyper, putting dotsFlex property fixed it for me

tsukihidaze avatar Aug 28 '22 10:08 tsukihidaze

Thanks all for letting everyone know your solution! :-)

Closing.

ghenry avatar Nov 23 '22 18:11 ghenry