mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
mod: refresh
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
import 'package:PiliPlus/common/widgets/dialog.dart';
|
import 'package:PiliPlus/common/widgets/dialog.dart';
|
||||||
|
import 'package:PiliPlus/common/widgets/refresh_indicator.dart';
|
||||||
import 'package:PiliPlus/http/loading_state.dart';
|
import 'package:PiliPlus/http/loading_state.dart';
|
||||||
import 'package:PiliPlus/http/user.dart';
|
import 'package:PiliPlus/http/user.dart';
|
||||||
import 'package:PiliPlus/models/user/fav_folder.dart';
|
import 'package:PiliPlus/models/user/fav_folder.dart';
|
||||||
@@ -71,7 +72,11 @@ class _FavDetailPageState extends State<FavDetailPage> {
|
|||||||
)
|
)
|
||||||
: const SizedBox.shrink(),
|
: const SizedBox.shrink(),
|
||||||
),
|
),
|
||||||
body: CustomScrollView(
|
body: refreshIndicator(
|
||||||
|
onRefresh: () async {
|
||||||
|
await _favDetailController.onRefresh();
|
||||||
|
},
|
||||||
|
child: CustomScrollView(
|
||||||
physics: const AlwaysScrollableScrollPhysics(),
|
physics: const AlwaysScrollableScrollPhysics(),
|
||||||
controller: _favDetailController.scrollController,
|
controller: _favDetailController.scrollController,
|
||||||
slivers: [
|
slivers: [
|
||||||
@@ -91,7 +96,8 @@ class _FavDetailPageState extends State<FavDetailPage> {
|
|||||||
)
|
)
|
||||||
: Obx(
|
: Obx(
|
||||||
() => AnimatedOpacity(
|
() => AnimatedOpacity(
|
||||||
opacity: _favDetailController.titleCtr.value ? 1 : 0,
|
opacity:
|
||||||
|
_favDetailController.titleCtr.value ? 1 : 0,
|
||||||
curve: Curves.easeOut,
|
curve: Curves.easeOut,
|
||||||
duration: const Duration(milliseconds: 500),
|
duration: const Duration(milliseconds: 500),
|
||||||
child: Column(
|
child: Column(
|
||||||
@@ -99,11 +105,13 @@ class _FavDetailPageState extends State<FavDetailPage> {
|
|||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
_favDetailController.item.value.title ?? '',
|
_favDetailController.item.value.title ?? '',
|
||||||
style: Theme.of(context).textTheme.titleMedium,
|
style:
|
||||||
|
Theme.of(context).textTheme.titleMedium,
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
'共${_favDetailController.item.value.mediaCount}条视频',
|
'共${_favDetailController.item.value.mediaCount}条视频',
|
||||||
style: Theme.of(context).textTheme.labelMedium,
|
style:
|
||||||
|
Theme.of(context).textTheme.labelMedium,
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
@@ -221,14 +229,15 @@ class _FavDetailPageState extends State<FavDetailPage> {
|
|||||||
_favDetailController.onReload();
|
_favDetailController.onReload();
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
SmartDialog.showToast(data['msg']);
|
SmartDialog.showToast(
|
||||||
|
data['msg']);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
child: Text('清除失效内容'),
|
child: Text('清除失效内容'),
|
||||||
),
|
),
|
||||||
if (!Utils.isDefault(
|
if (!Utils.isDefault(_favDetailController
|
||||||
_favDetailController.item.value.attr ??
|
.item.value.attr ??
|
||||||
0))
|
0))
|
||||||
PopupMenuItem(
|
PopupMenuItem(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
@@ -241,7 +250,8 @@ class _FavDetailPageState extends State<FavDetailPage> {
|
|||||||
mediaIds: [mediaId])
|
mediaIds: [mediaId])
|
||||||
.then((data) {
|
.then((data) {
|
||||||
if (data['status']) {
|
if (data['status']) {
|
||||||
SmartDialog.showToast('删除成功');
|
SmartDialog.showToast(
|
||||||
|
'删除成功');
|
||||||
Get.back(result: true);
|
Get.back(result: true);
|
||||||
} else {
|
} else {
|
||||||
SmartDialog.showToast(
|
SmartDialog.showToast(
|
||||||
@@ -296,7 +306,8 @@ class _FavDetailPageState extends State<FavDetailPage> {
|
|||||||
child: Column(
|
child: Column(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment:
|
||||||
|
CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
const SizedBox(height: 4),
|
const SizedBox(height: 4),
|
||||||
Text(
|
Text(
|
||||||
@@ -313,7 +324,8 @@ class _FavDetailPageState extends State<FavDetailPage> {
|
|||||||
.item.value.intro?.isNotEmpty ==
|
.item.value.intro?.isNotEmpty ==
|
||||||
true)
|
true)
|
||||||
Text(
|
Text(
|
||||||
_favDetailController.item.value.intro ??
|
_favDetailController
|
||||||
|
.item.value.intro ??
|
||||||
'',
|
'',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: Theme.of(context)
|
fontSize: Theme.of(context)
|
||||||
@@ -339,7 +351,8 @@ class _FavDetailPageState extends State<FavDetailPage> {
|
|||||||
.outline),
|
.outline),
|
||||||
),
|
),
|
||||||
const Spacer(),
|
const Spacer(),
|
||||||
if (_favDetailController.item.value.attr !=
|
if (_favDetailController
|
||||||
|
.item.value.attr !=
|
||||||
null)
|
null)
|
||||||
Text(
|
Text(
|
||||||
'共${_favDetailController.item.value.mediaCount}条视频 · ${Utils.isPublicText(_favDetailController.item.value.attr ?? 0)}',
|
'共${_favDetailController.item.value.mediaCount}条视频 · ${Utils.isPublicText(_favDetailController.item.value.attr ?? 0)}',
|
||||||
@@ -368,6 +381,7 @@ class _FavDetailPageState extends State<FavDetailPage> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import 'package:PiliPlus/common/widgets/icon_button.dart';
|
import 'package:PiliPlus/common/widgets/icon_button.dart';
|
||||||
|
import 'package:PiliPlus/common/widgets/refresh_indicator.dart';
|
||||||
import 'package:PiliPlus/http/loading_state.dart';
|
import 'package:PiliPlus/http/loading_state.dart';
|
||||||
import 'package:PiliPlus/pages/history/view.dart' show AppBarWidget;
|
import 'package:PiliPlus/pages/history/view.dart' show AppBarWidget;
|
||||||
import 'package:PiliPlus/utils/extension.dart';
|
import 'package:PiliPlus/utils/extension.dart';
|
||||||
@@ -146,7 +147,11 @@ class _LaterPageState extends State<LaterPage> {
|
|||||||
)
|
)
|
||||||
: const SizedBox(),
|
: const SizedBox(),
|
||||||
),
|
),
|
||||||
body: CustomScrollView(
|
body: refreshIndicator(
|
||||||
|
onRefresh: () async {
|
||||||
|
await _laterController.onRefresh();
|
||||||
|
},
|
||||||
|
child: CustomScrollView(
|
||||||
physics: const AlwaysScrollableScrollPhysics(),
|
physics: const AlwaysScrollableScrollPhysics(),
|
||||||
controller: _laterController.scrollController,
|
controller: _laterController.scrollController,
|
||||||
slivers: [
|
slivers: [
|
||||||
@@ -162,6 +167,7 @@ class _LaterPageState extends State<LaterPage> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import 'package:PiliPlus/common/widgets/loading_widget.dart';
|
||||||
import 'package:PiliPlus/common/widgets/refresh_indicator.dart';
|
import 'package:PiliPlus/common/widgets/refresh_indicator.dart';
|
||||||
import 'package:easy_debounce/easy_throttle.dart';
|
import 'package:easy_debounce/easy_throttle.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
@@ -52,21 +53,24 @@ class _AtMePageState extends State<AtMePage> {
|
|||||||
onRefresh: () async {
|
onRefresh: () async {
|
||||||
await _atMeController.onRefresh();
|
await _atMeController.onRefresh();
|
||||||
},
|
},
|
||||||
child: SingleChildScrollView(
|
child: Obx(
|
||||||
controller: _scrollController,
|
|
||||||
child: LayoutBuilder(
|
|
||||||
builder: (BuildContext context, BoxConstraints constraints) {
|
|
||||||
return Obx(
|
|
||||||
() {
|
() {
|
||||||
|
// TODO: refactor
|
||||||
if (_atMeController.msgFeedAtMeList.isEmpty) {
|
if (_atMeController.msgFeedAtMeList.isEmpty) {
|
||||||
|
if (_atMeController.cursor == -1 &&
|
||||||
|
_atMeController.cursorTime == -1) {
|
||||||
return const Center(
|
return const Center(
|
||||||
child: CircularProgressIndicator(),
|
child: CircularProgressIndicator(),
|
||||||
);
|
);
|
||||||
|
} else {
|
||||||
|
return scrollErrorWidget(
|
||||||
|
callback: _atMeController.queryMsgFeedAtMe);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return ListView.separated(
|
return ListView.separated(
|
||||||
|
controller: _scrollController,
|
||||||
itemCount: _atMeController.msgFeedAtMeList.length,
|
itemCount: _atMeController.msgFeedAtMeList.length,
|
||||||
shrinkWrap: true,
|
physics: const AlwaysScrollableScrollPhysics(),
|
||||||
physics: const NeverScrollableScrollPhysics(),
|
|
||||||
itemBuilder: (context, int i) {
|
itemBuilder: (context, int i) {
|
||||||
return ListTile(
|
return ListTile(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
@@ -86,10 +90,7 @@ class _AtMePageState extends State<AtMePage> {
|
|||||||
title: Text(
|
title: Text(
|
||||||
"${_atMeController.msgFeedAtMeList[i].user?.nickname} "
|
"${_atMeController.msgFeedAtMeList[i].user?.nickname} "
|
||||||
"在${_atMeController.msgFeedAtMeList[i].item?.business}中@了我",
|
"在${_atMeController.msgFeedAtMeList[i].item?.business}中@了我",
|
||||||
style: Theme.of(context)
|
style: Theme.of(context).textTheme.titleMedium!.copyWith(
|
||||||
.textTheme
|
|
||||||
.titleMedium!
|
|
||||||
.copyWith(
|
|
||||||
color: Theme.of(context).colorScheme.primary,
|
color: Theme.of(context).colorScheme.primary,
|
||||||
)),
|
)),
|
||||||
subtitle: Column(
|
subtitle: Column(
|
||||||
@@ -106,22 +107,17 @@ class _AtMePageState extends State<AtMePage> {
|
|||||||
.textTheme
|
.textTheme
|
||||||
.bodyMedium!
|
.bodyMedium!
|
||||||
.copyWith(
|
.copyWith(
|
||||||
color: Theme.of(context)
|
color: Theme.of(context).colorScheme.outline))
|
||||||
.colorScheme
|
|
||||||
.outline))
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
trailing: _atMeController
|
trailing: _atMeController.msgFeedAtMeList[i].item?.image !=
|
||||||
.msgFeedAtMeList[i].item?.image !=
|
|
||||||
null &&
|
null &&
|
||||||
_atMeController.msgFeedAtMeList[i].item?.image !=
|
_atMeController.msgFeedAtMeList[i].item?.image != ""
|
||||||
""
|
|
||||||
? NetworkImgLayer(
|
? NetworkImgLayer(
|
||||||
width: 45,
|
width: 45,
|
||||||
height: 45,
|
height: 45,
|
||||||
type: 'cover',
|
type: 'cover',
|
||||||
src: _atMeController
|
src: _atMeController.msgFeedAtMeList[i].item?.image,
|
||||||
.msgFeedAtMeList[i].item?.image,
|
|
||||||
)
|
)
|
||||||
: null,
|
: null,
|
||||||
);
|
);
|
||||||
@@ -136,8 +132,6 @@ class _AtMePageState extends State<AtMePage> {
|
|||||||
},
|
},
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
);
|
|
||||||
}),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -53,6 +53,7 @@ class _LikeMePageState extends State<LikeMePage> {
|
|||||||
onRefresh: () async {
|
onRefresh: () async {
|
||||||
await _likeMeController.onRefresh();
|
await _likeMeController.onRefresh();
|
||||||
},
|
},
|
||||||
|
// TODO: refactor
|
||||||
child: SingleChildScrollView(
|
child: SingleChildScrollView(
|
||||||
controller: _scrollController,
|
controller: _scrollController,
|
||||||
child: LayoutBuilder(
|
child: LayoutBuilder(
|
||||||
|
|||||||
@@ -51,11 +51,8 @@ class _ReplyMePageState extends State<ReplyMePage> {
|
|||||||
onRefresh: () async {
|
onRefresh: () async {
|
||||||
await _replyMeController.onRefresh();
|
await _replyMeController.onRefresh();
|
||||||
},
|
},
|
||||||
child: SingleChildScrollView(
|
// TODO: refactor
|
||||||
controller: _scrollController,
|
child: Obx(
|
||||||
child: LayoutBuilder(
|
|
||||||
builder: (BuildContext context, BoxConstraints constraints) {
|
|
||||||
return Obx(
|
|
||||||
() {
|
() {
|
||||||
if (_replyMeController.msgFeedReplyMeList.isEmpty) {
|
if (_replyMeController.msgFeedReplyMeList.isEmpty) {
|
||||||
return const Center(
|
return const Center(
|
||||||
@@ -63,9 +60,9 @@ class _ReplyMePageState extends State<ReplyMePage> {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
return ListView.separated(
|
return ListView.separated(
|
||||||
|
controller: _scrollController,
|
||||||
itemCount: _replyMeController.msgFeedReplyMeList.length,
|
itemCount: _replyMeController.msgFeedReplyMeList.length,
|
||||||
shrinkWrap: true,
|
physics: const AlwaysScrollableScrollPhysics(),
|
||||||
physics: const NeverScrollableScrollPhysics(),
|
|
||||||
itemBuilder: (context, int i) {
|
itemBuilder: (context, int i) {
|
||||||
return ListTile(
|
return ListTile(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
@@ -80,14 +77,15 @@ class _ReplyMePageState extends State<ReplyMePage> {
|
|||||||
width: 45,
|
width: 45,
|
||||||
height: 45,
|
height: 45,
|
||||||
type: 'avatar',
|
type: 'avatar',
|
||||||
src: _replyMeController
|
src: _replyMeController.msgFeedReplyMeList[i].user?.avatar,
|
||||||
.msgFeedReplyMeList[i].user?.avatar,
|
|
||||||
),
|
),
|
||||||
title: Text(
|
title: Text(
|
||||||
"${_replyMeController.msgFeedReplyMeList[i].user?.nickname} "
|
"${_replyMeController.msgFeedReplyMeList[i].user?.nickname} "
|
||||||
"回复了我的${_replyMeController.msgFeedReplyMeList[i].item?.business}",
|
"回复了我的${_replyMeController.msgFeedReplyMeList[i].item?.business}",
|
||||||
style: Theme.of(context).textTheme.bodyMedium!.copyWith(
|
style: Theme.of(context)
|
||||||
color: Theme.of(context).colorScheme.primary),
|
.textTheme
|
||||||
|
.bodyMedium!
|
||||||
|
.copyWith(color: Theme.of(context).colorScheme.primary),
|
||||||
),
|
),
|
||||||
subtitle: Column(
|
subtitle: Column(
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
@@ -114,9 +112,8 @@ class _ReplyMePageState extends State<ReplyMePage> {
|
|||||||
.textTheme
|
.textTheme
|
||||||
.labelMedium!
|
.labelMedium!
|
||||||
.copyWith(
|
.copyWith(
|
||||||
color: Theme.of(context)
|
color:
|
||||||
.colorScheme
|
Theme.of(context).colorScheme.outline,
|
||||||
.outline,
|
|
||||||
height: 1.5)),
|
height: 1.5)),
|
||||||
if (_replyMeController.msgFeedReplyMeList[i].item
|
if (_replyMeController.msgFeedReplyMeList[i].item
|
||||||
?.rootReplyContent !=
|
?.rootReplyContent !=
|
||||||
@@ -132,9 +129,8 @@ class _ReplyMePageState extends State<ReplyMePage> {
|
|||||||
.textTheme
|
.textTheme
|
||||||
.labelMedium!
|
.labelMedium!
|
||||||
.copyWith(
|
.copyWith(
|
||||||
color: Theme.of(context)
|
color:
|
||||||
.colorScheme
|
Theme.of(context).colorScheme.outline,
|
||||||
.outline,
|
|
||||||
height: 1.5)),
|
height: 1.5)),
|
||||||
]),
|
]),
|
||||||
);
|
);
|
||||||
@@ -149,8 +145,6 @@ class _ReplyMePageState extends State<ReplyMePage> {
|
|||||||
},
|
},
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
);
|
|
||||||
}),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -57,11 +57,8 @@ class _SysMsgPageState extends State<SysMsgPage> {
|
|||||||
onRefresh: () async {
|
onRefresh: () async {
|
||||||
await _sysMsgController.onRefresh();
|
await _sysMsgController.onRefresh();
|
||||||
},
|
},
|
||||||
child: SingleChildScrollView(
|
// TODO: refactor
|
||||||
controller: _scrollController,
|
child: Obx(
|
||||||
child: LayoutBuilder(
|
|
||||||
builder: (BuildContext context, BoxConstraints constraints) {
|
|
||||||
return Obx(
|
|
||||||
() {
|
() {
|
||||||
if (_sysMsgController.msgFeedSysMsgList.isEmpty) {
|
if (_sysMsgController.msgFeedSysMsgList.isEmpty) {
|
||||||
return const Center(
|
return const Center(
|
||||||
@@ -69,9 +66,9 @@ class _SysMsgPageState extends State<SysMsgPage> {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
return ListView.separated(
|
return ListView.separated(
|
||||||
|
controller: _scrollController,
|
||||||
itemCount: _sysMsgController.msgFeedSysMsgList.length,
|
itemCount: _sysMsgController.msgFeedSysMsgList.length,
|
||||||
shrinkWrap: true,
|
physics: const AlwaysScrollableScrollPhysics(),
|
||||||
physics: const NeverScrollableScrollPhysics(),
|
|
||||||
itemBuilder: (context, int i) {
|
itemBuilder: (context, int i) {
|
||||||
String? content =
|
String? content =
|
||||||
_sysMsgController.msgFeedSysMsgList[i].content;
|
_sysMsgController.msgFeedSysMsgList[i].content;
|
||||||
@@ -96,9 +93,8 @@ class _SysMsgPageState extends State<SysMsgPage> {
|
|||||||
child: Text(
|
child: Text(
|
||||||
'取消',
|
'取消',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Theme.of(context)
|
color:
|
||||||
.colorScheme
|
Theme.of(context).colorScheme.outline,
|
||||||
.outline,
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -141,8 +137,7 @@ class _SysMsgPageState extends State<SysMsgPage> {
|
|||||||
.textTheme
|
.textTheme
|
||||||
.bodySmall!
|
.bodySmall!
|
||||||
.copyWith(
|
.copyWith(
|
||||||
color:
|
color: Theme.of(context).colorScheme.outline,
|
||||||
Theme.of(context).colorScheme.outline,
|
|
||||||
),
|
),
|
||||||
textAlign: TextAlign.end,
|
textAlign: TextAlign.end,
|
||||||
),
|
),
|
||||||
@@ -161,8 +156,6 @@ class _SysMsgPageState extends State<SysMsgPage> {
|
|||||||
},
|
},
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
);
|
|
||||||
}),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import 'package:PiliPlus/common/constants.dart';
|
import 'package:PiliPlus/common/constants.dart';
|
||||||
import 'package:PiliPlus/common/skeleton/video_card_h.dart';
|
import 'package:PiliPlus/common/skeleton/video_card_h.dart';
|
||||||
|
import 'package:PiliPlus/common/widgets/refresh_indicator.dart';
|
||||||
import 'package:PiliPlus/http/loading_state.dart';
|
import 'package:PiliPlus/http/loading_state.dart';
|
||||||
import 'package:PiliPlus/pages/subscription/widgets/item.dart';
|
import 'package:PiliPlus/pages/subscription/widgets/item.dart';
|
||||||
import 'package:PiliPlus/utils/grid.dart';
|
import 'package:PiliPlus/utils/grid.dart';
|
||||||
@@ -22,7 +23,11 @@ class _SubPageState extends State<SubPage> {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
appBar: AppBar(title: const Text('我的订阅')),
|
appBar: AppBar(title: const Text('我的订阅')),
|
||||||
body: CustomScrollView(
|
body: refreshIndicator(
|
||||||
|
onRefresh: () async {
|
||||||
|
await _subController.onRefresh();
|
||||||
|
},
|
||||||
|
child: CustomScrollView(
|
||||||
slivers: [
|
slivers: [
|
||||||
Obx(() => _buildBody(_subController.loadingState.value)),
|
Obx(() => _buildBody(_subController.loadingState.value)),
|
||||||
SliverToBoxAdapter(
|
SliverToBoxAdapter(
|
||||||
@@ -32,6 +37,7 @@ class _SubPageState extends State<SubPage> {
|
|||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ import 'package:PiliPlus/common/skeleton/video_reply.dart';
|
|||||||
import 'package:PiliPlus/common/widgets/icon_button.dart';
|
import 'package:PiliPlus/common/widgets/icon_button.dart';
|
||||||
import 'package:PiliPlus/common/widgets/loading_widget.dart';
|
import 'package:PiliPlus/common/widgets/loading_widget.dart';
|
||||||
import 'package:PiliPlus/common/widgets/network_img_layer.dart';
|
import 'package:PiliPlus/common/widgets/network_img_layer.dart';
|
||||||
|
import 'package:PiliPlus/common/widgets/refresh_indicator.dart';
|
||||||
import 'package:PiliPlus/http/loading_state.dart';
|
import 'package:PiliPlus/http/loading_state.dart';
|
||||||
import 'package:PiliPlus/pages/video/detail/note/note_list_page_ctr.dart';
|
import 'package:PiliPlus/pages/video/detail/note/note_list_page_ctr.dart';
|
||||||
import 'package:PiliPlus/utils/app_scheme.dart';
|
import 'package:PiliPlus/utils/app_scheme.dart';
|
||||||
@@ -79,7 +80,7 @@ class _NoteListPageState extends State<NoteListPage> {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
Success() => (loadingState.response as List?)?.isNotEmpty == true
|
Success() => (loadingState.response as List?)?.isNotEmpty == true
|
||||||
? RefreshIndicator(
|
? refreshIndicator(
|
||||||
onRefresh: () async {
|
onRefresh: () async {
|
||||||
await _controller.onRefresh();
|
await _controller.onRefresh();
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user