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

Documented Flutter Web usage #636

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 51 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,56 @@ attributes that are not empty.

```

To use this package on Flutter web drag devices need to be specified.

```dart
ScrollConfiguration(
behavior: ScrollConfiguration.of(context).copyWith(
dragDevices: {
PointerDeviceKind.touch,
PointerDeviceKind.mouse,
PointerDeviceKind.trackpad,
PointerDeviceKind.stylus,
},
),
child: SmartRefresher(
enablePullDown: true,
header: WaterDropHeader(),
enablePullDown: true,
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
),
);
```


1.5.6 add new feather: localization ,you can add following code in MaterialApp or CupertinoApp:

```dart
Expand Down Expand Up @@ -284,7 +334,7 @@ Similarly, you may need to work with components like NotificationListener, Scrol
- [FAQ](problems_en.md)


## Exist Problems
## Existing Problems
* about NestedScrollView,When you slide down and then slide up quickly, it will return back. The main reason is that
NestedScrollView does not consider the problem of cross-border elasticity under
bouncingScrollPhysics. Relevant flutter issues: 34316, 33367, 29264. This problem
Expand Down