Skip to content

Commit 2a9ef14

Browse files
committed
命名规范
1 parent 436d0dd commit 2a9ef14

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

lib/Refresh.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ class RefreshLayout extends StatefulWidget {
8989
const RefreshLayout({
9090
Key key,
9191
@required this.child,
92-
this.nomore: false,
92+
this.canloading: true,
9393
this.displacement: 20.0,
9494
@required this.onRefresh,
9595
this.color,
@@ -134,7 +134,7 @@ class RefreshLayout extends StatefulWidget {
134134
/// else for more complicated layouts.
135135
final ScrollNotificationPredicate notificationPredicate;
136136

137-
final bool nomore;
137+
final bool canloading;
138138
// void dissmiss() {
139139
// if(state!=null)
140140
// state._dismiss(_RefreshLayoutMode.canceled);
@@ -246,7 +246,7 @@ class RefreshLayoutState extends State<RefreshLayout>
246246
/**
247247
* ----------------------------------------
248248
*/
249-
if (!widget.nomore && notification is UserScrollNotification &&
249+
if (widget.canloading && notification is UserScrollNotification &&
250250
notification.metrics.extentAfter == 0.0 &&
251251
notification.direction == ScrollDirection.idle) {
252252
show(atTop: false);

lib/main.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ Future<Null> getData(){
6969
child: new Column(
7070
mainAxisAlignment: MainAxisAlignment.center,
7171
children: <Widget>[
72-
new Expanded(child: RefreshLayout(nomore: isnomore, onRefresh: (boo) {
72+
new Expanded(child: RefreshLayout(canloading: !isnomore, onRefresh: (boo) {
7373
if (!boo) {
7474
return getData();
7575
}else{

0 commit comments

Comments
 (0)