Open bailyzheng opened 3 years ago
It work well in Android platform.
It work well in Android platform.
use scrollbehavior look up=>https://flutter.dev/docs/release/breaking-changes/default-scroll-behavior-drag
It work well in Android platform.
It work well in Android platform.
use scrollbehavior look up=>https://flutter.dev/docs/release/breaking-changes/default-scroll-behavior-drag
It works OK when I add this to wrapper SmartRefresher. Thanks
child: ScrollConfiguration(
behavior:
ScrollConfiguration.of(context).copyWith(dragDevices: {
PointerDeviceKind.touch,
PointerDeviceKind.mouse,
})
It is not working for me at all.
It work well in Android platform.
It work well in Android platform.
use scrollbehavior look up=>https://flutter.dev/docs/release/breaking-changes/default-scroll-behavior-drag
It works OK when I add this to wrapper SmartRefresher. Thanks
child: ScrollConfiguration( behavior: ScrollConfiguration.of(context).copyWith(dragDevices: { PointerDeviceKind.touch, PointerDeviceKind.mouse, })
Can you give us and example on it?
It work well in Android platform.
It work well in Android platform.
use scrollbehavior look up=>https://flutter.dev/docs/release/breaking-changes/default-scroll-behavior-drag
It works for me. Thanks~
For those who stumbled upon this issue recently you need to add the ScrollConfiguration
to the refresher widget instead of the child of refresher.
Eg:
ScrollConfiguration(
behavior: ScrollConfiguration.of(context).copyWith(
dragDevices: {
PointerDeviceKind.touch,
PointerDeviceKind.mouse,
PointerDeviceKind.trackpad,
PointerDeviceKind.stylus,
},
),
child: SmartRefresher(
enablePullDown: true,
header: BezierCircleHeader(
bezierColor: YOUR_COLOR,
circleColor: Colors.white,
),
footer: CustomFooter(
builder: (BuildContext context, LoadStatus mode) {
Widget body;
if (mode == LoadStatus.idle || mode == LoadStatus.loading) {
body = CircularProgressIndicator.adaptive();
} else if (mode == LoadStatus.failed) {
body = Text("Load Failed!Please Retry!");
} else {
body = Text("No more Data");
}
return Container(
height: 55.0,
child: Center(child: body),
);
},
),
controller: _refreshController,
onRefresh: () async {
},
child: YourChildWidget(),
),
);
For those who stumbled upon this issue recently you need to add the
ScrollConfiguration
to the refresher widget instead of the child of refresher.Eg:
ScrollConfiguration( behavior: ScrollConfiguration.of(context).copyWith( dragDevices: { PointerDeviceKind.touch, PointerDeviceKind.mouse, PointerDeviceKind.trackpad, PointerDeviceKind.stylus, }, ), child: SmartRefresher( enablePullDown: true, header: BezierCircleHeader( bezierColor: YOUR_COLOR, circleColor: Colors.white, ), footer: CustomFooter( builder: (BuildContext context, LoadStatus mode) { Widget body; if (mode == LoadStatus.idle || mode == LoadStatus.loading) { body = CircularProgressIndicator.adaptive(); } else if (mode == LoadStatus.failed) { body = Text("Load Failed!Please Retry!"); } else { body = Text("No more Data"); } return Container( height: 55.0, child: Center(child: body), ); }, ), controller: _refreshController, onRefresh: () async { }, child: YourChildWidget(), ), );
Is this added to the documentation?
For those who stumbled upon this issue recently you need to add the
ScrollConfiguration
to the refresher widget instead of the child of refresher.Eg:
ScrollConfiguration( behavior: ScrollConfiguration.of(context).copyWith( dragDevices: { PointerDeviceKind.touch, PointerDeviceKind.mouse, PointerDeviceKind.trackpad, PointerDeviceKind.stylus, }, ), child: SmartRefresher( enablePullDown: true, header: BezierCircleHeader( bezierColor: YOUR_COLOR, circleColor: Colors.white, ), footer: CustomFooter( builder: (BuildContext context, LoadStatus mode) { Widget body; if (mode == LoadStatus.idle || mode == LoadStatus.loading) { body = CircularProgressIndicator.adaptive(); } else if (mode == LoadStatus.failed) { body = Text("Load Failed!Please Retry!"); } else { body = Text("No more Data"); } return Container( height: 55.0, child: Center(child: body), ); }, ), controller: _refreshController, onRefresh: () async { }, child: YourChildWidget(), ), );
Is this added to the documentation?
Not sure actually
Could you open a new MR to add this to the documentation?
Could you open a new MR to add this to the documentation?
Sure, will try to do it this week 🙌
Could you open a new MR to add this to the documentation?
@SalahAdDin done 🙌
There still be small problem with this implementation: when we use scroll on mouse (not dragging the screen) then "onLoading" is never triggered...
It work well in Android platform.