aagarwal1012 / Liquid-Pull-To-Refresh

🔁 A custom refresh indicator for flutter.
https://pub.dev/packages/liquid_pull_to_refresh
MIT License
1.24k stars 92 forks source link

Refresh indicator overlays on list view #46

Closed limpep closed 4 years ago

limpep commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

@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 commented 4 years ago

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

aagarwal1012 commented 4 years ago

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

AadumKhor commented 4 years ago

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

limpep commented 4 years ago

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

aagarwal1012 commented 4 years ago

Yes, I will do the release by today.

limpep commented 4 years ago

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

AadumKhor commented 4 years ago

Closing this since the issue is resolved.

limpep commented 4 years ago

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

dukaric1991 commented 4 years ago

Any news on new version with this fix :) ?

aagarwal1012 commented 4 years ago

@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 commented 4 years ago

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

dukaric1991 commented 4 years ago

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

C4s4r commented 4 years ago

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?