A RenderFlex overflowed by 309 pixels on the right.

85 views
Skip to first unread message

Honson Luma

unread,
Jan 8, 2020, 10:06:30 AM1/8/20
to flutt...@googlegroups.com
Hello Flutter Gang,

I need help with this error. Please send me suggestions. 

 Stack(
              children: <Widget>[
                Container(
                  decoration: BoxDecoration(
                    color: Colors.transparent,
                    image: DecorationImage(
                      fit: BoxFit.fill,
                      image: NetworkImage('assets/banner.gif'),
                    ),
                  ),
                  height: 400,
                ),
                Container(
                  height: 400,
                  decoration: BoxDecoration(
                    color: Colors.white,
                    gradient: LinearGradient(
                      begin: FractionalOffset.topCenter,
                      end: FractionalOffset.bottomCenter,
                      colors: [
                        Colors.yellowAccent[700].withOpacity(0.6),
                        Colors.black,
                      ],
                      stops: [0.0, 1.0],
                    ),
                  ),
                ),
                Container(
                  width: MediaQuery.of(context).size.width,
                  child: Row(
                    mainAxisAlignment: MainAxisAlignment.center,
                    crossAxisAlignment: CrossAxisAlignment.center,
                    children: <Widget>[
                      SizedBox(
                        height: 900,
                      ),
                      Text(
                        '',
                        style: TextStyle(
                            fontSize: 15, fontWeight: FontWeight.w800),
                      ),
                    ],
                  ),
                ),
                Row(
                  mainAxisAlignment: MainAxisAlignment.center,
                  crossAxisAlignment: CrossAxisAlignment.center,
                  children: <Widget>[
                    SizedBox(
                      height: 1050,
                    ),
                    Padding(
                      padding: const EdgeInsets.all(8.0),
                      child: Row(
                        mainAxisAlignment: MainAxisAlignment.center,
                        crossAxisAlignment: CrossAxisAlignment.center,
                        children: <Widget>[
                          Column(
                            children: <Widget>[
                              Image.network(
                                'assets/hd.png',
                                height: 40,
                              ),
                              SizedBox(
                                height: 10,
                              ),
                              Text(''),
                              SizedBox(
                                height: 10,
                              ),
                              Text(
                                ''
                                '\n ',
                                style: TextStyle(
                                    fontSize: 10,
                                    fontWeight: FontWeight.w700,
                                    color: Colors.black),
                              ),
                            ],
                          ),
                          SizedBox(
                            width: 100,
                          ),
                          Column(
                            children: <Widget>[
                              Image.network(
                                'assets/omni1.png',
                                height: 40,
                              ),
                              SizedBox(
                                height: 10,
                              ),
                              Text(''),
                              SizedBox(
                                height: 10,
                              ),
                              Text(
                                '      '
                                '\n',
                                style: TextStyle(
                                    fontSize: 10,
                                    fontWeight: FontWeight.w700,
                                    color: Colors.black),
                              ),
                            ],
                          ),
                          SizedBox(
                            width: 100,
                          ),
                          Padding(
                            padding: const EdgeInsets.all(8.0),
                            child: Column(
                              children: <Widget>[
                                Image.network(
                                  'assets/tether.png',
                                  height: 40,
                                ),
                                SizedBox(
                                  height: 10,
                                ),
                                Text('),
                                SizedBox(
                                  height: 10,
                                ),
                                Text(
                                  ' \n '
                                  '',
                                  style: TextStyle(
                                      fontSize: 10,
                                      fontWeight: FontWeight.w700,
                                      color: Colors.black),
                                ),
                              ],
                            ),
                          ),
                        ],
                      ),
                    ),
                  ],
                ),













══╡ EXCEPTION CAUGHT BY RENDERING LIBRARY ╞═════════════════════════════════════════════════════════
The following assertion was thrown during layout:
A RenderFlex overflowed by 309 pixels on the right.

The relevant error-causing widget was:
Row org-dartlang-app:///packages/hd/main.dart:152:17

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#2035b relayoutBoundary=up13 OVERFLOWING:
creator: Row ← Stack ← Column ← _SingleChildViewport ← IgnorePointer-[GlobalKey#d2329] ← Semantics ←
_PointerListener ← Listener ← _GestureSemantics ←
RawGestureDetector-[LabeledGlobalKey<RawGestureDetectorState>#d4cd4] ← _PointerListener ← Listener
← ⋯
parentData: not positioned; offset=Offset(0.0, 0.0) (can use size)
constraints: BoxConstraints(0.0<=w<=500.0, 0.0<=h<=Infinity)
size: Size(500.0, 1050.0)
direction: horizontal
mainAxisAlignment: center
mainAxisSize: max
crossAxisAlignment: center
textDirection: ltr
verticalDirection: down
◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤
════════════════════════════════════════════════════════════════════════════════════════════════════
webcode.png

Olaide Nojeem Ekeolere

unread,
Jan 8, 2020, 1:19:49 PM1/8/20
to Honson Luma, flutt...@googlegroups.com
Hi Honson,
   Hmmmm.....those ‘\n’ Text Widgets will probably be the culprit. Also your screenshot doesn’t help. Remove the next line strings or try to use Expanded widget to wrap those Columns in the Row widget, or both.
Best Regards

--
You received this message because you are subscribed to the Google Groups "Flutter Development (flutter-dev)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flutter-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/flutter-dev/CA%2BxH8v8S9RtbgLyjCLmjM%3DFDkktZmuNYd0jeeOtPXV6KnhDzmw%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages