Skip to content

Commit 915f15c

Browse files
committed
fix details after commit
1 parent d2361b0 commit 915f15c

File tree

6 files changed

+39
-33
lines changed

6 files changed

+39
-33
lines changed

example/lib/main.dart

+6
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,13 @@ class MyApp extends StatelessWidget {
5555
supportedLocales: [
5656
const Locale('en'),
5757
const Locale('zh'),
58+
const Locale('ja'),
59+
const Locale('uk'),
60+
const Locale('it'),
61+
const Locale('ru'),
62+
const Locale('fr'),
5863
],
64+
locale: const Locale('ja'),
5965
localeResolutionCallback:
6066
(Locale locale, Iterable<Locale> supportedLocales) {
6167
//print("change language");

example/lib/other/refresh_glowindicator.dart

+19-18
Original file line numberDiff line numberDiff line change
@@ -21,25 +21,26 @@ class RefreshScrollBehavior extends ScrollBehavior {
2121
return child;
2222
case TargetPlatform.macOS:
2323
case TargetPlatform.android:
24-
case TargetPlatform.fuchsia:
25-
return GlowingOverscrollIndicator(
26-
child: child,
27-
// this will disable top Bouncing OverScroll Indicator showing in Android
28-
showLeading: true, //顶部水波纹是否展示
29-
showTrailing: true, //底部水波纹是否展示
30-
axisDirection: axisDirection,
31-
notificationPredicate: (notification) {
32-
if (notification.depth == 0) {
33-
// 越界了拖动触发overScroll的话就没必要展示水波纹
34-
if (notification.metrics.outOfRange) {
35-
return false;
36-
}
37-
return true;
24+
return GlowingOverscrollIndicator(
25+
child: child,
26+
// this will disable top Bouncing OverScroll Indicator showing in Android
27+
showLeading: true, //顶部水波纹是否展示
28+
showTrailing: true, //底部水波纹是否展示
29+
axisDirection: axisDirection,
30+
notificationPredicate: (notification) {
31+
if (notification.depth == 0) {
32+
// 越界了拖动触发overScroll的话就没必要展示水波纹
33+
if (notification.metrics.outOfRange) {
34+
return false;
3835
}
39-
return false;
40-
},
41-
color: Theme.of(context).primaryColor,
42-
);
36+
return true;
37+
}
38+
return false;
39+
},
40+
color: Theme.of(context).primaryColor,
41+
);
42+
case TargetPlatform.fuchsia:
43+
4344
}
4445
return null;
4546
}

example/lib/ui/example/useStage/basic.dart

+1-2
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,6 @@ class _OnlyListViewState extends State<OnlyListView> {
137137

138138
Widget buildCtn() {
139139
return ListView.separated(
140-
reverse: false,
141140
padding: EdgeInsets.only(left: 5, right: 5),
142141
itemBuilder: (c, i) => Item(
143142
title: data[i],
@@ -160,7 +159,7 @@ class _OnlyListViewState extends State<OnlyListView> {
160159
enablePullUp: true,
161160
child: buildCtn(),
162161
footer: ClassicFooter(
163-
loadStyle: LoadStyle.ShowAlways,
162+
loadStyle: LoadStyle.ShowWhenLoading,
164163
completeDuration: Duration(milliseconds: 500),
165164
),
166165
header: WaterDropHeader(),

example/lib/ui/example/useStage/qq_chat_list.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ class _QQChatListState extends State<QQChatList> {
119119
_refreshController.loadComplete();
120120
},
121121
footer: CustomFooter(
122-
loadStyle: LoadStyle.HideAlways,
122+
loadStyle: LoadStyle.ShowAlways,
123123
builder: (context, mode) {
124124
if (mode == LoadStatus.loading) {
125125
return Container(

lib/src/internals/refresh_localizations.dart

+11-11
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ class RefreshLocalizationsDelegate
9797

9898
@override
9999
bool isSupported(Locale locale) {
100-
return ['en', 'zh', 'fr', 'ru', 'uk', 'ja'].contains(locale.languageCode);
100+
return ['en', 'zh', 'fr', 'ru', 'uk', 'ja','it'].contains(locale.languageCode);
101101
}
102102

103103
@override
@@ -169,7 +169,7 @@ class ChRefreshString implements RefreshString {
169169
String loadFailedText = "加载失败";
170170

171171
@override
172-
String loadingText = "加载中...";
172+
String loadingText = "加载中";
173173

174174
@override
175175
String noMoreText = "没有更多数据了";
@@ -181,7 +181,7 @@ class ChRefreshString implements RefreshString {
181181
String refreshFailedText = "刷新失败";
182182

183183
@override
184-
String refreshingText = "刷新中...";
184+
String refreshingText = "刷新中";
185185
}
186186

187187
/// English
@@ -205,7 +205,7 @@ class EnRefreshString implements RefreshString {
205205
String loadFailedText = "Load Failed";
206206

207207
@override
208-
String loadingText = "Loading...";
208+
String loadingText = "Loading";
209209

210210
@override
211211
String noMoreText = "No more data";
@@ -217,7 +217,7 @@ class EnRefreshString implements RefreshString {
217217
String refreshFailedText = "Refresh failed";
218218

219219
@override
220-
String refreshingText = "Refreshing...";
220+
String refreshingText = "Refreshing";
221221
}
222222

223223
/// French
@@ -277,7 +277,7 @@ class RuRefreshString implements RefreshString {
277277
String loadFailedText = "Ошибка загрузки";
278278

279279
@override
280-
String loadingText = "Загрузка...";
280+
String loadingText = "Загрузка";
281281

282282
@override
283283
String noMoreText = "Больше данных нет";
@@ -289,7 +289,7 @@ class RuRefreshString implements RefreshString {
289289
String refreshFailedText = "Не удалось обновить";
290290

291291
@override
292-
String refreshingText = "Обновление...";
292+
String refreshingText = "Обновление";
293293
}
294294

295295
// Ukrainian
@@ -313,7 +313,7 @@ class UkRefreshString implements RefreshString {
313313
String loadFailedText = "Помилка завантаження";
314314

315315
@override
316-
String loadingText = "Завантаження...";
316+
String loadingText = "Завантаження";
317317

318318
@override
319319
String noMoreText = "Більше даних немає";
@@ -325,7 +325,7 @@ class UkRefreshString implements RefreshString {
325325
String refreshFailedText = "Не вдалося оновити";
326326

327327
@override
328-
String refreshingText = "Оновлення...";
328+
String refreshingText = "Оновлення";
329329
}
330330

331331
/// Italian
@@ -385,7 +385,7 @@ class JpRefreshString implements RefreshString {
385385
String loadFailedText = "読み込みが失敗しました";
386386

387387
@override
388-
String loadingText = "読み込み中";
388+
String loadingText = "読み込み中";
389389

390390
@override
391391
String noMoreText = "データはありません";
@@ -397,6 +397,6 @@ class JpRefreshString implements RefreshString {
397397
String refreshFailedText = "更新が失敗しました";
398398

399399
@override
400-
String refreshingText = "更新中";
400+
String refreshingText = "更新中";
401401
}
402402

lib/src/internals/refresh_physics.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ class RefreshPhysics extends ScrollPhysics {
219219
}
220220
if (enablePullUp) {
221221
final RenderSliverLoading sliverFooter = viewportRender.lastChild;
222-
bottomExtra =
222+
bottomExtra = (!notFull && sliverFooter.geometry.scrollExtent!=0)||
223223
(notFull &&
224224
controller.footerStatus == LoadStatus.noMore &&
225225
!RefreshConfiguration.of(

0 commit comments

Comments
 (0)