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,17 +276,21 @@ 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(
TextSpan(
children: [ children: [
Icon( WidgetSpan(
alignment: PlaceholderAlignment.middle,
child: Icon(
Icons.info, Icons.info,
size: MediaQuery.textScalerOf(context).scale(18), size: 17,
color: isLight color: isLight
? Theme.of(context).colorScheme.onErrorContainer ? Theme.of(context).colorScheme.onErrorContainer
: Theme.of(context).colorScheme.onError, : Theme.of(context).colorScheme.onError,
), ),
Text( ),
' 该账号封禁中${endTime ?? ''}', TextSpan(
text: ' 该账号封禁中${endTime ?? ''}',
style: TextStyle( style: TextStyle(
color: isLight color: isLight
? Theme.of(context).colorScheme.onErrorContainer ? Theme.of(context).colorScheme.onErrorContainer
@@ -294,6 +299,7 @@ class UserInfoCard extends StatelessWidget {
), ),
], ],
), ),
),
); );
}), }),
]; ];

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,