Signed-off-by: dom <githubaccount56556@proton.me>
This commit is contained in:
dom
2026-07-30 12:49:30 +08:00
parent 133f45945c
commit e892411092
27 changed files with 617 additions and 780 deletions

View File

@@ -7,43 +7,37 @@ class SpaceOpusSkeleton extends StatelessWidget {
@override
Widget build(BuildContext context) {
final surface = Theme.of(context).colorScheme.onInverseSurface;
final surface = ColorScheme.of(context).onInverseSurface;
return Skeleton(
child: Card(
clipBehavior: Clip.hardEdge,
shape: const RoundedRectangleBorder(
borderRadius: BorderRadius.all(Radius.circular(6)),
),
child: LayoutBuilder(
builder: (context, constraints) {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
height:
(0.68 + 0.82 * Utils.random.nextDouble()) *
constraints.maxWidth,
shape: const RoundedRectangleBorder(borderRadius: .all(.circular(6))),
child: Column(
crossAxisAlignment: .start,
children: [
AspectRatio(
aspectRatio: 1 / (0.68 + 0.82 * Utils.random.nextDouble()),
child: DecoratedBox(
decoration: BoxDecoration(
color: surface,
borderRadius: const .vertical(top: .circular(6)),
),
Container(
height: 10,
color: surface,
margin: const EdgeInsets.all(10),
width: constraints.maxWidth * 0.7,
),
Container(
height: 10,
color: surface,
margin: const EdgeInsets.only(
left: 10,
right: 10,
bottom: 10,
),
width: constraints.maxWidth,
),
],
);
},
),
),
FractionallySizedBox(
widthFactor: 0.7,
alignment: .topLeft,
child: Container(
height: 10,
color: surface,
margin: const .all(10),
),
),
Container(
height: 10,
color: surface,
margin: const .only(left: 10, right: 10, bottom: 10),
),
],
),
),
);

View File

@@ -7,15 +7,12 @@ class VideoCardHSkeleton extends StatelessWidget {
@override
Widget build(BuildContext context) {
final color = Theme.of(context).colorScheme.onInverseSurface;
final color = ColorScheme.of(context).onInverseSurface;
return Skeleton(
child: Padding(
padding: const .symmetric(
horizontal: Style.safeSpace,
vertical: 5,
),
padding: const .symmetric(horizontal: Style.safeSpace, vertical: 5),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
crossAxisAlignment: .start,
children: [
AspectRatio(
aspectRatio: Style.aspectRatio,
@@ -30,13 +27,13 @@ class VideoCardHSkeleton extends StatelessWidget {
child: Padding(
padding: const .fromLTRB(10, 4, 6, 4),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
crossAxisAlignment: .start,
children: [
Container(
color: color,
width: 200,
height: 11,
margin: const EdgeInsets.only(bottom: 5),
height: 13,
margin: const .only(bottom: 5),
),
Container(
color: color,
@@ -48,15 +45,15 @@ class VideoCardHSkeleton extends StatelessWidget {
color: color,
width: 100,
height: 13,
margin: const EdgeInsets.only(bottom: 5),
margin: const .only(bottom: 5),
),
Row(
spacing: 8,
children: [
Container(
color: color,
width: 40,
height: 13,
margin: const EdgeInsets.only(right: 8),
),
Container(
color: color,

View File

@@ -7,54 +7,58 @@ class VideoCardVSkeleton extends StatelessWidget {
@override
Widget build(BuildContext context) {
final color = Theme.of(context).colorScheme.onInverseSurface;
final color = ColorScheme.of(context).onInverseSurface;
return Skeleton(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
crossAxisAlignment: .start,
children: [
AspectRatio(
aspectRatio: Style.aspectRatio,
child: DecoratedBox(
decoration: BoxDecoration(
color: color,
borderRadius: Style.mdRadius,
borderRadius: const .vertical(top: Style.imgRadius),
),
),
),
Padding(
// 多列
padding: const EdgeInsets.fromLTRB(4, 5, 6, 6),
// 单列
// padding: const EdgeInsets.fromLTRB(14, 10, 4, 8),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
// const SizedBox(height: 6),
Container(
width: 200,
height: 13,
margin: const EdgeInsets.only(bottom: 5),
color: color,
),
Container(
width: 150,
height: 13,
margin: const EdgeInsets.only(bottom: 12),
color: color,
),
Container(
width: 110,
height: 13,
margin: const EdgeInsets.only(bottom: 5),
color: color,
),
Container(
width: 75,
height: 13,
color: color,
),
],
Expanded(
child: Padding(
padding: const .fromLTRB(4, 5, 6, 6),
child: Column(
crossAxisAlignment: .start,
mainAxisAlignment: .spaceBetween,
children: [
Container(width: 200, height: 13, color: color),
Container(
height: 13,
width: 140,
color: color,
margin: const .only(top: 5),
),
const Spacer(),
Row(
spacing: 8,
children: [
Container(
height: 11,
color: color,
width: 40,
),
Container(
height: 11,
color: color,
width: 40,
),
],
),
Container(
height: 11,
width: 75,
color: color,
margin: const .only(top: 5),
),
],
),
),
),
],