════════ Exception caught by rendering library ═════════════════════════════════
The following assertion was thrown during performResize():
Horizontal viewport was given unbounded height.
Viewports expand in the cross axis to fill their container and constrain their children to match their extent in the cross axis. In this case, a horizontal viewport was given an unlimited amount of vertical space in which to expand.
The relevant error-causing widget was:
GridView GridView:file:///C:/Users/DELL/clean%20Articucture/learning/lib/Presentation/Screens/detail_screen.dart:88:37
The following RenderObject was being processed when the exception was fired: RenderViewport#6a248 NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
needs compositing
parentData: (can use size)
constraints: BoxConstraints(0.0<=w<=360.0, 0.0<=h<=Infinity)
size: MISSING
axisDirection: right
crossAxisDirection: down
offset: ScrollPositionWithSingleContext#be2ad(offset: 0.0, range: null..null, viewport: null, ScrollableState, ClampingScrollPhysics -> RangeMaintainingScrollPhysics, IdleScrollActivity#36a78, ScrollDirection.idle)
anchor: 0.0
center child: RenderSliverPadding#777b2 NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
parentData: paintOffset=Offset(0.0, 0.0)
constraints: MISSING
geometry: null
padding: EdgeInsets.zero
textDirection: ltr
child: RenderSliverGrid#2faee NEEDS-LAYOUT NEEDS-PAINT
parentData: paintOffset=Offset(0.0, 0.0)
constraints: MISSING
geometry: null
no children current live
RenderObject: RenderViewport#6a248 NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
needs compositing
parentData: (can use size)
constraints: BoxConstraints(0.0<=w<=360.0, 0.0<=h<=Infinity)
size: MISSING
axisDirection: right
crossAxisDirection: down
offset: ScrollPositionWithSingleContext#be2ad(offset: 0.0, range: null..null, viewport: null, ScrollableState, ClampingScrollPhysics -> RangeMaintainingScrollPhysics, IdleScrollActivity#36a78, ScrollDirection.idle)
anchor: 0.0
center child: RenderSliverPadding#777b2 NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
parentData: paintOffset=Offset(0.0, 0.0)
constraints: MISSING
geometry: null
padding: EdgeInsets.zero
textDirection: ltr
child: RenderSliverGrid#2faee NEEDS-LAYOUT NEEDS-PAINT
parentData: paintOffset=Offset(0.0, 0.0)
constraints: MISSING
geometry: null
no children current live
════════════════════════════════════════════════════════════════════════════════
════════ Exception caught by rendering library ═════════════════════════════════
RenderBox was not laid out: RenderViewport#6a248 NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
'package:flutter/src/rendering/box.dart':
Failed assertion: line 2164 pos 12: 'hasSize'
The relevant error-causing widget was:
GridView GridView:file:///C:/Users/DELL/clean%20Articucture/learning/lib/Presentation/Screens/detail_screen.dart:88:37
════════════════════════════════════════════════════════════════════════════════
════════ Exception caught by rendering library ═════════════════════════════════
RenderBox was not laid out: RenderViewport#6a248 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
'package:flutter/src/rendering/box.dart':
Failed assertion: line 2164 pos 12: 'hasSize'
The relevant error-causing widget was:
GridView GridView:file:///C:/Users/DELL/clean%20Articucture/learning/lib/Presentation/Screens/detail_screen.dart:88:37
════════════════════════════════════════════════════════════════════════════════
════════ Exception caught by rendering library ═════════════════════════════════
RenderBox was not laid out: RenderIgnorePointer#b1115 relayoutBoundary=up19 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
'package:flutter/src/rendering/box.dart':
Failed assertion: line 2164 pos 12: 'hasSize'
The relevant error-causing widget was:
GridView GridView:file:///C:/Users/DELL/clean%20Articucture/learning/lib/Presentation/Screens/detail_screen.dart:88:37
════════════════════════════════════════════════════════════════════════════════
════════ Exception caught by rendering library ═════════════════════════════════
RenderBox was not laid out: RenderSemanticsAnnotations#4ecaa relayoutBoundary=up18 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
'package:flutter/src/rendering/box.dart':
Failed assertion: line 2164 pos 12: 'hasSize'
The relevant error-causing widget was:
GridView GridView:file:///C:/Users/DELL/clean%20Articucture/learning/lib/Presentation/Screens/detail_screen.dart:88:37
════════════════════════════════════════════════════════════════════════════════
════════ Exception caught by rendering library ═════════════════════════════════
RenderBox was not laid out: RenderPointerListener#15255 relayoutBoundary=up17 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
'package:flutter/src/rendering/box.dart':
Failed assertion: line 2164 pos 12: 'hasSize'
The relevant error-causing widget was:
GridView GridView:file:///C:/Users/DELL/clean%20Articucture/learning/lib/Presentation/Screens/detail_screen.dart:88:37
════════════════════════════════════════════════════════════════════════════════
════════ Exception caught by rendering library ═════════════════════════════════
RenderBox was not laid out: RenderSemanticsGestureHandler#e3ceb relayoutBoundary=up16 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
'package:flutter/src/rendering/box.dart':
Failed assertion: line 2164 pos 12: 'hasSize'
The relevant error-causing widget was:
GridView GridView:file:///C:/Users/DELL/clean%20Articucture/learning/lib/Presentation/Screens/detail_screen.dart:88:37
════════════════════════════════════════════════════════════════════════════════
════════ Exception caught by rendering library ═════════════════════════════════
RenderBox was not laid out: RenderPointerListener#5a6ad relayoutBoundary=up15 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
'package:flutter/src/rendering/box.dart':
Failed assertion: line 2164 pos 12: 'hasSize'
The relevant error-causing widget was:
GridView GridView:file:///C:/Users/DELL/clean%20Articucture/learning/lib/Presentation/Screens/detail_screen.dart:88:37
════════════════════════════════════════════════════════════════════════════════
════════ Exception caught by rendering library ═════════════════════════════════
RenderBox was not laid out: _RenderScrollSemantics#6bbf6 relayoutBoundary=up14 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
'package:flutter/src/rendering/box.dart':
Failed assertion: line 2164 pos 12: 'hasSize'
The relevant error-causing widget was:
GridView GridView:file:///C:/Users/DELL/clean%20Articucture/learning/lib/Presentation/Screens/detail_screen.dart:88:37
════════════════════════════════════════════════════════════════════════════════
════════ Exception caught by rendering library ═════════════════════════════════
RenderBox was not laid out: RenderTransform#e022b relayoutBoundary=up13 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
'package:flutter/src/rendering/box.dart':
Failed assertion: line 2164 pos 12: 'hasSize'
The relevant error-causing widget was:
GridView GridView:file:///C:/Users/DELL/clean%20Articucture/learning/lib/Presentation/Screens/detail_screen.dart:88:37
════════════════════════════════════════════════════════════════════════════════
════════ Exception caught by rendering library ═════════════════════════════════
RenderBox was not laid out: RenderClipRect#26be1 relayoutBoundary=up12 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
'package:flutter/src/rendering/box.dart':
Failed assertion: line 2164 pos 12: 'hasSize'
The relevant error-causing widget was:
SizedBox SizedBox:file:///C:/Users/DELL/clean%20Articucture/learning/lib/Presentation/Screens/detail_screen.dart:87:19
════════════════════════════════════════════════════════════════════════════════
════════ Exception caught by rendering library ═════════════════════════════════
RenderBox was not laid out: RenderConstrainedBox#7e8c8 relayoutBoundary=up11 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
'package:flutter/src/rendering/box.dart':
Failed assertion: line 2164 pos 12: 'hasSize'
The relevant error-causing widget was:
Column Column:file:///C:/Users/DELL/clean%20Articucture/learning/lib/Presentation/Screens/detail_screen.dart:38:22
════════════════════════════════════════════════════════════════════════════════
════════ Exception caught by rendering library ═════════════════════════════════
RenderBox was not laid out: RenderFlex#642bc relayoutBoundary=up10 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
'package:flutter/src/rendering/box.dart':
Failed assertion: line 2164 pos 12: 'hasSize'
The relevant error-causing widget was:
SingleChildScrollView SingleChildScrollView:file:///C:/Users/DELL/clean%20Articucture/learning/lib/Presentation/Screens/detail_screen.dart:37:20
════════════════════════════════════════════════════════════════════════════════
════════ Exception caught by rendering library ═════════════════════════════════
RenderBox was not laid out: _RenderSingleChildViewport#69452 relayoutBoundary=up9 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
'package:flutter/src/rendering/box.dart':
Failed assertion: line 2164 pos 12: 'hasSize'
The relevant error-causing widget was:
SingleChildScrollView SingleChildScrollView:file:///C:/Users/DELL/clean%20Articucture/learning/lib/Presentation/Screens/detail_screen.dart:37:20
════════════════════════════════════════════════════════════════════════════════
════════ Exception caught by rendering library ═════════════════════════════════
RenderBox was not laid out: RenderIgnorePointer#19cb7 relayoutBoundary=up8 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
'package:flutter/src/rendering/box.dart':
Failed assertion: line 2164 pos 12: 'hasSize'
The relevant error-causing widget was:
SingleChildScrollView SingleChildScrollView:file:///C:/Users/DELL/clean%20Articucture/learning/lib/Presentation/Screens/detail_screen.dart:37:20
════════════════════════════════════════════════════════════════════════════════
════════ Exception caught by rendering library ═════════════════════════════════
RenderBox was not laid out: RenderSemanticsAnnotations#dc60b relayoutBoundary=up7 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
'package:flutter/src/rendering/box.dart':
Failed assertion: line 2164 pos 12: 'hasSize'
The relevant error-causing widget was:
SingleChildScrollView SingleChildScrollView:file:///C:/Users/DELL/clean%20Articucture/learning/lib/Presentation/Screens/detail_screen.dart:37:20
════════════════════════════════════════════════════════════════════════════════
════════ Exception caught by rendering library ═════════════════════════════════
RenderBox was not laid out: RenderPointerListener#586c3 relayoutBoundary=up6 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
'package:flutter/src/rendering/box.dart':
Failed assertion: line 2164 pos 12: 'hasSize'
The relevant error-causing widget was:
SingleChildScrollView SingleChildScrollView:file:///C:/Users/DELL/clean%20Articucture/learning/lib/Presentation/Screens/detail_screen.dart:37:20
════════════════════════════════════════════════════════════════════════════════
════════ Exception caught by rendering library ═════════════════════════════════
RenderBox was not laid out: RenderSemanticsGestureHandler#0dea1 relayoutBoundary=up5 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
'package:flutter/src/rendering/box.dart':
Failed assertion: line 2164 pos 12: 'hasSize'
The relevant error-causing widget was:
SingleChildScrollView SingleChildScrollView:file:///C:/Users/DELL/clean%20Articucture/learning/lib/Presentation/Screens/detail_screen.dart:37:20
════════════════════════════════════════════════════════════════════════════════
════════ Exception caught by rendering library ═════════════════════════════════
RenderBox was not laid out: RenderPointerListener#2ff67 relayoutBoundary=up4 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
'package:flutter/src/rendering/box.dart':
Failed assertion: line 2164 pos 12: 'hasSize'
The relevant error-causing widget was:
SingleChildScrollView SingleChildScrollView:file:///C:/Users/DELL/clean%20Articucture/learning/lib/Presentation/Screens/detail_screen.dart:37:20
════════════════════════════════════════════════════════════════════════════════
════════ Exception caught by rendering library ═════════════════════════════════
RenderBox was not laid out: _RenderScrollSemantics#d7740 relayoutBoundary=up3 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
'package:flutter/src/rendering/box.dart':
Failed assertion: line 2164 pos 12: 'hasSize'
The relevant error-causing widget was:
SingleChildScrollView SingleChildScrollView:file:///C:/Users/DELL/clean%20Articucture/learning/lib/Presentation/Screens/detail_screen.dart:37:20
════════════════════════════════════════════════════════════════════════════════
════════ Exception caught by rendering library ═════════════════════════════════
RenderBox was not laid out: RenderTransform#5c575 relayoutBoundary=up2 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
'package:flutter/src/rendering/box.dart':
Failed assertion: line 2164 pos 12: 'hasSize'
The relevant error-causing widget was:
SingleChildScrollView SingleChildScrollView:file:///C:/Users/DELL/clean%20Articucture/learning/lib/Presentation/Screens/detail_screen.dart:37:20
════════════════════════════════════════════════════════════════════════════════
════════ Exception caught by rendering library ═════════════════════════════════
RenderBox was not laid out: RenderClipRect#eb401 relayoutBoundary=up1 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
'package:flutter/src/rendering/box.dart':
Failed assertion: line 2164 pos 12: 'hasSize'
The relevant error-causing widget was:
Scaffold Scaffold:file:///C:/Users/DELL/clean%20Articucture/learning/lib/Presentation/Screens/detail_screen.dart:18:12
════════════════════════════════════════════════════════════════════════════════
════════ Exception caught by rendering library ═════════════════════════════════
RenderBox was not laid out: RenderTransform#5c575 relayoutBoundary=up2
'package:flutter/src/rendering/box.dart':
Failed assertion: line 2164 pos 12: 'hasSize'
The relevant error-causing widget was:
SingleChildScrollView SingleChildScrollView:file:///C:/Users/DELL/clean%20Articucture/learning/lib/Presentation/Screens/detail_screen.dart:37:20
════════════════════════════════════════════════════════════════════════════════
Reloaded 1 of 1240 libraries in 817ms (compile: 17 ms, reload: 153 ms, reassemble: 537 ms).
Restarted application in 945ms.
════════ Exception caught by rendering library ═════════════════════════════════
The following assertion was thrown during performResize():
Horizontal viewport was given unbounded height.
Viewports expand in the cross axis to fill their container and constrain their children to match their extent in the cross axis. In this case, a horizontal viewport was given an unlimited amount of vertical space in which to expand.
The relevant error-causing widget was:
GridView GridView:file:///C:/Users/DELL/clean%20Articucture/learning/lib/Presentation/Screens/detail_screen.dart:88:37
The following RenderObject was being processed when the exception was fired: RenderViewport#b2180 NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
needs compositing
parentData: (can use size)
constraints: BoxConstraints(0.0<=w<=360.0, 0.0<=h<=Infinity)
size: MISSING
axisDirection: right
crossAxisDirection: down
offset: ScrollPositionWithSingleContext#99c5c(offset: 0.0, range: null..null, viewport: null, ScrollableState, ClampingScrollPhysics -> RangeMaintainingScrollPhysics, IdleScrollActivity#7728b, ScrollDirection.idle)
anchor: 0.0
center child: RenderSliverPadding#03569 NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
parentData: paintOffset=Offset(0.0, 0.0)
constraints: MISSING
geometry: null
padding: EdgeInsets.zero
textDirection: ltr
child: RenderSliverGrid#c63a7 NEEDS-LAYOUT NEEDS-PAINT
parentData: paintOffset=Offset(0.0, 0.0)
constraints: MISSING
geometry: null
no children current live
RenderObject: RenderViewport#b2180 NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
needs compositing
parentData: (can use size)
constraints: BoxConstraints(0.0<=w<=360.0, 0.0<=h<=Infinity)
size: MISSING
axisDirection: right
crossAxisDirection: down
offset: ScrollPositionWithSingleContext#99c5c(offset: 0.0, range: null..null, viewport: null, ScrollableState, ClampingScrollPhysics -> RangeMaintainingScrollPhysics, IdleScrollActivity#7728b, ScrollDirection.idle)
anchor: 0.0
center child: RenderSliverPadding#03569 NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
parentData: paintOffset=Offset(0.0, 0.0)
constraints: MISSING
geometry: null
padding: EdgeInsets.zero
textDirection: ltr
child: RenderSliverGrid#c63a7 NEEDS-LAYOUT NEEDS-PAINT
parentData: paintOffset=Offset(0.0, 0.0)
constraints: MISSING
geometry: null
no children current live
════════════════════════════════════════════════════════════════════════════════
════════ Exception caught by rendering library ═════════════════════════════════
RenderBox was not laid out: RenderViewport#b2180 NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
'package:flutter/src/rendering/box.dart':
Failed assertion: line 2164 pos 12: 'hasSize'
The relevant error-causing widget was:
GridView GridView:file:///C:/Users/DELL/clean%20Articucture/learning/lib/Presentation/Screens/detail_screen.dart:88:37
════════════════════════════════════════════════════════════════════════════════
════════ Exception caught by rendering library ═════════════════════════════════
RenderBox was not laid out: RenderViewport#b2180 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
'package:flutter/src/rendering/box.dart':
Failed assertion: line 2164 pos 12: 'hasSize'
The relevant error-causing widget was:
GridView GridView:file:///C:/Users/DELL/clean%20Articucture/learning/lib/Presentation/Screens/detail_screen.dart:88:37
════════════════════════════════════════════════════════════════════════════════
════════ Exception caught by rendering library ═════════════════════════════════
RenderBox was not laid out: RenderIgnorePointer#bb503 relayoutBoundary=up19 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
'package:flutter/src/rendering/box.dart':
Failed assertion: line 2164 pos 12: 'hasSize'
The relevant error-causing widget was:
GridView GridView:file:///C:/Users/DELL/clean%20Articucture/learning/lib/Presentation/Screens/detail_screen.dart:88:37
════════════════════════════════════════════════════════════════════════════════
════════ Exception caught by rendering library ═════════════════════════════════
RenderBox was not laid out: RenderSemanticsAnnotations#10f33 relayoutBoundary=up18 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
'package:flutter/src/rendering/box.dart':
Failed assertion: line 2164 pos 12: 'hasSize'
The relevant error-causing widget was:
GridView GridView:file:///C:/Users/DELL/clean%20Articucture/learning/lib/Presentation/Screens/detail_screen.dart:88:37
════════════════════════════════════════════════════════════════════════════════
════════ Exception caught by rendering library ═════════════════════════════════
RenderBox was not laid out: RenderPointerListener#eaff0 relayoutBoundary=up17 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
'package:flutter/src/rendering/box.dart':
Failed assertion: line 2164 pos 12: 'hasSize'
The relevant error-causing widget was:
GridView GridView:file:///C:/Users/DELL/clean%20Articucture/learning/lib/Presentation/Screens/detail_screen.dart:88:37
════════════════════════════════════════════════════════════════════════════════
════════ Exception caught by rendering library ═════════════════════════════════
RenderBox was not laid out: RenderSemanticsGestureHandler#c5579 relayoutBoundary=up16 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
'package:flutter/src/rendering/box.dart':
Failed assertion: line 2164 pos 12: 'hasSize'
The relevant error-causing widget was:
GridView GridView:file:///C:/Users/DELL/clean%20Articucture/learning/lib/Presentation/Screens/detail_screen.dart:88:37
════════════════════════════════════════════════════════════════════════════════
════════ Exception caught by rendering library ═════════════════════════════════
RenderBox was not laid out: RenderPointerListener#e4ac7 relayoutBoundary=up15 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
'package:flutter/src/rendering/box.dart':
Failed assertion: line 2164 pos 12: 'hasSize'
The relevant error-causing widget was:
GridView GridView:file:///C:/Users/DELL/clean%20Articucture/learning/lib/Presentation/Screens/detail_screen.dart:88:37
════════════════════════════════════════════════════════════════════════════════
════════ Exception caught by rendering library ═════════════════════════════════
RenderBox was not laid out: _RenderScrollSemantics#d275c relayoutBoundary=up14 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
'package:flutter/src/rendering/box.dart':
Failed assertion: line 2164 pos 12: 'hasSize'
The relevant error-causing widget was:
GridView GridView:file:///C:/Users/DELL/clean%20Articucture/learning/lib/Presentation/Screens/detail_screen.dart:88:37
════════════════════════════════════════════════════════════════════════════════
════════ Exception caught by rendering library ═════════════════════════════════
RenderBox was not laid out: RenderTransform#1aa76 relayoutBoundary=up13 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
'package:flutter/src/rendering/box.dart':
Failed assertion: line 2164 pos 12: 'hasSize'
The relevant error-causing widget was:
GridView GridView:file:///C:/Users/DELL/clean%20Articucture/learning/lib/Presentation/Screens/detail_screen.dart:88:37
════════════════════════════════════════════════════════════════════════════════
════════ Exception caught by rendering library ═════════════════════════════════
RenderBox was not laid out: RenderClipRect#bf61c relayoutBoundary=up12 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
'package:flutter/src/rendering/box.dart':
Failed assertion: line 2164 pos 12: 'hasSize'
The relevant error-causing widget was:
SizedBox SizedBox:file:///C:/Users/DELL/clean%20Articucture/learning/lib/Presentation/Screens/detail_screen.dart:87:19
════════════════════════════════════════════════════════════════════════════════
════════ Exception caught by rendering library ═════════════════════════════════
RenderBox was not laid out: RenderConstrainedBox#0405c relayoutBoundary=up11 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
'package:flutter/src/rendering/box.dart':
Failed assertion: line 2164 pos 12: 'hasSize'
The relevant error-causing widget was:
Column Column:file:///C:/Users/DELL/clean%20Articucture/learning/lib/Presentation/Screens/detail_screen.dart:38:22
════════════════════════════════════════════════════════════════════════════════
════════ Exception caught by rendering library ═════════════════════════════════
RenderBox was not laid out: RenderFlex#145e1 relayoutBoundary=up10 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
'package:flutter/src/rendering/box.dart':
Failed assertion: line 2164 pos 12: 'hasSize'
The relevant error-causing widget was:
SingleChildScrollView SingleChildScrollView:file:///C:/Users/DELL/clean%20Articucture/learning/lib/Presentation/Screens/detail_screen.dart:37:20
════════════════════════════════════════════════════════════════════════════════
════════ Exception caught by rendering library ═════════════════════════════════
RenderBox was not laid out: _RenderSingleChildViewport#abfe6 relayoutBoundary=up9 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
'package:flutter/src/rendering/box.dart':
Failed assertion: line 2164 pos 12: 'hasSize'
The relevant error-causing widget was:
SingleChildScrollView SingleChildScrollView:file:///C:/Users/DELL/clean%20Articucture/learning/lib/Presentation/Screens/detail_screen.dart:37:20
════════════════════════════════════════════════════════════════════════════════
════════ Exception caught by rendering library ═════════════════════════════════
RenderBox was not laid out: RenderIgnorePointer#a1e3c relayoutBoundary=up8 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
'package:flutter/src/rendering/box.dart':
Failed assertion: line 2164 pos 12: 'hasSize'
The relevant error-causing widget was:
SingleChildScrollView SingleChildScrollView:file:///C:/Users/DELL/clean%20Articucture/learning/lib/Presentation/Screens/detail_screen.dart:37:20
════════════════════════════════════════════════════════════════════════════════
════════ Exception caught by rendering library ═════════════════════════════════
RenderBox was not laid out: RenderSemanticsAnnotations#e9c96 relayoutBoundary=up7 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
'package:flutter/src/rendering/box.dart':
Failed assertion: line 2164 pos 12: 'hasSize'
The relevant error-causing widget was:
SingleChildScrollView SingleChildScrollView:file:///C:/Users/DELL/clean%20Articucture/learning/lib/Presentation/Screens/detail_screen.dart:37:20
════════════════════════════════════════════════════════════════════════════════
════════ Exception caught by rendering library ═════════════════════════════════
RenderBox was not laid out: RenderPointerListener#6f78e relayoutBoundary=up6 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
'package:flutter/src/rendering/box.dart':
Failed assertion: line 2164 pos 12: 'hasSize'
The relevant error-causing widget was:
SingleChildScrollView SingleChildScrollView:file:///C:/Users/DELL/clean%20Articucture/learning/lib/Presentation/Screens/detail_screen.dart:37:20
════════════════════════════════════════════════════════════════════════════════
════════ Exception caught by rendering library ═════════════════════════════════
RenderBox was not laid out: RenderSemanticsGestureHandler#e5f4c relayoutBoundary=up5 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
'package:flutter/src/rendering/box.dart':
Failed assertion: line 2164 pos 12: 'hasSize'
The relevant error-causing widget was:
SingleChildScrollView SingleChildScrollView:file:///C:/Users/DELL/clean%20Articucture/learning/lib/Presentation/Screens/detail_screen.dart:37:20
════════════════════════════════════════════════════════════════════════════════
════════ Exception caught by rendering library ═════════════════════════════════
RenderBox was not laid out: RenderPointerListener#d9bb2 relayoutBoundary=up4 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
'package:flutter/src/rendering/box.dart':
Failed assertion: line 2164 pos 12: 'hasSize'
The relevant error-causing widget was:
SingleChildScrollView SingleChildScrollView:file:///C:/Users/DELL/clean%20Articucture/learning/lib/Presentation/Screens/detail_screen.dart:37:20
════════════════════════════════════════════════════════════════════════════════
════════ Exception caught by rendering library ═════════════════════════════════
RenderBox was not laid out: _RenderScrollSemantics#2310b relayoutBoundary=up3 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
'package:flutter/src/rendering/box.dart':
Failed assertion: line 2164 pos 12: 'hasSize'
The relevant error-causing widget was:
SingleChildScrollView SingleChildScrollView:file:///C:/Users/DELL/clean%20Articucture/learning/lib/Presentation/Screens/detail_screen.dart:37:20
════════════════════════════════════════════════════════════════════════════════
════════ Exception caught by rendering library ═════════════════════════════════
RenderBox was not laid out: RenderTransform#ccea8 relayoutBoundary=up2 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
'package:flutter/src/rendering/box.dart':
Failed assertion: line 2164 pos 12: 'hasSize'
The relevant error-causing widget was:
SingleChildScrollView SingleChildScrollView:file:///C:/Users/DELL/clean%20Articucture/learning/lib/Presentation/Screens/detail_screen.dart:37:20
════════════════════════════════════════════════════════════════════════════════
════════ Exception caught by rendering library ═════════════════════════════════
RenderBox was not laid out: RenderClipRect#1ed86 relayoutBoundary=up1 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
'package:flutter/src/rendering/box.dart':
Failed assertion: line 2164 pos 12: 'hasSize'
The relevant error-causing widget was:
Scaffold Scaffold:file:///C:/Users/DELL/clean%20Articucture/learning/lib/Presentation/Screens/detail_screen.dart:18:12
════════════════════════════════════════════════════════════════════════════════
════════ Exception caught by rendering library ═════════════════════════════════
RenderBox was not laid out: RenderTransform#ccea8 relayoutBoundary=up2
'package:flutter/src/rendering/box.dart':
Failed assertion: line 2164 pos 12: 'hasSize'
The relevant error-causing widget was:
SingleChildScrollView SingleChildScrollView:file:///C:/Users/DELL/clean%20Articucture/learning/lib/Presentation/Screens/detail_screen.dart:37:20
════════════════════════════════════════════════════════════════════════════════
The error you're encountering is a common issue in Flutter when dealing with nested scrollable widgets. Let's break down the problem and provide a comprehensive solution.
Understanding the Error
Primary Error:
code
Horizontal viewport was given unbounded height.
Explanation:
A GridView (a scrollable widget) is being placed inside a SingleChildScrollView or another scrollable widget without proper constraints. Flutter's rendering system requires scrollable widgets to have bounded (finite) constraints in the non-scrolling direction. When a scrollable widget like GridView is placed inside another scrollable widget without constraints, Flutter doesn't know how much space to allocate, leading to unbounded constraints and the subsequent errors you've observed.
Common Causes:
Nested Scrollables: Placing a GridView inside a SingleChildScrollView or another GridView/ListView.
Lack of Constraints: Not providing explicit size constraints to the GridView.
Incorrect Axis Configuration: Mismatched scroll directions that lead to unbounded constraints.
Solution Steps
1. Avoid Nesting Scrollable Widgets
If possible, avoid placing a GridView inside a SingleChildScrollView or another scrollable widget. Instead, use a single scrollable widget to handle all your content.
2. Use shrinkWrap and physics Properties
If you need to nest a GridView inside a SingleChildScrollView, adjust the GridView properties to handle unbounded constraints.
Example:
dart
SingleChildScrollView(
child: Column(
children: [
// Other widgets
GridView.builder(
shrinkWrap: true, // Adds size based on content
physics: NeverScrollableScrollPhysics(), // Disables GridView's own scrolling
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: 2, // Adjust as needed
childAspectRatio: 3 / 2, // Adjust as needed
),
itemCount: yourItemCount,
itemBuilder: (context, index) {
return YourGridItemWidget();
},
),
// Other widgets
],
),
)
Explanation:
shrinkWrap: true: Tells the GridView to take only the necessary space based on its children, rather than expanding to fill the available space.
physics: NeverScrollableScrollPhysics(): Disables the GridView's scrolling, allowing the outer SingleChildScrollView to handle all scrolling.
3. Provide Explicit Constraints
If the GridView must have a specific height, wrap it in a Container or SizedBox with a defined height.
Example:
dart
SingleChildScrollView(
child: Column(
children: [
// Other widgets
SizedBox(
height: 300, // Set a specific height
child: GridView.builder(
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: 2, // Adjust as needed
childAspectRatio: 3 / 2, // Adjust as needed
),
itemCount: yourItemCount,
itemBuilder: (context, index) {
return YourGridItemWidget();
},
),
),
// Other widgets
],
),
)
Explanation:
By wrapping the GridView in a SizedBox with a fixed height, you provide it with bounded constraints, allowing Flutter to layout the widget correctly.
4. Use Alternative Widgets
Depending on your UI requirements, consider using widgets like SliverGrid within a CustomScrollView to handle complex scrolling scenarios more efficiently.
Explanation:
Using SliverGrid within a CustomScrollView provides better performance and more control over the scrolling behavior, especially for complex UIs.
Best Practices to Avoid Similar Issues
Understand Flutter's Layout Constraints:
Widgets need to know their size either through constraints from parent widgets or by defining their own constraints.
Scrollable widgets like GridView and ListView require bounded constraints in the non-scrolling direction.
Avoid Unbounded Constraints:
Widgets inside scrollable parents (like Column inside SingleChildScrollView) should have constraints if they are scrollable themselves.
Use Expanded and Flexible Appropriately:
When using these within Row or Column, ensure that the widgets can expand or contract based on available space without causing layout issues.
Leverage Flutter's Debugging Tools:
Utilize Flutter's widget inspector to visualize widget constraints and layouts.
The error you're experiencing stems from the GridView not having bounded vertical constraints within a scrollable parent. By adjusting the GridView properties (shrinkWrap and physics), providing explicit constraints, or restructuring your widget tree to use appropriate scrollable widgets, you can resolve this issue.
If you need further assistance, please provide a snippet of your detail_screen.dart, especially around the GridView implementation, so I can offer more tailored guidance.