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 not working for web. #650

Open
senenpalanca opened this issue Jul 2, 2024 · 3 comments
Open

Refresh not working for web. #650

senenpalanca opened this issue Jul 2, 2024 · 3 comments

Comments

@senenpalanca
Copy link

I've noticed that the same code that works in my devices (IOS & Android), does not work for web. I saw the "onLoading" function is never called, neither it appears the bottom refresh indicator.

@Shamik07
Copy link

Shamik07 commented Jul 29, 2024


View this: flutter_pulltorefresh Pull Request #636

tldr;

ScrollConfiguration(
  behavior: ScrollConfiguration.of(context).copyWith(
    dragDevices: {
      PointerDeviceKind.touch,
      PointerDeviceKind.mouse,
      PointerDeviceKind.trackpad,
      PointerDeviceKind.stylus,
    },
  ),
  child: SmartRefresher(
    enablePullDown: true,
    header: WaterDropHeader(),
    enablePullUp: true,
    footer: CustomFooter(
      builder: (BuildContext context, LoadStatus mode) {
        Widget body;
        if (mode == LoadStatus.idle) {
          body = Text("pull up load");
        } else if (mode == LoadStatus.loading) {
          body = CupertinoActivityIndicator();
        } else if (mode == LoadStatus.failed) {
          body = Text("Load Failed! Click retry!");
        } else if (mode == LoadStatus.canLoading) {
          body = Text("release to load more");
        } else {
          body = Text("No more Data");
        }
        return Container(
          height: 55.0,
          child: Center(child: body),
        );
      },
    ),
    controller: _refreshController,
    onRefresh: _onRefresh, // Check example above for this method
    onLoading: _onLoading, // Check example above for this method
    child: Offstage(), // Replace with your own widget
  ),
);

@xutr2222
Copy link

i also can't pull to refresh in web mode. any update ?

@sed1ka
Copy link

sed1ka commented Sep 25, 2024

It's better to migrate to another plugin since this library has not been maintained for 3 years.

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

4 participants