fluttercandies/waterfall_flow

NoSuchMethodError: The getter 'height' was called on null. Receiver: null Tried calling: height

lifelikejuly opened this issue · 2 comments

I know waterfall_flow widget extend sliver_multi_box_adaptor.dart.
I find error but can't reproduce it. see log:


#0 RenderSliverMultiBoxAdaptor.paintExtentOf (package:flutter/src/rendering/sliver_multi_box_adaptor.dart:554)
--
2 #1 _CrossAxisChildrenData.insertLeading (package:waterfall_flow/src/rendering/sliver_waterfall_flow.dart:911)
3 #2 RenderSliverWaterfallFlow.performLayout (package:waterfall_flow/src/rendering/sliver_waterfall_flow.dart:447)
4 #3 RenderObject.layout (package:flutter/src/rendering/object.dart:1767)
5 #4 RenderSliverEdgeInsetsPadding.performLayout (package:flutter/src/rendering/sliver_padding.dart:135)
6 #5 <optimized out> (<optimized out>:375)
7 #6 RenderObject.layout (package:flutter/src/rendering/object.dart:1767)
8 #7 RenderViewportBase.layoutChildSequence (package:flutter/src/rendering/viewport.dart:452)
9 #8 RenderViewport._attemptLayout (package:flutter/src/rendering/viewport.dart:1444)
10 #9 <optimized out> (<optimized out>:1353)
11 #10 RenderObject._layoutWithoutResize (package:flutter/src/rendering/object.dart:1630)
12 #11 PipelineOwner.flushLayout (package:flutter/src/rendering/object.dart:887)
13 #12 RendererBinding.drawFrame (package:flutter/src/rendering/binding.dart:402)
14 #13 WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:884)
15 #14 RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:284)
16 #15 SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1113)
17 #16 SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:1052)
18 #17 SchedulerBinding._handleDrawFrame (package:flutter/src/scheduler/binding.dart:968)
19 #18 _rootRun (dart:async/zone.dart:1184)
20 #19 _CustomZone.run (dart:async/zone.dart:1077)
21 #20 _CustomZone.runGuarded (dart:async/zone.dart:979)
22 #21 _invoke (dart:ui/hooks.dart:261)
23 #22 _drawFrame (dart:ui/hooks.dart:219)


flutter issue
Maybe how to avoid this error.

Then add judgment insertLeading Function like this

903      // This child is after the leadings.
904      if (leading == null || data.index > leading.index || child.size == null) {
905       return;
      }

no demo?

no demo?

Sorry The problem occur in production Environment Project. I try to add judgment wait next project version whether have same error. I guess it would happen when add new Item into waterfall,I try copy production Environment Project code to mock.