-
Notifications
You must be signed in to change notification settings - Fork 122
Open
Description
Hi,
I have been having a render overflow error during testing of screens which use this widget. I am utilizing flutter_test and the overflow is on the right side. The error message I receive is posted down below. Has anyone received this error before?
The following assertion was thrown during layout:
A RenderFlex overflowed by 102 pixels on the right.
The relevant error-causing widget was:
Row flutter/.pub-cache/hosted/pub.dartlang.org/flutter_signin_button-2.0.0/lib/button_builder.dart:
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.
Update:
The test passes when the text for the button is short (eg. 'Google') but fails when the text for the button is longer (eg. 'Continue with Google'). Is there a way to account for this in tests?
SignInButton(
Buttons.Google,
text: 'Continue with Google',
onPressed: onPress,
),
SignInButton(
Buttons.Google,
text: 'Google',
onPressed: onPress,
),
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels