fix: 黑名单展示
This commit is contained in:
@ -61,7 +61,7 @@ class _BlackListPageState extends State<BlackListPage> {
|
|||||||
centerTitle: false,
|
centerTitle: false,
|
||||||
title: Obx(
|
title: Obx(
|
||||||
() => Text(
|
() => Text(
|
||||||
'黑名单管理 - ${_blackListController.total.value}',
|
'黑名单管理 ${_blackListController.total.value == 0 ? '' : '- ${_blackListController.total.value}'}',
|
||||||
style: Theme.of(context).textTheme.titleMedium,
|
style: Theme.of(context).textTheme.titleMedium,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -76,8 +76,12 @@ class _BlackListPageState extends State<BlackListPage> {
|
|||||||
if (data['status']) {
|
if (data['status']) {
|
||||||
List<BlackListItem> list = _blackListController.blackList;
|
List<BlackListItem> list = _blackListController.blackList;
|
||||||
return Obx(
|
return Obx(
|
||||||
() => list.length == 1
|
() => list.isEmpty
|
||||||
? const SizedBox()
|
? CustomScrollView(
|
||||||
|
slivers: [
|
||||||
|
HttpError(errMsg: '你没有拉黑任何人哦~_~', fn: () => {})
|
||||||
|
],
|
||||||
|
)
|
||||||
: ListView.builder(
|
: ListView.builder(
|
||||||
controller: scrollController,
|
controller: scrollController,
|
||||||
itemCount: list.length,
|
itemCount: list.length,
|
||||||
|
Reference in New Issue
Block a user