opt: 我的订阅页面布局

This commit is contained in:
guozhigq
2024-06-08 17:54:40 +08:00
parent b5fa441faf
commit f2c029b6e5
2 changed files with 28 additions and 22 deletions

View File

@ -53,6 +53,7 @@ class _SubPageState extends State<SubPage> {
if (snapshot.connectionState == ConnectionState.done) {
Map? data = snapshot.data;
if (data != null && data['status']) {
if (_subController.subFolderData.value.list!.isNotEmpty) {
return Obx(
() => ListView.builder(
controller: scrollController,
@ -65,6 +66,12 @@ class _SubPageState extends State<SubPage> {
},
),
);
} else {
return const CustomScrollView(
physics: NeverScrollableScrollPhysics(),
slivers: [HttpError(errMsg: '', btnText: '没有数据', fn: null)],
);
}
} else {
return CustomScrollView(
physics: const NeverScrollableScrollPhysics(),

View File

@ -114,16 +114,15 @@ class VideoContent extends StatelessWidget {
Row(
mainAxisAlignment: MainAxisAlignment.end,
children: [
SizedBox(
height: 35,
width: 35,
child: IconButton(
onPressed: () => cancelSub?.call(subFolderItem),
style: TextButton.styleFrom(
foregroundColor: Theme.of(context).colorScheme.outline,
padding: const EdgeInsets.fromLTRB(0, 0, 0, 0),
IconButton(
style: ButtonStyle(
padding: WidgetStateProperty.all(EdgeInsets.zero),
),
icon: const Icon(Icons.delete_outline, size: 18),
onPressed: () => cancelSub?.call(subFolderItem),
icon: Icon(
Icons.clear_outlined,
color: Theme.of(context).colorScheme.outline,
size: 18,
),
)
],