Limbou / expandable_page_view

MIT License
88 stars 36 forks source link

propably fix #53 #56

Open jayjah opened 1 year ago

jayjah commented 1 year ago

Should be a fix to Issue#53 It just makes sure, that clamp get's called on a valid range otherwise it might just throw an error like the following:

Invalid argument(s): 0
       at int.clamp(dart:core)
       at _ExpandablePageViewState.initState(expandable_page_view.dart:210)
       at StatefulElement._firstBuild(framework.dart:5430)
       at ComponentElement.mount(framework.dart:5273)
       at Element.inflateWidget(framework.dart:4182)
       at MultiChildRenderObjectElement.inflateWidget(framework.dart:6569)
       at MultiChildRenderObjectElement.mount(framework.dart:6581)
       at Element.inflateWidget(framework.dart:4182)
       at Element.updateChild(framework.dart:3707)
       at SingleChildRenderObjectElement.mount(framework.dart:6434)
       at Element.inflateWidget(framework.dart:4182)
...
jayjah commented 5 months ago

@ciriousjoker I think you're completely right. I'll check your suggestion and make adjustments.

ciriousjoker commented 4 months ago

@jayjah any updates?