Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add possibility to return RenderSliver instead of _RenderLayoutBuilder #620

Open
abdullahalamodi opened this issue Jan 4, 2023 · 0 comments

Comments

@abdullahalamodi
Copy link

when I try to wrap SliverList with SmartRefersher inside CustomScrollView it gives me this error ->
A RenderViewport expected a child of type RenderSliver but received a child of type _RenderLayoutBuilder.
The relevant error-causing widget was
SmartRefresher

so I hope that anyone can customize SmartRefersher with some thing like SliverSmartRefersher to make it possible to add it as a child of CustomScrollView

this is the code that I want to achieve, what's give me the above error

CustomScrollView(
                slivers: [
                  SliverToBoxAdapter(
                    child: UserInfoWidget(
                      user: data,
                    ),
                  ),
                  SliverPersistentHeader(
                    pinned: true,
                    delegate: _PresistentHeaderDelegate(
                      child: const UserProfileTapWidget(),
                    ),
                  ),
                  SmartRefresher(
                    onRefresh: () {},
                    controller: RefreshController(),
                    child: SliverList(
                      delegate: SliverChildBuilderDelegate(
                        (context, index) {
                          return const PostWidget(myPost: true);
                        },
                        childCount: 10,
                      ),
                    ),
                  )
                ],
              ),
@abdullahalamodi abdullahalamodi changed the title add possibility to return convert return RenderSliver instead of _RenderLayoutBuilder add possibility to return RenderSliver instead of _RenderLayoutBuilder Jan 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant