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

View File

@ -114,16 +114,15 @@ class VideoContent extends StatelessWidget {
Row( Row(
mainAxisAlignment: MainAxisAlignment.end, mainAxisAlignment: MainAxisAlignment.end,
children: [ children: [
SizedBox( IconButton(
height: 35, style: ButtonStyle(
width: 35, padding: WidgetStateProperty.all(EdgeInsets.zero),
child: IconButton(
onPressed: () => cancelSub?.call(subFolderItem),
style: TextButton.styleFrom(
foregroundColor: Theme.of(context).colorScheme.outline,
padding: const EdgeInsets.fromLTRB(0, 0, 0, 0),
), ),
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,
), ),
) )
], ],