Skip to content

Commit e9ccb1c

Browse files
committed
docs: update version to 3.1.0
1 parent f298303 commit e9ccb1c

File tree

5 files changed

+13
-13
lines changed

5 files changed

+13
-13
lines changed

CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## Next
1+
## 3.1.0
22
- feat: Add paging widget [EasyPaging].
33

44
## 3.0.5+1

example/lib/page/sample/paging_page.dart

+6-6
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ class CustomPagingState extends EasyPagingState<List<String>, String> {
6767
int? page;
6868

6969
@override
70-
int? totalCount;
70+
int? total;
7171

7272
@override
7373
int? totalPage;
@@ -124,7 +124,7 @@ class CustomPagingState extends EasyPagingState<List<String>, String> {
124124
return ResponseData(
125125
page: page,
126126
pageSize: size,
127-
totalCount: count,
127+
total: count,
128128
data: List.filled(dataSize, ''),
129129
);
130130
}
@@ -142,7 +142,7 @@ class CustomPagingState extends EasyPagingState<List<String>, String> {
142142
final response = await fetchData(page: 1);
143143
setState(() {
144144
data = response.data.toList();
145-
totalCount = response.totalCount;
145+
total = response.total;
146146
page = response.page;
147147
});
148148
}
@@ -152,7 +152,7 @@ class CustomPagingState extends EasyPagingState<List<String>, String> {
152152
final response = await fetchData(page: page! + 1);
153153
setState(() {
154154
data!.addAll(response.data);
155-
totalCount = response.totalCount;
155+
total = response.total;
156156
page = response.page;
157157
});
158158
}
@@ -161,13 +161,13 @@ class CustomPagingState extends EasyPagingState<List<String>, String> {
161161
class ResponseData {
162162
final int page;
163163
final int pageSize;
164-
final int totalCount;
164+
final int total;
165165
final List<String> data;
166166

167167
ResponseData({
168168
required this.page,
169169
required this.pageSize,
170-
required this.totalCount,
170+
required this.total,
171171
required this.data,
172172
});
173173
}

example/pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ description: EasyRefresh example.
77
# Both the version and the builder number may be overridden in flutter
88
# build by specifying --build-name and --build-number, respectively.
99
# Read more about versioning at semver.org.
10-
version: 3.0.4+49
10+
version: 3.1.0+50
1111

1212
environment:
1313
sdk: ">=2.17.0 <3.0.0"

lib/src/easy_paging.dart

+4-4
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,8 @@ abstract class EasyPagingState<DataType, ItemType> extends State<EasyPaging> {
103103
/// Current page.
104104
int? get page;
105105

106-
/// Total count.
107-
int? get totalCount;
106+
/// All items count.
107+
int? get total;
108108

109109
/// Current items count.
110110
int get count;
@@ -120,8 +120,8 @@ abstract class EasyPagingState<DataType, ItemType> extends State<EasyPaging> {
120120
if (data == null) {
121121
return false;
122122
}
123-
if (totalCount != null) {
124-
return count >= totalCount!;
123+
if (total != null) {
124+
return count >= total!;
125125
}
126126
if (page != null && totalPage != null) {
127127
return page! >= totalPage!;

pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: easy_refresh
22
description: A flutter widget that provides pull-down refresh and pull-up load.
3-
version: 3.0.5+1
3+
version: 3.1.0
44
homepage: https://xuelongqy.github.io/flutter_easy_refresh
55
repository: https://github.com/xuelongqy/flutter_easy_refresh
66
issue_tracker: https://github.com/xuelongqy/flutter_easy_refresh/issues

0 commit comments

Comments
 (0)