idootop / nested_scroll_view_plus

📜 An enhanced NestedScrollView with support for overscrolling for both the inner and outer scrollviews.
https://flutter-nested-scroll-view-plus.vercel.app
MIT License
28 stars 2 forks source link

Error occurred when combined with CupertinoSliverRefreshControl #11

Open nhaattrieeu opened 3 weeks ago

nhaattrieeu commented 3 weeks ago

I get an error when combining NestedScrollViewPlus with CupertinoSliverRefreshControl with delayed, specifically as shown in the video

======== Exception caught by widgets library ======================================================= The following assertion was thrown building CupertinoSliverRefreshControl(state: _CupertinoSliverRefreshControlState#aa3a8): 'package:flutter/src/rendering/object.dart': Failed assertion: line 2310 pos 14: '_debugRelayoutBoundaryAlreadyMarkedNeedsLayout()': is not true.

Link: https://drive.google.com/file/d/17_O1VQ_hMxcEazUBXtzXVpBET610urLt/view?usp=sharing

idootop commented 3 weeks ago

In a NestedScrollView, the standard refresh indicator is not designed for this specific use case.

You can check how to implement a top pull-to-refresh indicator here: idootop/scroll_master.

Demo: https://flutter-scroll-master.vercel.app

idootop commented 3 weeks ago

I may add a built-in custom top refresh indicator for easier use in the future.

In the meantime, you can implement the refresh indicator as shown in the demo above—it doesn't seem too complex.