MarcelGarus / MarcelGarus/flutter_cached

Custom Pull-to-refresh

Open
#6 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Dart
Stars
16
Forks
2
PR merge metrics
No merged PRs in 30d

Description

With your current implementation, it seems that if I have a ListView inside a Column for instance (with a footer), the pull-to-refresh doesn't work.

             Column(
                children: <Widget>[
                  Expanded(
                    child: ListView(
                      children: List.generate(20, (index) => Text('$index')),
                      itemExtent: 100,
                    ),
                  ),
                  Text('Footer'),
                ],
              );

And if I set hasScrollBody: false, it throws.

I guess I would have to use the PullToRefersh directly above the ListView, inside the Expanded.
Maybe the pull-to-refresh should be optionnal or external, so we can use our custom behaviour ?
For instance I could want to implement a custom PullToRefresh component like this.

Thanks.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the provided Column, Expanded, ListView, and footer example, then inspect the current pull-to-refresh integration and the hasScrollBody false path. Done should include a non-throwing layout with pull-to-refresh and a supported way to supply custom pull-to-refresh behavior, including the nested-scroll use case described in the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
dart, flutter
Domain
mobile-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.