Skip to content

Commit 9746ff5

Browse files
committed
loadmore text
1 parent 6e6e554 commit 9746ff5

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

lib/common/style/GSYStyle.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,7 @@ class GSYStrings {
264264

265265
static const String nothing_now = "目前什么都没有。";
266266
static const String loading_text = "努力加载中···";
267+
static const String load_more_text = "加载中···";
267268

268269
static const String option_web = "浏览器打开";
269270
static const String option_copy = "复制链接";

lib/widget/GSYPullLoadWidget.dart

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,17 +95,21 @@ class _GSYPullLoadWidgetState extends State<GSYPullLoadWidget> {
9595
return new RefreshIndicator(
9696
///GlobalKey,用户外部获取RefreshIndicator的State,做显示刷新
9797
key: refreshKey,
98+
9899
///下拉刷新触发,返回的是一个Future
99100
onRefresh: onRefresh,
100101
child: new ListView.builder(
101102
///保持ListView任何情况都能滚动,解决在RefreshIndicator的兼容问题。
102103
physics: const AlwaysScrollableScrollPhysics(),
104+
103105
///根据状态返回子孔健
104106
itemBuilder: (context, index) {
105107
return _getItem(index);
106108
},
109+
107110
///根据状态返回数量
108111
itemCount: _getListCount(),
112+
109113
///滑动监听
110114
controller: _scrollController,
111115
),
@@ -141,17 +145,19 @@ class _GSYPullLoadWidgetState extends State<GSYPullLoadWidget> {
141145
new Container(
142146
width: 5.0,
143147
),
148+
144149
///加载中文本
145150
new Text(
146-
"加载中···",
151+
GSYStrings.load_more_text,
147152
style: TextStyle(
148153
color: Color(0xFF121917),
149154
fontSize: 14.0,
150155
fontWeight: FontWeight.bold,
151156
),
152157
)
153158
])
154-
/// 不需要加载
159+
160+
/// 不需要加载
155161
: new Container();
156162
return new Padding(
157163
padding: const EdgeInsets.all(20.0),

0 commit comments

Comments
 (0)