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

Refresh indicator overlays on list view #46

Closed
limpep opened this issue Apr 30, 2020 · 15 comments
Closed

Refresh indicator overlays on list view #46

limpep opened this issue Apr 30, 2020 · 15 comments
Assignees
Labels
bug Something isn't working

Comments

@limpep
Copy link

limpep commented Apr 30, 2020

Describe the bug
Hi, when you pull to refresh and the refresh indicator is overlayed on top of the list rather than pushing the list view down as shown in the screencasts on the readme.

To Reproduce
Steps to reproduce the behavior:

  1. running latest table version of flutter and dart

Expected behavior
The refresh indicator should push the list view down.

Screenshots

Flutter:

    • Flutter version 1.12.13+hotfix.9 at C:\tools\flutter
    • Framework revision f139b11009 (4 weeks ago), 2020-03-30 13:57:30 -0700
    • Engine revision af51afceb8

Dart:
• Dart version 2.7.2

Additional context
sdk: ">=2.7.0 <3.0.0"
liquid_pull_to_refresh: ^1.2.0

@override
  Widget build(BuildContext context) {
    final formatter = LastUpdatedDateFormatter(
        lastUpdated: _endpointsData != null
            ? _endpointsData.values[EndPoint.cases]?.date ?? DateTime.now()
            : null);
    return Scaffold(
      appBar: AppBar(
        title: Text("Covid19 Tracker"),
        actions: [
          IconButton(
            icon: Icon(Icons.settings),
            onPressed: () {
              //Navigate to Settings screen
              Navigator.push(
                context,
                MaterialPageRoute(
                  builder: (context) => Settings(),
                ),
              );
            },
          )
        ],
      ),
      body: LiquidPullToRefresh(
        onRefresh: _updateData,
        showChildOpacityTransition: false,
        springAnimationDurationInMilliseconds: 600,
        backgroundColor: Theme.of(context).canvasColor,
        child: ListView(
          children: <Widget>[
            LastUpdatedStatus(
              text: formatter.lastUpdatedStatusText(),
            ),
            for (var endpoint in EndPoint.values)
              EndPointCard(
                endpoint: endpoint,
                value: _endpointsData != null
                    ? _endpointsData.values[endpoint]?.value
                    : null,
              ),
          ],
        ),
      ),
    );
  }
@AadumKhor AadumKhor added the bug Something isn't working label May 1, 2020
@AadumKhor
Copy link
Collaborator

Thank you for pointing this out. The latest commit fdf49fd solves the above issue.

@aagarwal1012 Please check as it shows an error on while passing the build.

@aagarwal1012
Copy link
Owner

@AadumKhor, Travis shows a successful build but codecov shows that it degrades code coverage which we can deal later on. Your commit looks fine to proceed towards creating a Pull Request for the issue.

@AadumKhor
Copy link
Collaborator

@aagarwal1012 I have made the changes directly to the master branch.

@aagarwal1012
Copy link
Owner

@AadumKhor, I will not suggest to directly push to master rather try to create a PR next time.

@AadumKhor
Copy link
Collaborator

@aagarwal1012 Ok. Will do in case of further issues.

@limpep
Copy link
Author

limpep commented May 1, 2020

So I am guessing a new release needs to be created to be able to tests this?

@aagarwal1012
Copy link
Owner

Yes, I will do the release by today.

@limpep
Copy link
Author

limpep commented May 2, 2020

Great, look forward to trying the new version. Thanks.

@AadumKhor
Copy link
Collaborator

Closing this since the issue is resolved.

@limpep
Copy link
Author

limpep commented May 7, 2020

interesting, maybe I have missed the release....

@dukaric1991
Copy link

Any news on new version with this fix :) ?

@aagarwal1012
Copy link
Owner

@dukaric1991 @limpep I have published a new version of this package, v2.0.0. Have a look at it and please tell us if you have any suggestions.

@limpep
Copy link
Author

limpep commented May 8, 2020

@aagarwal1012 I can confirm that it is working now. Thanks, much appreciated.

@dukaric1991
Copy link

@aagarwal1012 i can also confirm that it works as expected! thanks!

@C4s4r
Copy link

C4s4r commented Jun 29, 2020

I've upgrade from version 1.1.1 to 2.0.0 and now I'm encountering the same problem as mentioned in the original post here.
Do I have to do something special to have the ListView.builder() pushed down by the refresh?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants