Git Product home page Git Product logo

Comments (14)

iota9star avatar iota9star commented on May 4, 2024 2

@tarobins same problems

jumpTo

jumpTo
jumpTo

scrollTo

scrollTo
scrollTo

from flutter.widgets.

sajithtm002 avatar sajithtm002 commented on May 4, 2024 1

I had the same problem when using ScrollablePositionedList in a stateless widget. Converting it to a stateful widget did the trick

Also define ItemScrollController inside initState() method.

ItemScrollController _controller;
void initState() {
// TODO: implement initState
super.initState();
_controller = ItemScrollController();
}

from flutter.widgets.

tarobins avatar tarobins commented on May 4, 2024 1

I think #119 will fix this issue. Once that PR is closed, please let me know if not.

from flutter.widgets.

ricardochen avatar ricardochen commented on May 4, 2024

Did you add the property itemScrollController inside the builder?

ScrollablePositionedList.builder( itemCount: 500, itemBuilder: (context, index) => Text('Item $index'), itemScrollController: itemScrollController, itemPositionListener: itemPositionListener, );

from flutter.widgets.

tarobins avatar tarobins commented on May 4, 2024

@rockingdice I haven't been able to repo the issue. Do you have sample code available?

from flutter.widgets.

rockingdice avatar rockingdice commented on May 4, 2024

@tarobins I'll try to make a repo project for you.

from flutter.widgets.

tarobins avatar tarobins commented on May 4, 2024

I was trying to repo this issue with the withControl branch of this project: https://github.com/tarobins/page_list_demo/tree/withControl

The app has two pages with a list on each and a button that jumps the first list to 100. The button only controller the first list, and when the second list is showing, and you press the button you do get an error, kind of expectedly. Is this the situation you were running into or something else?

Thanks

Tom

from flutter.widgets.

tarobins avatar tarobins commented on May 4, 2024

as an aside, I ran into this while trying the above #43

from flutter.widgets.

sachaarbonel avatar sachaarbonel commented on May 4, 2024

I had the same problem when using ScrollablePositionedList in a stateless widget. Converting it to a stateful widget did the trick

from flutter.widgets.

tactical-retreat avatar tactical-retreat commented on May 4, 2024

I also had this issue, as far as I can tell I'm using everything correctly. Converting the containing widget from Stateless to Statefull fixed it with no other changes.

from flutter.widgets.

tarobins avatar tarobins commented on May 4, 2024

@nachoapps do you have an example of where it didn't work?

from flutter.widgets.

tactical-retreat avatar tactical-retreat commented on May 4, 2024

I do in my app, but it's not extracted to a reusable case right now. Also my flutter code is trash, so, sorry about that.

If you want to take a look, here's the commit that fixed it:
tactical-retreat/dadguide-flutter@065c3fd

Basically what I did here was create a Stack that automatically puts 'to bottom' and 'to top' buttons in the upper right/left hand corner, hovering over a list. With the regular ListView this is awful and slow, but with your widget super fast!

I'm using that stack widget here:
https://github.com/nachoapps/dadguide-flutter/blob/065c3fdae1a9a5e326c70029860eeeb835c940f3/lib/screens/monster/monster_list_tab.dart#L73

My app has bottom tabs, and the behavior I saw was clicking between tabs could semi-randomly cause a red screen of death.

from flutter.widgets.

tactical-retreat avatar tactical-retreat commented on May 4, 2024

Seems fixed in 1.6, thanks!

from flutter.widgets.

diver2 avatar diver2 commented on May 4, 2024

I'm having it back on 0.1.8...

The following assertion was thrown building Container:
'package:scrollable_positioned_list/src/scrollable_positioned_list.dart': Failed assertion: line 202 pos 12: '_scrollableListState == null': is not true.

The relevant error-causing widget was
Container
lib/widgets/dive_list.dart:198
When the exception was thrown, this was the stack
#2      ItemScrollController._attach
package:scrollable_positioned_list/src/scrollable_positioned_list.dart:202
#3      _ScrollablePositionedListState.initState
package:scrollable_positioned_list/src/scrollable_positioned_list.dart:241
#4      StatefulElement._firstBuild
package:flutter//widgets/framework.dart:4765
#5      ComponentElement.mount
package:flutter//widgets/framework.dart:4601
...     Normal element mounting (111 frames)

from flutter.widgets.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.