Skip to content

Commit

Permalink
fix details after commit
Browse files Browse the repository at this point in the history
  • Loading branch information
peng8350 committed Jan 13, 2020
1 parent d2361b0 commit 915f15c
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 33 deletions.
6 changes: 6 additions & 0 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,13 @@ class MyApp extends StatelessWidget {
supportedLocales: [
const Locale('en'),
const Locale('zh'),
const Locale('ja'),
const Locale('uk'),
const Locale('it'),
const Locale('ru'),
const Locale('fr'),
],
locale: const Locale('ja'),
localeResolutionCallback:
(Locale locale, Iterable<Locale> supportedLocales) {
//print("change language");
Expand Down
37 changes: 19 additions & 18 deletions example/lib/other/refresh_glowindicator.dart
Original file line number Diff line number Diff line change
Expand Up @@ -21,25 +21,26 @@ class RefreshScrollBehavior extends ScrollBehavior {
return child;
case TargetPlatform.macOS:
case TargetPlatform.android:
case TargetPlatform.fuchsia:
return GlowingOverscrollIndicator(
child: child,
// this will disable top Bouncing OverScroll Indicator showing in Android
showLeading: true, //顶部水波纹是否展示
showTrailing: true, //底部水波纹是否展示
axisDirection: axisDirection,
notificationPredicate: (notification) {
if (notification.depth == 0) {
// 越界了拖动触发overScroll的话就没必要展示水波纹
if (notification.metrics.outOfRange) {
return false;
}
return true;
return GlowingOverscrollIndicator(
child: child,
// this will disable top Bouncing OverScroll Indicator showing in Android
showLeading: true, //顶部水波纹是否展示
showTrailing: true, //底部水波纹是否展示
axisDirection: axisDirection,
notificationPredicate: (notification) {
if (notification.depth == 0) {
// 越界了拖动触发overScroll的话就没必要展示水波纹
if (notification.metrics.outOfRange) {
return false;
}
return false;
},
color: Theme.of(context).primaryColor,
);
return true;
}
return false;
},
color: Theme.of(context).primaryColor,
);
case TargetPlatform.fuchsia:

}
return null;
}
Expand Down
3 changes: 1 addition & 2 deletions example/lib/ui/example/useStage/basic.dart
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,6 @@ class _OnlyListViewState extends State<OnlyListView> {

Widget buildCtn() {
return ListView.separated(
reverse: false,
padding: EdgeInsets.only(left: 5, right: 5),
itemBuilder: (c, i) => Item(
title: data[i],
Expand All @@ -160,7 +159,7 @@ class _OnlyListViewState extends State<OnlyListView> {
enablePullUp: true,
child: buildCtn(),
footer: ClassicFooter(
loadStyle: LoadStyle.ShowAlways,
loadStyle: LoadStyle.ShowWhenLoading,
completeDuration: Duration(milliseconds: 500),
),
header: WaterDropHeader(),
Expand Down
2 changes: 1 addition & 1 deletion example/lib/ui/example/useStage/qq_chat_list.dart
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ class _QQChatListState extends State<QQChatList> {
_refreshController.loadComplete();
},
footer: CustomFooter(
loadStyle: LoadStyle.HideAlways,
loadStyle: LoadStyle.ShowAlways,
builder: (context, mode) {
if (mode == LoadStatus.loading) {
return Container(
Expand Down
22 changes: 11 additions & 11 deletions lib/src/internals/refresh_localizations.dart
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ class RefreshLocalizationsDelegate

@override
bool isSupported(Locale locale) {
return ['en', 'zh', 'fr', 'ru', 'uk', 'ja'].contains(locale.languageCode);
return ['en', 'zh', 'fr', 'ru', 'uk', 'ja','it'].contains(locale.languageCode);
}

@override
Expand Down Expand Up @@ -169,7 +169,7 @@ class ChRefreshString implements RefreshString {
String loadFailedText = "加载失败";

@override
String loadingText = "加载中...";
String loadingText = "加载中";

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

@override
String refreshingText = "刷新中...";
String refreshingText = "刷新中";
}

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

@override
String loadingText = "Loading...";
String loadingText = "Loading";

@override
String noMoreText = "No more data";
Expand All @@ -217,7 +217,7 @@ class EnRefreshString implements RefreshString {
String refreshFailedText = "Refresh failed";

@override
String refreshingText = "Refreshing...";
String refreshingText = "Refreshing";
}

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

@override
String loadingText = "Загрузка...";
String loadingText = "Загрузка";

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

@override
String refreshingText = "Обновление...";
String refreshingText = "Обновление";
}

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

@override
String loadingText = "Завантаження...";
String loadingText = "Завантаження";

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

@override
String refreshingText = "Оновлення...";
String refreshingText = "Оновлення";
}

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

@override
String loadingText = "読み込み中";
String loadingText = "読み込み中";

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

@override
String refreshingText = "更新中";
String refreshingText = "更新中";
}

2 changes: 1 addition & 1 deletion lib/src/internals/refresh_physics.dart
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ class RefreshPhysics extends ScrollPhysics {
}
if (enablePullUp) {
final RenderSliverLoading sliverFooter = viewportRender.lastChild;
bottomExtra =
bottomExtra = (!notFull && sliverFooter.geometry.scrollExtent!=0)||
(notFull &&
controller.footerStatus == LoadStatus.noMore &&
!RefreshConfiguration.of(
Expand Down

0 comments on commit 915f15c

Please sign in to comment.