Comments (14)
@tarobins same problems
jumpTo
scrollTo
from flutter.widgets.
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.
I think #119 will fix this issue. Once that PR is closed, please let me know if not.
from flutter.widgets.
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.
@rockingdice I haven't been able to repo the issue. Do you have sample code available?
from flutter.widgets.
@tarobins I'll try to make a repo project for you.
from flutter.widgets.
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.
as an aside, I ran into this while trying the above #43
from flutter.widgets.
I had the same problem when using ScrollablePositionedList in a stateless widget. Converting it to a stateful widget did the trick
from flutter.widgets.
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.
@nachoapps do you have an example of where it didn't work?
from flutter.widgets.
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.
Seems fixed in 1.6, thanks!
from flutter.widgets.
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)
- VisibilityDetector fires event unexpectedly HOT 1
- [ScrollablePositionedList] Scrollbar unexpected jumping HOT 2
- [scrollable_positioned_list]: add jumpTo method to ScrollOffsetController
- [ScrollablePositionedList] PageStorage cast bug
- [ScrollablePositionedList] with StickyHeader
- Unsupported operation: add
- Twitchy scroll animation
- Inconsistent Expansion Direction of AnimatedContainer in ScrollablePositionedList
- [visibility_detector] Incorrect Visibility info Bug after updating to 4.0.0 or later
- A RenderViewport exceeded its maximum number of layout cycles
- R
- RTL support scrollable_positioned_list HOT 1
- Allow or expose scroll controller to be used outside.
- [visibility_detector] onVisibilityChanged not works when scroll faster HOT 5
- Flutter_simple_treeview: could not configure tree node height
- flutter simple tree: lazy build subtree nodes
- [ScrollablePositionedList] Inactive Package
- [visibility_detector] iOS swipe back - Unexpected visibleFraction behaviour. It is just 1.0 or 0.0.
- Use webview load pie charts on ios platform will show blank page in first load, and changed reloadAfterInit to true have blow error.
- Is the scrollable positioned list still in maintenance
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flutter.widgets.