boeledi / RangeSlider

RangeSlider Widget for Flutter
Other
374 stars 67 forks source link

slider not work with new version of flutter #16

Closed bahrinb55 closed 5 years ago

bahrinb55 commented 5 years ago

the plugin not work with the new version of flutter : v1.5.7

boeledi commented 5 years ago

I upgraded to channel Beta 1.5.4 and it works. Could you please be a bit more explicit with the error you are facing?

sam-toon commented 5 years ago

I see the same problem, if you are on the dev channel 1.5.7 or above. Also gives the error on the master channel. It works on 1.5.4

I get the following errors on the master channel:

flutter: ══╡ EXCEPTION CAUGHT BY RENDERING LIBRARY ╞═════════════════════════════════════════════════════════
flutter: The following assertion was thrown during paint():
flutter: 'dart:ui/painting.dart': Failed assertion: line 1123: '<optimized out>': is not true.
flutter:
flutter: Either the assertion indicates an error in the framework itself, or we should provide substantially
flutter: more information in this error message to help you determine and fix the underlying cause.
flutter: In either case, please report this assertion by filing a bug on GitHub:
flutter:   https://github.com/flutter/flutter/issues/new?template=BUG.md
flutter:
flutter: When the exception was thrown, this was the stack:
flutter: #2      Paint.color= (dart:ui/painting.dart:1123:12)
flutter: #3      _RenderRangeSlider._paintTrack
package:flutter_range_slider/src/flutter_range_slider.dart:869
flutter: #4      _RenderRangeSlider.paint
package:flutter_range_slider/src/flutter_range_slider.dart:832
flutter: #5      RenderObject._paintWithContext 
package:flutter/…/rendering/object.dart:2104
flutter: #6      PaintingContext.paintChild 
package:flutter/…/rendering/object.dart:173
flutter: #7      _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.paint 
package:flutter/…/rendering/proxy_box.dart:123
flutter: #8      RenderPointerListener.paint 
package:flutter/…/rendering/proxy_box.dart:2608
flutter: #9      RenderObject._paintWithContext 
package:flutter/…/rendering/object.dart:2104
flutter: #10     PaintingContext.paintChild 
package:flutter/…/rendering/object.dart:173
flutter: #11     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.paint 
package:flutter/…/rendering/proxy_box.dart:123
flutter: #12     RenderObject._paintWithContext 
package:flutter/…/rendering/object.dart:2104
flutter: #13     PaintingContext.paintChild 
package:flutter/…/rendering/object.dart:173
flutter: #14     _RenderFlex&RenderBox&ContainerRenderObjectMixin&RenderBoxContainerDefaultsMixin.defaultPaint 
package:flutter/…/rendering/box.dart:2273
flutter: #15     RenderFlex.paint 
package:flutter/…/rendering/flex.dart:942
flutter: #16     RenderObject._paintWithContext 
package:flutter/…/rendering/object.dart:2104
flutter: #17     PaintingContext.paintChild 
package:flutter/…/rendering/object.dart:173
flutter: #18     RenderShiftedBox.paint 
package:flutter/…/rendering/shifted_box.dart:70
flutter: #19     RenderObject._paintWithContext 
package:flutter/…/rendering/object.dart:2104
flutter: #20     PaintingContext.paintChild 
package:flutter/…/rendering/object.dart:173
flutter: #21     _RenderFlex&RenderBox&ContainerRenderObjectMixin&RenderBoxContainerDefaultsMixin.defaultPaint 
package:flutter/…/rendering/box.dart:2273
flutter: #22     RenderFlex.paint 
package:flutter/…/rendering/flex.dart:942
flutter: #23     RenderObject._paintWithContext 
package:flutter/…/rendering/object.dart:2104
flutter: #24     PaintingContext.paintChild 
package:flutter/…/rendering/object.dart:173
flutter: #25     _RenderFlex&RenderBox&ContainerRenderObjectMixin&RenderBoxContainerDefaultsMixin.defaultPaint 
package:flutter/…/rendering/box.dart:2273
flutter: #26     RenderFlex.paint 
package:flutter/…/rendering/flex.dart:942
flutter: #27     RenderObject._paintWithContext 
package:flutter/…/rendering/object.dart:2104
flutter: #28     PaintingContext.paintChild 
package:flutter/…/rendering/object.dart:173
flutter: #29     RenderShiftedBox.paint 
package:flutter/…/rendering/shifted_box.dart:70
flutter: #30     RenderObject._paintWithContext 
package:flutter/…/rendering/object.dart:2104
flutter: #31     PaintingContext.paintChild 
package:flutter/…/rendering/object.dart:173
flutter: #32     RenderShiftedBox.paint 
package:flutter/…/rendering/shifted_box.dart:70
flutter: #33     RenderObject._paintWithContext 
package:flutter/…/rendering/object.dart:2104
flutter: #34     PaintingContext.paintChild 
package:flutter/…/rendering/object.dart:173
flutter: #35     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.paint 
package:flutter/…/rendering/proxy_box.dart:123
flutter: #36     _RenderInkFeatures.paint 
package:flutter/…/material/material.dart:510
flutter: #37     RenderObject._paintWithContext 
package:flutter/…/rendering/object.dart:2104
flutter: #38     PaintingContext.paintChild 
package:flutter/…/rendering/object.dart:173
flutter: #39     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.paint 
package:flutter/…/rendering/proxy_box.dart:123
flutter: #40     PaintingContext.pushLayer 
package:flutter/…/rendering/object.dart:370
flutter: #41     RenderPhysicalModel.paint 
package:flutter/…/rendering/proxy_box.dart:1716
flutter: #42     RenderObject._paintWithContext 
package:flutter/…/rendering/object.dart:2104
flutter: #43     PaintingContext.paintChild 
package:flutter/…/rendering/object.dart:173
flutter: #44     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.paint 
package:flutter/…/rendering/proxy_box.dart:123
flutter: #45     RenderPointerListener.paint 
package:flutter/…/rendering/proxy_box.dart:2608
flutter: #46     RenderObject._paintWithContext 
package:flutter/…/rendering/object.dart:2104
flutter: #47     PaintingContext.paintChild 
package:flutter/…/rendering/object.dart:173
flutter: #48     RenderShiftedBox.paint 
package:flutter/…/rendering/shifted_box.dart:70
flutter: #49     RenderObject._paintWithContext 
package:flutter/…/rendering/object.dart:2104
flutter: #50     PaintingContext.paintChild 
package:flutter/…/rendering/object.dart:173
flutter: #51     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.paint 
package:flutter/…/rendering/proxy_box.dart:123
flutter: #52     PaintingContext.pushLayer 
package:flutter/…/rendering/object.dart:370
flutter: #53     PaintingContext.pushClipRect 
package:flutter/…/rendering/object.dart:394
flutter: #54     RenderClipRect.paint 
package:flutter/…/rendering/proxy_box.dart:1287
flutter: #55     RenderObject._paintWithContext 
package:flutter/…/rendering/object.dart:2104
flutter: #56     PaintingContext.paintChild 
package:flutter/…/rendering/object.dart:173
flutter: #57     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.paint 
package:flutter/…/rendering/proxy_box.dart:123
flutter: #58     RenderObject._paintWithContext 
package:flutter/…/rendering/object.dart:2104
flutter: #59     PaintingContext.paintChild 
package:flutter/…/rendering/object.dart:173
flutter: #60     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.paint 
package:flutter/…/rendering/proxy_box.dart:123
flutter: #61     RenderPointerListener.paint 
package:flutter/…/rendering/proxy_box.dart:2608
flutter: #62     RenderObject._paintWithContext 
package:flutter/…/rendering/object.dart:2104
flutter: #63     PaintingContext.paintChild 
package:flutter/…/rendering/object.dart:173
flutter: #64     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.paint 
package:flutter/…/rendering/proxy_box.dart:123
flutter: #65     RenderObject._paintWithContext 
package:flutter/…/rendering/object.dart:2104
flutter: #66     PaintingContext._repaintCompositedChild 
package:flutter/…/rendering/object.dart:128
flutter: #67     PaintingContext.repaintCompositedChild 
package:flutter/…/rendering/object.dart:96
flutter: #68     PaintingContext._compositeChild 
package:flutter/…/rendering/object.dart:190
flutter: #69     PaintingContext.paintChild 
package:flutter/…/rendering/object.dart:171
flutter: #70     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.paint 
package:flutter/…/rendering/proxy_box.dart:123
flutter: #71     RenderObject._paintWithContext 
package:flutter/…/rendering/object.dart:2104
flutter: #72     PaintingContext.paintChild 
package:flutter/…/rendering/object.dart:173
flutter: #73     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.paint 
package:flutter/…/rendering/proxy_box.dart:123
flutter: #74     RenderObject._paintWithContext 
package:flutter/…/rendering/object.dart:2104
flutter: #75     PaintingContext._repaintCompositedChild 
package:flutter/…/rendering/object.dart:128
flutter: #76     PaintingContext.repaintCompositedChild 
package:flutter/…/rendering/object.dart:96
flutter: #77     PaintingContext._compositeChild 
package:flutter/…/rendering/object.dart:190
flutter: #78     PaintingContext.paintChild 
package:flutter/…/rendering/object.dart:171
flutter: #79     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.paint 
package:flutter/…/rendering/proxy_box.dart:123
flutter: #80     RenderObject._paintWithContext 
package:flutter/…/rendering/object.dart:2104
flutter: #81     PaintingContext.paintChild 
package:flutter/…/rendering/object.dart:173
flutter: #82     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.paint 
package:flutter/…/rendering/proxy_box.dart:123
flutter: #83     RenderOffstage.paint 
package:flutter/…/rendering/proxy_box.dart:3028
flutter: #84     RenderObject._paintWithContext 
package:flutter/…/rendering/object.dart:2104
flutter: #85     PaintingContext.paintChild 
package:flutter/…/rendering/object.dart:173
flutter: #86     _RenderStack&RenderBox&ContainerRenderObjectMixin&RenderBoxContainerDefaultsMixin.defaultPaint 
package:flutter/…/rendering/box.dart:2273
flutter: #87     RenderStack.paintStack 
package:flutter/…/rendering/stack.dart:594
flutter: #88     RenderStack.paint 
package:flutter/…/rendering/stack.dart:602
flutter: #89     RenderObject._paintWithContext 
package:flutter/…/rendering/object.dart:2104
flutter: #90     PaintingContext.paintChild 
package:flutter/…/rendering/object.dart:173
flutter: #91     __RenderTheatre&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.paint 
package:flutter/…/rendering/proxy_box.dart:123
flutter: #92     RenderObject._paintWithContext 
package:flutter/…/rendering/object.dart:2104
flutter: #93     PaintingContext.paintChild 
package:flutter/…/rendering/object.dart:173
flutter: #94     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.paint 
package:flutter/…/rendering/proxy_box.dart:123
flutter: #95     RenderObject._paintWithContext 
package:flutter/…/rendering/object.dart:2104
flutter: #96     PaintingContext.paintChild 
package:flutter/…/rendering/object.dart:173
flutter: #97     _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.paint 
package:flutter/…/rendering/proxy_box.dart:123
flutter: #98     RenderObject._paintWithContext 
package:flutter/…/rendering/object.dart:2104
flutter: #99     PaintingContext.paintChild 
package:flutter/…/rendering/object.dart:173
flutter: #100    _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.paint 
package:flutter/…/rendering/proxy_box.dart:123
flutter: #101    RenderPointerListener.paint 
package:flutter/…/rendering/proxy_box.dart:2608
flutter: #102    RenderObject._paintWithContext 
package:flutter/…/rendering/object.dart:2104
flutter: #103    PaintingContext.paintChild 
package:flutter/…/rendering/object.dart:173
flutter: #104    _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.paint 
package:flutter/…/rendering/proxy_box.dart:123
flutter: #105    RenderCustomPaint.paint 
package:flutter/…/rendering/custom_paint.dart:569
flutter: #106    RenderObject._paintWithContext 
package:flutter/…/rendering/object.dart:2104
flutter: #107    PaintingContext.paintChild 
package:flutter/…/rendering/object.dart:173
flutter: #108    _RenderProxyBox&RenderBox&RenderObjectWithChildMixin&RenderProxyBoxMixin.paint 
package:flutter/…/rendering/proxy_box.dart:123
flutter: #109    RenderObject._paintWithContext 
package:flutter/…/rendering/object.dart:2104
flutter: #110    PaintingContext.paintChild 
package:flutter/…/rendering/object.dart:173
flutter: #111    RenderView.paint 
package:flutter/…/rendering/view.dart:182
flutter: #112    RenderObject._paintWithContext 
package:flutter/…/rendering/object.dart:2104
flutter: #113    PaintingContext._repaintCompositedChild 
package:flutter/…/rendering/object.dart:128
flutter: #114    PaintingContext.repaintCompositedChild 
package:flutter/…/rendering/object.dart:96
flutter: #115    PipelineOwner.flushPaint 
package:flutter/…/rendering/object.dart:859
flutter: #116    _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&SemanticsBinding&RendererBinding.drawFrame 
package:flutter/…/rendering/binding.dart:349
flutter: #117    _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&SemanticsBinding&RendererBinding&WidgetsBinding.drawFrame 
flutter: #118    _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&SemanticsBinding&RendererBinding._handlePersistentFrameCallback 
package:flutter/…/rendering/binding.dart:286
flutter: #119    _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding._invokeFrameCallback 
package:flutter/…/scheduler/binding.dart:1012
flutter: #120    _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding.handleDrawFrame 
package:flutter/…/scheduler/binding.dart:952
flutter: #121    _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding._handleDrawFrame 
package:flutter/…/scheduler/binding.dart:864
flutter: #125    _invoke (dart:ui/hooks.dart:220:10)
flutter: #126    _drawFrame (dart:ui/hooks.dart:178:3)
flutter: (elided 5 frames from class _AssertionError and package dart:async)
flutter:
flutter: The following RenderObject was being processed when the exception was fired:
flutter:   _RenderRangeSlider#42b3f
flutter:   creator: _RangeSliderRenderObjectWidget ← RangeSlider ← Listener ← _GestureSemantics ←
flutter:   RawGestureDetector ← GestureDetector ← Column ← Padding ← Column ← Column ← Padding ← MediaQuery ←
flutter:   ⋯
flutter:   parentData: <none> (can use size)
flutter:   constraints: BoxConstraints(0.0<=w<=384.0, 0.0<=h<=Infinity)
flutter:   size: Size(384.0, 32.0)
flutter: This RenderObject has no descendants.
flutter: ════════════════════════════════════════════════════════════════════════════════════════════════════
flutter: Another exception was thrown: 'dart:ui/painting.dart': Failed assertion: line 1123: '<optimized out>': is not true.
flutter: Another exception was thrown: 'dart:ui/painting.dart': Failed assertion: line 1123: '<optimized out>': is not true.
flutter: Another exception was thrown: 'dart:ui/painting.dart': Failed assertion: line 1123: '<optimized out>': is not true.
boeledi commented 5 years ago

Dear Both,

I fixed the issue. This was due to various modifications Flutter has applied to Paint(). This should now work with version 1.2.0 of the package.

sam-toon commented 5 years ago

@boeledi,

Thanks for the very fast fix, it now works on dev build 1.5.8