This commit is contained in:
guozhigq
2023-07-26 22:04:56 +08:00
parent 5b46123f3f
commit ca12be5373
19 changed files with 311 additions and 215 deletions

View File

@ -1,5 +1,6 @@
import 'package:flutter/material.dart';
import 'package:pilipala/common/constants.dart';
import 'package:pilipala/utils/feed_back.dart';
class ActionItem extends StatelessWidget {
final Icon? icon;
@ -22,7 +23,10 @@ class ActionItem extends StatelessWidget {
@override
Widget build(BuildContext context) {
return InkWell(
onTap: () => onTap!(),
onTap: () => {
feedBack(),
onTap!(),
},
borderRadius: StyleString.mdRadius,
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
@ -30,20 +34,27 @@ class ActionItem extends StatelessWidget {
const SizedBox(height: 4),
selectStatus
? Icon(selectIcon!.icon!,
size: 21, color: Theme.of(context).primaryColor)
size: 18, color: Theme.of(context).colorScheme.primary)
: Icon(icon!.icon!,
size: 21, color: Theme.of(context).colorScheme.outline),
const SizedBox(height: 4),
size: 18, color: Theme.of(context).colorScheme.outline),
const SizedBox(height: 6),
AnimatedOpacity(
opacity: loadingStatus! ? 0 : 1,
duration: const Duration(milliseconds: 200),
child: Text(
text ?? '',
style: TextStyle(
color: selectStatus
? Theme.of(context).primaryColor
: Theme.of(context).colorScheme.outline,
fontSize: Theme.of(context).textTheme.labelSmall?.fontSize),
child: AnimatedSwitcher(
duration: const Duration(milliseconds: 300),
transitionBuilder: (Widget child, Animation<double> animation) {
return ScaleTransition(scale: animation, child: child);
},
child: Text(
text ?? '',
key: ValueKey<String>(text ?? ''),
style: TextStyle(
color: selectStatus
? Theme.of(context).colorScheme.primary
: Theme.of(context).colorScheme.outline,
fontSize: Theme.of(context).textTheme.labelSmall!.fontSize),
),
),
),
],

View File

@ -33,7 +33,7 @@ class ActionRowItem extends StatelessWidget {
onTap!(),
},
child: Padding(
padding: const EdgeInsets.fromLTRB(13, 6.5, 15, 6.3),
padding: const EdgeInsets.fromLTRB(15, 7, 15, 7),
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
@ -62,7 +62,7 @@ class ActionRowItem extends StatelessWidget {
? Theme.of(context).colorScheme.primary
: null,
fontSize:
Theme.of(context).textTheme.labelSmall!.fontSize),
Theme.of(context).textTheme.labelMedium!.fontSize),
),
),
),

View File

@ -51,23 +51,21 @@ class IntroDetail extends StatelessWidget {
Text(
videoDetail!.title,
style: const TextStyle(
fontSize: 18,
letterSpacing: 0.5,
fontSize: 16,
fontWeight: FontWeight.w500,
),
),
const SizedBox(height: 10),
Row(
children: [
const SizedBox(width: 2),
StatView(
theme: 'black',
theme: 'gray',
view: videoDetail!.stat!.view,
size: 'medium',
),
const SizedBox(width: 10),
StatDanMu(
theme: 'black',
theme: 'gray',
danmu: videoDetail!.stat!.danmaku,
size: 'medium',
),
@ -75,7 +73,10 @@ class IntroDetail extends StatelessWidget {
Text(
Utils.dateFormat(videoDetail!.pubdate,
formatType: 'detail'),
style: const TextStyle(fontSize: 12),
style: TextStyle(
fontSize: 12,
color: Theme.of(context).colorScheme.outline,
),
),
],
),

View File

@ -68,7 +68,7 @@ class MenuRow extends StatelessWidget {
onTap!(),
},
child: Container(
padding: const EdgeInsets.fromLTRB(13, 5.5, 13, 5.5),
padding: const EdgeInsets.fromLTRB(13, 5.5, 13, 4.5),
decoration: BoxDecoration(
borderRadius: const BorderRadius.all(Radius.circular(30)),
border: Border.all(
@ -85,7 +85,11 @@ class MenuRow extends StatelessWidget {
duration: const Duration(milliseconds: 200),
child: Text(
text!,
style: const TextStyle(fontSize: 13),
style: TextStyle(
fontSize: 13,
color: selectStatus
? Theme.of(context).colorScheme.onBackground
: Theme.of(context).colorScheme.outline),
),
),
],

View File

@ -7,9 +7,10 @@ Widget seasonPanel(UgcSeason ugcSeason, cid, sheetHeight) {
int currentIndex = episodes.indexWhere((e) => e.cid == cid);
return Container(
margin: const EdgeInsets.only(
top: 15,
top: 8,
left: 2,
right: 2,
bottom: 2,
),
child: Material(
color: Theme.of(context).colorScheme.onInverseSurface,
@ -88,11 +89,11 @@ Widget seasonPanel(UgcSeason ugcSeason, cid, sheetHeight) {
Image.asset(
'assets/images/live.gif',
color: Theme.of(context).colorScheme.primary,
height: 11,
height: 12,
),
const SizedBox(width: 4),
const SizedBox(width: 10),
Text(
'${currentIndex + 1} / ${ugcSeason.epCount}',
'${currentIndex + 1}/${ugcSeason.epCount}',
style: Theme.of(context).textTheme.labelMedium,
),
const SizedBox(width: 6),