fix: 订阅删除按钮位置错误

This commit is contained in:
orz12
2024-04-22 20:13:49 +08:00
parent d69a3af2e8
commit e8eee92b08

View File

@@ -78,57 +78,60 @@ class VideoContent extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Expanded( return Expanded(
child: Padding( child: Stack(
padding: const EdgeInsets.fromLTRB(10, 2, 6, 0), children: [
child: Column( Padding(
crossAxisAlignment: CrossAxisAlignment.start, padding: const EdgeInsets.fromLTRB(10, 2, 6, 0),
children: [ child: Column(
Text( crossAxisAlignment: CrossAxisAlignment.start,
subFolderItem.title!,
textAlign: TextAlign.start,
style: const TextStyle(
fontWeight: FontWeight.w500,
letterSpacing: 0.3,
),
),
const SizedBox(height: 2),
Text(
'合集 UP主${subFolderItem.upper!.name!}',
textAlign: TextAlign.start,
style: TextStyle(
fontSize: Theme.of(context).textTheme.labelMedium!.fontSize,
color: Theme.of(context).colorScheme.outline,
),
),
const SizedBox(height: 2),
Text(
'${subFolderItem.mediaCount}个视频',
textAlign: TextAlign.start,
style: TextStyle(
fontSize: Theme.of(context).textTheme.labelMedium!.fontSize,
color: Theme.of(context).colorScheme.outline,
),
),
const Spacer(),
Row(
mainAxisAlignment: MainAxisAlignment.end,
children: [ children: [
SizedBox( Text(
height: 35, subFolderItem.title!,
width: 35, textAlign: TextAlign.start,
child: IconButton( style: const TextStyle(
onPressed: () => cancelSub?.call(subFolderItem), fontWeight: FontWeight.w500,
style: TextButton.styleFrom( letterSpacing: 0.3,
foregroundColor: Theme.of(context).colorScheme.outline,
padding: const EdgeInsets.fromLTRB(0, 0, 0, 0),
),
icon: const Icon(Icons.delete_outline, size: 18),
), ),
) ),
const SizedBox(height: 2),
Text(
'合集 UP主${subFolderItem.upper!.name!}',
textAlign: TextAlign.start,
style: TextStyle(
fontSize: Theme.of(context).textTheme.labelMedium!.fontSize,
color: Theme.of(context).colorScheme.outline,
),
),
const SizedBox(height: 2),
Text(
'${subFolderItem.mediaCount}个视频',
textAlign: TextAlign.start,
style: TextStyle(
fontSize: Theme.of(context).textTheme.labelMedium!.fontSize,
color: Theme.of(context).colorScheme.outline,
),
),
const Spacer(),
], ],
) ),
], ),
), Positioned(
bottom: 0,
right: 0,
child: 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),
),
icon: const Icon(Icons.delete_outline, size: 18),
),
),
),
],
), ),
); );
} }