Giter VIP home page Giter VIP logo

vnapnic / scroll_two Goto Github PK

View Code? Open in Web Editor NEW
6.0 2.0 7.0 193.02 MB

Flutter Solution for keep scroll position in ListView when adding new item on top. Detect item position when scrolling.

Home Page: https://pub.dev/packages/scroll_two

License: BSD 2-Clause "Simplified" License

Kotlin 1.87% Makefile 64.56% Java 1.90% Shell 0.64% Swift 1.17% Objective-C 1.93% Dart 21.82% HTML 4.99% Ruby 1.11%
flutter scrolling listview-flutter position flutter-v

scroll_two's Introduction

scroll_two

Flutter Solution for keep scroll position in ListView when adding new item on top.

Detect item position when scrolling.

image

scroll_two's People

Contributors

vnapnic avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

scroll_two's Issues

Could this be used to account for variable list sizes and image loads?

Hi,

I have a listview with variable list item sizes that contain images.

If you are in the middle of the list view and an image in one of the list items loads, it pushes the entire list down, and the reader loses their place in the list view.

So no items are being added to the listview, simple the content inside the list item is "changing" (an image loads and so the list item height changes)

Could this be used in that scenario?

Wrong index for top data list

I have found out this wrong behavior when rendering both top and bottom data list.

Let's say we have a top list = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], and a bottom list = [11, 12, 13, 14, 15, 16, 17, 18, 19, 20],
then the combined values would be [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20].

Current logic
final caculationCurrentIndex = controller._top.length - index;

The current calculationCurrentIndex of index 0 for top list is wrong as it is supposed to be started at 9-indexed, instead of 10-indexed.

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.