opt: silent info widget

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-01-14 13:46:02 +08:00
parent e2761836bf
commit ba8d7b871c
2 changed files with 26 additions and 21 deletions

View File

@@ -267,6 +267,7 @@ class UserInfoCard extends StatelessWidget {
Builder(builder: (context) { Builder(builder: (context) {
bool isLight = Theme.of(context).brightness == Brightness.light; bool isLight = Theme.of(context).brightness == Brightness.light;
return Container( return Container(
width: double.infinity,
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(6), borderRadius: BorderRadius.circular(6),
color: isLight color: isLight
@@ -275,24 +276,29 @@ class UserInfoCard extends StatelessWidget {
), ),
margin: const EdgeInsets.only(left: 20, top: 8, right: 20), margin: const EdgeInsets.only(left: 20, top: 8, right: 20),
padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 4), padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 4),
child: Row( child: Text.rich(
children: [ TextSpan(
Icon( children: [
Icons.info, WidgetSpan(
size: MediaQuery.textScalerOf(context).scale(18), alignment: PlaceholderAlignment.middle,
color: isLight child: Icon(
? Theme.of(context).colorScheme.onErrorContainer Icons.info,
: Theme.of(context).colorScheme.onError, size: 17,
), color: isLight
Text( ? Theme.of(context).colorScheme.onErrorContainer
' 该账号封禁中${endTime ?? ''}', : Theme.of(context).colorScheme.onError,
style: TextStyle( ),
color: isLight
? Theme.of(context).colorScheme.onErrorContainer
: Theme.of(context).colorScheme.onError,
), ),
), TextSpan(
], text: ' 该账号封禁中${endTime ?? ''}',
style: TextStyle(
color: isLight
? Theme.of(context).colorScheme.onErrorContainer
: Theme.of(context).colorScheme.onError,
),
),
],
),
), ),
); );
}), }),

View File

@@ -165,16 +165,14 @@ class _VideoInfoState extends State<VideoInfo> with TickerProviderStateMixin {
children: [ children: [
Icon( Icon(
Icons.shield_outlined, Icons.shield_outlined,
size: size: 16,
MediaQuery.textScalerOf(context).scale(16),
color: Theme.of(context) color: Theme.of(context)
.colorScheme .colorScheme
.onSecondaryContainer, .onSecondaryContainer,
), ),
Icon( Icon(
Icons.play_arrow_rounded, Icons.play_arrow_rounded,
size: size: 12,
MediaQuery.textScalerOf(context).scale(12),
color: Theme.of(context) color: Theme.of(context)
.colorScheme .colorScheme
.onSecondaryContainer, .onSecondaryContainer,
@@ -183,6 +181,7 @@ class _VideoInfoState extends State<VideoInfo> with TickerProviderStateMixin {
), ),
Text( Text(
videoDetailCtr.videoLabel.value, videoDetailCtr.videoLabel.value,
textScaler: TextScaler.linear(1),
strutStyle: StrutStyle(leading: 0, height: 1), strutStyle: StrutStyle(leading: 0, height: 1),
style: TextStyle( style: TextStyle(
height: 1, height: 1,