======== Exception caught by rendering library =====================================================
The following assertion was thrown during performLayout():
RenderBox.size accessed beyond the scope of resize, layout, or permitted parent access. RenderBox can always access its own size, otherwise, the only object that is allowed to read RenderBox.size is its parent, if they have said they will. It you hit this assert trying to access a child's size, pass "parentUsesSize: true" to that child's layout().
'package:flutter/src/rendering/box.dart':
Failed assertion: line 1792 pos 13: 'debugDoingThisResize || debugDoingThisLayout ||
(RenderObject.debugActiveLayout == parent && _size._canBeUsedByParent)'
Either the assertion indicates an error in the framework itself, or we should provide substantially more information in this error message to help you determine and fix the underlying cause.
In either case, please report this assertion by filing a bug on GitHub:
https://github.com/flutter/flutter/issues/new?template=BUG.md
The relevant error-causing widget was:
CustomScrollView-[LabeledGlobalKey<_RectGetterState>#53311] file:///C:/Users/Admin/Documents/repo/edu/lib/ui/pages/home/home_course/class_detail_page.dart:286:30
When the exception was thrown, this was the stack:
#2 RenderBox.size.<anonymous closure> (package:flutter/src/rendering/box.dart:1792:13)
#3 RenderBox.size (package:flutter/src/rendering/box.dart:1805:6)
#4 RenderFractionalTranslation.applyPaintTransform (package:flutter/src/rendering/proxy_box.dart:2626:24)
#5 RenderObject.getTransformTo (package:flutter/src/rendering/object.dart:2392:24)
#6 RectGetter.getRectFromKey (package:rect_getter/rect_getter.dart:20:31)
...
The following RenderObject was being processed when the exception was fired: RenderViewport#1950b NEEDS-LAYOUT NEEDS-PAINT
... needs compositing
... parentData: <none> (can use size)
... constraints: BoxConstraints(0.0<=w<=392.7, 0.0<=h<=707.8)
... layer: OffsetLayer#b4153
... engine layer: OffsetEngineLayer#7c566
... offset: Offset(0.0, 0.0)
... size: Size(392.7, 707.8)
... axisDirection: down
... crossAxisDirection: right
... offset: ScrollPositionWithSingleContext#b1a8f(offset: 4511.0, range: 0.0..303.2, viewport: 707.8, ScrollableState, ClampingScrollPhysics -> RangeMaintainingScrollPhysics, BallisticScrollActivity#03274(AnimationController#6e006(▶ 4510.978; for BallisticScrollActivity)), ScrollDirection.idle)
... anchor: 0.0
RenderObject: RenderViewport#1950b NEEDS-LAYOUT NEEDS-PAINT
needs compositing
parentData: <none> (can use size)
constraints: BoxConstraints(0.0<=w<=392.7, 0.0<=h<=707.8)
layer: OffsetLayer#b4153
engine layer: OffsetEngineLayer#7c566
offset: Offset(0.0, 0.0)
size: Size(392.7, 707.8)
axisDirection: down
crossAxisDirection: right
offset: ScrollPositionWithSingleContext#b1a8f(offset: 4511.0, range: 0.0..303.2, viewport: 707.8, ScrollableState, ClampingScrollPhysics -> RangeMaintainingScrollPhysics, BallisticScrollActivity#03274(AnimationController#6e006(▶ 4510.978; for BallisticScrollActivity)), ScrollDirection.idle)
anchor: 0.0
... center child: RenderSliverToBoxAdapter#d2926 relayoutBoundary=up1 NEEDS-PAINT
... needs compositing
... parentData: paintOffset=Offset(0.0, 0.0) (can use size)
... constraints: SliverConstraints(AxisDirection.down, GrowthDirection.forward, ScrollDirection.idle, scrollOffset: 4511.0, remainingPaintExtent: 707.8, crossAxisExtent: 392.7, crossAxisDirection: AxisDirection.right, viewportMainAxisExtent: 707.8, remainingCacheExtent: 1207.8, cacheOrigin: -250.0)
... geometry: SliverGeometry(scrollExtent: 360.0, hidden, maxPaintExtent: 360.0, hasVisualOverflow: true)
... scrollExtent: 360.0
... hidden
... maxPaintExtent: 360.0
... hasVisualOverflow: true
... child: RenderFlex#ef6f1 relayoutBoundary=up2
... needs compositing
... parentData: paintOffset=Offset(0.0, -4511.0) (can use size)
... constraints: BoxConstraints(w=392.7, 0.0<=h<=Infinity)
... size: Size(392.7, 360.0)
... direction: vertical
... mainAxisAlignment: start
... mainAxisSize: max
... crossAxisAlignment: center
... verticalDirection: down
... child 1: RenderStack#bdb03 relayoutBoundary=up3
... parentData: offset=Offset(0.0, 0.0); flex=null; fit=null (can use size)
... constraints: BoxConstraints(0.0<=w<=392.7, 0.0<=h<=Infinity)
... size: Size(392.7, 165.0)
... alignment: AlignmentDirectional.topStart
... textDirection: ltr
... fit: loose
... child 1: RenderPadding#892df relayoutBoundary=up4
... parentData: not positioned; offset=Offset(0.0, 0.0) (can use size)
... constraints: BoxConstraints(0.0<=w<=392.7, 0.0<=h<=Infinity)
... size: Size(392.7, 165.0)
... padding: EdgeInsets(15.0, 0.0, 15.0, 0.0)
... textDirection: ltr
... child 2: RenderLimitedBox#9f74d relayoutBoundary=up4
... parentData: not positioned; offset=Offset(0.0, 0.0) (can use size)
... constraints: BoxConstraints(0.0<=w<=392.7, 0.0<=h<=Infinity)
... size: Size(392.7, 0.0)
... maxWidth: 0.0
... maxHeight: 0.0
... child 2: RenderOffstage#f2a8e
... parentData: offset=Offset(196.4, 165.0); flex=null; fit=null (can use size)
... constraints: BoxConstraints(0.0<=w<=392.7, 0.0<=h<=Infinity)
... size: Size(0.0, 0.0)
... offstage: true
... child: RenderLimitedBox#8f7db NEEDS-PAINT
... parentData: <none>
... constraints: BoxConstraints(0.0<=w<=392.7, 0.0<=h<=Infinity)
... size: Size(392.7, 0.0)
... maxWidth: 0.0
... maxHeight: 0.0
... child 3: RenderPadding#bafa6 relayoutBoundary=up3
... needs compositing
... parentData: offset=Offset(0.0, 165.0); flex=null; fit=null (can use size)
... constraints: BoxConstraints(0.0<=w<=392.7, 0.0<=h<=Infinity)
... size: Size(392.7, 190.0)
... padding: EdgeInsets(15.0, 12.0, 15.0, 13.0)
... textDirection: ltr
... child: RenderFlex#9f4ff relayoutBoundary=up4
... needs compositing
... parentData: offset=Offset(15.0, 12.0) (can use size)
... constraints: BoxConstraints(0.0<=w<=362.7, 0.0<=h<=Infinity)
... size: Size(362.7, 165.0)
... direction: vertical
... mainAxisAlignment: start
... mainAxisSize: max
... crossAxisAlignment: center
... verticalDirection: down
... child 4: RenderConstrainedBox#e910e relayoutBoundary=up3
... parentData: offset=Offset(0.0, 355.0); flex=null; fit=null (can use size)
... constraints: BoxConstraints(0.0<=w<=392.7, 0.0<=h<=Infinity)
... size: Size(392.7, 5.0)
... additionalConstraints: BoxConstraints(0.0<=w<=Infinity, h=5.0)
... child: _RenderColoredBox#8305c relayoutBoundary=up4
... parentData: <none> (can use size)
... constraints: BoxConstraints(0.0<=w<=392.7, h=5.0)
... size: Size(392.7, 5.0)
... behavior: opaque
... child 5: RenderLimitedBox#b4f84 relayoutBoundary=up3
... parentData: offset=Offset(0.0, 360.0); flex=null; fit=null (can use size)
... constraints: BoxConstraints(0.0<=w<=392.7, 0.0<=h<=Infinity)
... size: Size(392.7, 0.0)
... maxWidth: 0.0
... maxHeight: 0.0
... child: RenderConstrainedBox#e44a1 relayoutBoundary=up4
... parentData: <none> (can use size)
... constraints: BoxConstraints(0.0<=w<=392.7, h=0.0)
... size: Size(392.7, 0.0)
... additionalConstraints: BoxConstraints(biggest)
... child 1: RenderSliverList#886fb relayoutBoundary=up1 NEEDS-PAINT
... needs compositing
... parentData: paintOffset=Offset(0.0, 0.0) (can use size)
... constraints: SliverConstraints(AxisDirection.down, GrowthDirection.forward, ScrollDirection.idle, scrollOffset: 4151.0, remainingPaintExtent: 707.8, crossAxisExtent: 392.7, crossAxisDirection: AxisDirection.right, viewportMainAxisExtent: 707.8, remainingCacheExtent: 1207.8, cacheOrigin: -250.0)
... geometry: SliverGeometry(scrollExtent: 651.0, hidden, maxPaintExtent: 651.0)
... scrollExtent: 651.0
... hidden
... maxPaintExtent: 651.0
... currently live children: 2 to 2
... child with index 2: RenderIndexedSemantics#c7b1c relayoutBoundary=up2 NEEDS-PAINT
... needs compositing
... parentData: index=2; layoutOffset=480.0 (can use size)
... constraints: BoxConstraints(w=392.7, 0.0<=h<=Infinity)
... semantic boundary
... size: Size(392.7, 171.0)
... index: 2
... child: RenderRepaintBoundary#aa7b5 relayoutBoundary=up3 NEEDS-PAINT
... needs compositing
... parentData: <none> (can use size)
... constraints: BoxConstraints(w=392.7, 0.0<=h<=Infinity)
... layer: OffsetLayer#af872
... engine layer: OffsetEngineLayer#3e479
... offset: Offset(0.0, -3671.0)
... size: Size(392.7, 171.0)
... metrics: 94.4% useful (5 bad vs 84 good)
... diagnosis: this is an outstandingly useful repaint boundary and should definitely be kept
... child: RenderDecoratedBox#5742d relayoutBoundary=up4 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
... parentData: <none> (can use size)
... constraints: BoxConstraints(w=392.7, 0.0<=h<=Infinity)
... size: Size(392.7, 171.0)
... decoration: BoxDecoration
... configuration: ImageConfiguration(bundle: PlatformAssetBundle#35372(), devicePixelRatio: 2.8, locale: zh, textDirection: TextDirection.ltr, platform: android)
======== Exception caught by rendering library =====================================================
The following assertion was thrown during performLayout():
'package:flutter/src/widgets/scroll_position.dart': Failed assertion: line 504 pos 12: 'haveDimensions == (_lastMetrics != null)': is not true.
Either the assertion indicates an error in the framework itself, or we should provide substantially more information in this error message to help you determine and fix the underlying cause.
In either case, please report this assertion by filing a bug on GitHub:
https://github.com/flutter/flutter/issues/new?template=BUG.md
The relevant error-causing widget was:
CustomScrollView-[LabeledGlobalKey<_RectGetterState>#53311] file:///C:/Users/Admin/Documents/repo/edu/lib/ui/pages/home/home_course/class_detail_page.dart:286:30
When the exception was thrown, this was the stack:
#2 ScrollPosition.applyContentDimensions (package:flutter/src/widgets/scroll_position.dart:504:12)
#3 RenderViewport.performLayout (package:flutter/src/rendering/viewport.dart:1474:20)
#4 RenderObject._layoutWithoutResize (package:flutter/src/rendering/object.dart:1634:7)
#5 PipelineOwner.flushLayout (package:flutter/src/rendering/object.dart:884:18)
#6 RendererBinding.drawFrame (package:flutter/src/rendering/binding.dart:436:19)
...