mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-19 16:46:22 +08:00
feat: space opus
Closes #833 Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
48
lib/common/skeleton/space_opus.dart
Normal file
48
lib/common/skeleton/space_opus.dart
Normal file
@@ -0,0 +1,48 @@
|
||||
import 'package:PiliPlus/common/skeleton/skeleton.dart';
|
||||
import 'package:PiliPlus/utils/utils.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class SpaceOpusSkeleton extends StatelessWidget {
|
||||
const SpaceOpusSkeleton({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final surface = Theme.of(context).colorScheme.onInverseSurface;
|
||||
return Skeleton(
|
||||
child: Card(
|
||||
clipBehavior: Clip.hardEdge,
|
||||
margin: EdgeInsets.zero,
|
||||
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,
|
||||
color: surface,
|
||||
),
|
||||
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,
|
||||
),
|
||||
],
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user