在ListView Flutter中获取当前可见的小部件 [英] Get current visible widget in ListView Flutter

查看:727
本文介绍了在ListView Flutter中获取当前可见的小部件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用ListView.builder,当我们向下滚动时, 如何在viewport中获取当前可见的小部件. 类似于Android recyclerview findFirstCompletelyVisibleItemPosition

I am using ListView.builder , when we scroll up down, how to get the currently visible widget in viewport. something like Android recyclerview findFirstCompletelyVisibleItemPosition

推荐答案

Google提供了解决方案.

Google gives the solution.

https://github.com/google/flutter.widgets (此存储库包含Google开发的各种Flutter小部件的源代码,但不是Flutter核心团队开发的.)

https://github.com/google/flutter.widgets (This repository contains the source code for various Flutter widgets that are developed by Google but not by the core Flutter team.)

这篇关于在ListView Flutter中获取当前可见的小部件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆