Get this as a message when clicking on the Next button.
════════ Exception caught by rendering library ═════════════════════════════════
The following assertion was thrown during performLayout():
Assertion failed:
firstIndex == 0 || childScrollOffset(firstChild!)! - scrollOffset <= precisionErrorTolerance
is not true
The relevant error-causing widget was
IntroductionScreen-[LabeledGlobalKey<IntroductionScreenState>#1ed5a]
When the exception was thrown, this was the stack
C:/b/s/w/ir/cache/builder/src/out/host_debug/dart-sdk/lib/internal/js_dev_runtime/private/ddc_runtime/errors.dart 236:49 throw
C:/b/s/w/ir/cache/builder/src/out/host_debug/dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart 29:3 assertFailed
packages/flutter/src/rendering/sliver_fixed_extent_list.dart 270:77 performLayout
packages/flutter/src/rendering/object.dart 1779:7 layout
packages/flutter/src/rendering/sliver_padding.dart 137:5 performLayout
...
The following RenderObject was being processed when the exception was fired: RenderSliverFillViewport#86a84 relayoutBoundary=up2 NEEDS-LAYOUT NEEDS-COMPOSITING-BITS-UPDATE
RenderObject: RenderSliverFillViewport#86a84 relayoutBoundary=up2 NEEDS-LAYOUT NEEDS-COMPOSITING-BITS-UPDATE
needs compositing
parentData: paintOffset=Offset(0.0, 0.0) (can use size)
constraints: SliverConstraints(AxisDirection.right, GrowthDirection.forward, ScrollDirection.idle, scrollOffset: 500.0, remainingPaintExtent: 500.0, crossAxisExtent: 583.3, crossAxisDirection: AxisDirection.down, viewportMainAxisExtent: 500.0, remainingCacheExtent: 500.0, cacheOrigin: 0.0)
geometry: SliverGeometry(scrollExtent: 2000.0, paintExtent: 500.0, maxPaintExtent: 2000.0, hasVisualOverflow: true, cacheExtent: 500.0)
scrollExtent: 2000.0
paintExtent: 500.0
maxPaintExtent: 2000.0
hasVisualOverflow: true
cacheExtent: 500.0
currently live children: 1 to 1
child with index 1: RenderIndexedSemantics#a7310
needs compositing
parentData: index=1; keepAlive; layoutOffset=500.0
constraints: BoxConstraints(w=500.0, h=583.3)
semantic boundary
size: Size(500.0, 583.3)
index: 1
child: RenderRepaintBoundary#8bae2
needs compositing
parentData: (can use size)
constraints: BoxConstraints(w=500.0, h=583.3)
layer: OffsetLayer#d59ff
engine layer: OffsetEngineLayer#9c469
offset: Offset(0.1, 0.0)
size: Size(500.0, 583.3)
metrics: 96.3% useful (1 bad vs 26 good)
diagnosis: this is an outstandingly useful repaint boundary and should definitely be kept
child: RenderPadding#62d49
needs compositing
parentData: (can use size)
constraints: BoxConstraints(w=500.0, h=583.3)
size: Size(500.0, 583.3)
padding: EdgeInsets.zero
textDirection: ltr
child: RenderPadding#10557
needs compositing
parentData: offset=Offset(0.0, 0.0) (can use size)
constraints: BoxConstraints(w=500.0, h=583.3)
size: Size(500.0, 583.3)
padding: EdgeInsets(0.0, 0.0, 0.0, 60.0)
textDirection: ltr
child with index 0 (kept alive but not laid out): RenderIndexedSemantics#de945
needs compositing
parentData: index=0; keepAlive; layoutOffset=0.0
constraints: BoxConstraints(w=500.0, h=583.3)
semantic boundary
size: Size(500.0, 583.3)
index: 0
child: RenderRepaintBoundary#cd89d
needs compositing
parentData: (can use size)
constraints: BoxConstraints(w=500.0, h=583.3)
layer: OffsetLayer#93293
engine layer: OffsetEngineLayer#b6c9d
offset: Offset(-499.9, 0.0)
size: Size(500.0, 583.3)
metrics: 95.2% useful (1 bad vs 20 good)
diagnosis: this is an outstandingly useful repaint boundary and should definitely be kept
child: RenderPadding#500c5
needs compositing
parentData: (can use size)
constraints: BoxConstraints(w=500.0, h=583.3)
size: Size(500.0, 583.3)
padding: EdgeInsets.zero
textDirection: ltr
child: RenderPadding#cf691
needs compositing
parentData: offset=Offset(0.0, 0.0) (can use size)
constraints: BoxConstraints(w=500.0, h=583.3)
size: Size(500.0, 583.3)
padding: EdgeInsets(0.0, 0.0, 0.0, 60.0)
textDirection: ltr
child with index 2 (kept alive but not laid out): RenderIndexedSemantics#dc12f
needs compositing
parentData: index=2; keepAlive; layoutOffset=1000.0
constraints: BoxConstraints(w=500.0, h=583.3)
semantic boundary
size: Size(500.0, 583.3)
index: 2
child: RenderRepaintBoundary#6feef
needs compositing
parentData: (can use size)
constraints: BoxConstraints(w=500.0, h=583.3)
layer: OffsetLayer#d2623 DETACHED
engine layer: OffsetEngineLayer#07e54
offset: Offset(-499.8, 0.0)
size: Size(500.0, 583.3)
metrics: 92.3% useful (1 bad vs 12 good)
diagnosis: this is an outstandingly useful repaint boundary and should definitely be kept
child: RenderPadding#b6774
needs compositing
parentData: (can use size)
constraints: BoxConstraints(w=500.0, h=583.3)
size: Size(500.0, 583.3)
padding: EdgeInsets.zero
textDirection: ltr
child: RenderPadding#79d61
needs compositing
parentData: offset=Offset(0.0, 0.0) (can use size)
constraints: BoxConstraints(w=500.0, h=583.3)
size: Size(500.0, 583.3)
padding: EdgeInsets(0.0, 0.0, 0.0, 60.0)
textDirection: ltr
child with index 3 (kept alive but not laid out): RenderIndexedSemantics#4eaef
needs compositing
parentData: index=3; keepAlive; layoutOffset=1500.0
constraints: BoxConstraints(w=500.0, h=583.3)
semantic boundary
size: Size(500.0, 583.3)
index: 3
child: RenderRepaintBoundary#8b975
needs compositing
parentData: (can use size)
constraints: BoxConstraints(w=500.0, h=583.3)
layer: OffsetLayer#1f0c5 DETACHED
engine layer: OffsetEngineLayer#f1c7b
offset: Offset(0.0, 0.0)
size: Size(500.0, 583.3)
metrics: 80.0% useful (1 bad vs 4 good)
diagnosis: this is a useful repaint boundary and should be kept
child: RenderPadding#ca787
needs compositing
parentData: (can use size)
constraints: BoxConstraints(w=500.0, h=583.3)
size: Size(500.0, 583.3)
padding: EdgeInsets.zero
textDirection: ltr
child: RenderPadding#bf9aa
needs compositing
parentData: offset=Offset(0.0, 0.0) (can use size)
constraints: BoxConstraints(w=500.0, h=583.3)
size: Size(500.0, 583.3)
padding: EdgeInsets(0.0, 0.0, 0.0, 60.0)
textDirection: ltr
════════════════════════════════════════════════════════════════════════════════
same here, using the example
Same for me too:
════════ Exception caught by rendering library ═════════════════════════════════
'package:flutter/src/rendering/sliver_fixed_extent_list.dart': Failed assertion: line 270 pos 12: 'firstIndex == 0 || childScrollOffset(firstChild!)! - scrollOffset <= precisionErrorTolerance': is not true.
The relevant error-causing widget was
IntroductionScreen-[LabeledGlobalKey<IntroductionScreenState>#aed2d]
lib/…/onboarding/onboarding.dart:47
════════════════════════════════════════════════════════════════════════════════
Sep 10
'21 20:09
vnl
Mine fails too.
Possible solution:
Set curve
to the default value (i.e don't give curve
a value or set curve = Curves.easeIn
).
This seems to fix mine.
Same problem here, @peterbrown0 your solution fixed it. Thanks!
Hi, sorry I don't have a solution for this, I keep this issue open.
Apparently @peterbrown0's solution works.
Hi all,
I'm going to close this as its been over a year now and we presume you're all OK?
If not, please re-open.
Thanks,
Gavin.