Closed pastordougdev closed 4 years ago
I am just beginning to work with the RangeSlider widget. When trying to render a simple RangeSlider, encountering the following:
══╡ EXCEPTION CAUGHT BY RENDERING LIBRARY ╞═════════════════════════════════════════════════════════ The following NoSuchMethodError was thrown during paint(): The getter 'isEmpty' was called on null. Receiver: null Tried calling: isEmpty When the exception was thrown, this was the stack: #0 Object.noSuchMethod (dart:core-patch/object_patch.dart:51:5) #1 RoundSliderThumbShape.paint (package:flutter/src/material/slider_theme.dart:2395:30) #2 _RenderRangeSlider._paintThumbs (package:flutter_range_slider/src/flutter_range_slider.dart:1043:29) #3 _RenderRangeSlider.paint (package:flutter_range_slider/src/flutter_range_slider.dart:914:5) #4 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2266:7) #5 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:186:13) #6 RenderShiftedBox.paint (package:flutter/src/rendering/shifted_box.dart:72:15) #7 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2266:7) #8 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:186:13) #9 RenderBoxContainerDefaultsMixin.defaultPaint (package:flutter/src/rendering/box.dart:2525:15) #10 RenderFlex.paint (package:flutter/src/rendering/flex.dart:969:7) #11 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2266:7) #12 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:186:13) #13 RenderBoxContainerDefaultsMixin.defaultPaint (package:flutter/src/rendering/box.dart:2525:15) #14 RenderCustomMultiChildLayoutBox.paint (package:flutter/src/rendering/custom_layout.dart:406:5) #15 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2266:7) #16 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:186:13) #17 RenderProxyBoxMixin.paint (package:flutter/src/rendering/proxy_box.dart:133:15) #18 _RenderInkFeatures.paint (package:flutter/src/material/material.dart:533:11) #19 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2266:7) #20 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:186:13) #21 RenderProxyBoxMixin.paint (package:flutter/src/rendering/proxy_box.dart:133:15) #22 PaintingContext.pushLayer (package:flutter/src/rendering/object.dart:393:12) #23 RenderPhysicalModel.paint (package:flutter/src/rendering/proxy_box.dart:1821:15) #24 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2266:7) #25 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:186:13) #26 RenderProxyBoxMixin.paint (package:flutter/src/rendering/proxy_box.dart:133:15) #27 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2266:7) #28 PaintingContext.paintChild (package:flutter/src/rendering/object.dart:186:13) #29 RenderProxyBoxMixin.paint (package:flutter/src/rendering/proxy_box.dart:133:15) #30 RenderObject._paintWithContext (package:flutter/src/rendering/object.dart:2266:7) #31 PaintingContext._repaintCompositedChild (package:flutter/src/rendering/object.dart:137:11) #32 PaintingContext.repaintCompositedChild (package:flutter/src/rendering/object.dart:97:5) #33 PipelineOwner.flushPaint (package:flutter/src/rendering/object.dart:982:29) #34 RendererBinding.drawFrame (package:flutter/src/rendering/binding.dart:406:19) #35 WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:867:13) #36 RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:286:5) #37 SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1117:15) #38 SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:1056:9) #39 SchedulerBinding.scheduleWarmUpFrame.<anonymous closure> (package:flutter/src/scheduler/binding.dart:865:7) (elided 4 frames from class _RawReceivePortImpl, class _Timer, and dart:async-patch) The following RenderObject was being processed when the exception was fired: _RenderRangeSlider#32f2f: creator: _RangeSliderRenderObjectWidget ← RangeSlider ← SliderTheme ← Padding ← Container ← Column ← _BodyBuilder ← MediaQuery ← LayoutId-[<_ScaffoldSlot.body>] ← CustomMultiChildLayout ← AnimatedBuilder ← DefaultTextStyle ← ⋯ parentData: offset=Offset(20.0, 20.0) (can use size) constraints: BoxConstraints(0.0<=w<=374.0, 0.0<=h<=Infinity) size: Size(374.0, 32.0) This RenderObject has no descendants.
In RoundSliderThumbShape.paint, it is expecting an argument of type Size called sizeWithOverflow which is not being passed.
Facing Same Issue..
Same issue here...
Issue should now be fixed.
Still a issue
Where I was having this issue using 1.4.0, I no longer see it in 1.5.0. Thanks for the fix!
1.4.0
1.5.0
I am just beginning to work with the RangeSlider widget. When trying to render a simple RangeSlider, encountering the following:
In RoundSliderThumbShape.paint, it is expecting an argument of type Size called sizeWithOverflow which is not being passed.