feat(flutter): 重设计播放页与操作面板
This commit is contained in:
1 parent
148fbc3c93
commit
9a4269b847
24 files changed
+2395
-1101
No files matched your search
@@ -10,7 +10,7 @@ const double _numberSize = 15;
|
||||
const double _lockSize = 16;
|
||||
const double _lockGap = 4;
|
||||
const double _lockWeight = 300;
|
||||
const double _coverAlpha = 0.45;
|
||||
const double _coverAlpha = 0.55;
|
||||
|
||||
/// 选集格子。需要解锁时铺一层透明底,锁在上,集数在锁下面。
|
||||
class EpisodePickerCell extends StatelessWidget {
|
||||
@@ -38,12 +38,19 @@ class EpisodePickerCell extends StatelessWidget {
|
||||
child: Stack(
|
||||
fit: StackFit.expand,
|
||||
children: [
|
||||
if (!episode.locked) Center(child: _EpisodeNumber(episode.number)),
|
||||
if (!episode.locked)
|
||||
Center(
|
||||
child: _EpisodeNumber(
|
||||
episode.number,
|
||||
color: selected ? AppColors.onPrimary : AppColors.cream,
|
||||
),
|
||||
),
|
||||
if (episode.locked)
|
||||
_LockCover(
|
||||
episodeId: episode.id,
|
||||
number: episode.number,
|
||||
label: lockLabel,
|
||||
selected: selected,
|
||||
),
|
||||
],
|
||||
),
|
||||
@@ -53,16 +60,17 @@ class EpisodePickerCell extends StatelessWidget {
|
||||
}
|
||||
|
||||
class _EpisodeNumber extends StatelessWidget {
|
||||
const _EpisodeNumber(this.number);
|
||||
const _EpisodeNumber(this.number, {required this.color});
|
||||
|
||||
final int number;
|
||||
final Color color;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Text(
|
||||
'$number',
|
||||
style: const TextStyle(
|
||||
color: AppColors.cream,
|
||||
style: TextStyle(
|
||||
color: color,
|
||||
fontSize: _numberSize,
|
||||
fontWeight: FontWeight.w600,
|
||||
height: 1,
|
||||
@@ -77,11 +85,13 @@ class _LockCover extends StatelessWidget {
|
||||
required this.episodeId,
|
||||
required this.number,
|
||||
required this.label,
|
||||
required this.selected,
|
||||
});
|
||||
|
||||
final String episodeId;
|
||||
final int number;
|
||||
final String label;
|
||||
final bool selected;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@@ -90,7 +100,7 @@ class _LockCover extends StatelessWidget {
|
||||
children: [
|
||||
ColoredBox(
|
||||
key: ValueKey('episode-lock-cover-$episodeId'),
|
||||
color: AppColors.ink.withValues(alpha: _coverAlpha),
|
||||
color: AppColors.card.withValues(alpha: _coverAlpha),
|
||||
),
|
||||
Center(
|
||||
child: Column(
|
||||
@@ -102,11 +112,14 @@ class _LockCover extends StatelessWidget {
|
||||
size: _lockSize,
|
||||
weight: _lockWeight,
|
||||
fill: 0,
|
||||
color: AppColors.gold,
|
||||
color: AppColors.secondary,
|
||||
semanticLabel: label,
|
||||
),
|
||||
const SizedBox(height: _lockGap),
|
||||
_EpisodeNumber(number),
|
||||
_EpisodeNumber(
|
||||
number,
|
||||
color: selected ? AppColors.onPrimary : AppColors.cream,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
Reference in new issue
Block a user