mod: color alpha

`withOpacity` -> `withValues`

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2024-12-19 20:21:01 +08:00
parent 45b4f9570b
commit a7ffc3b05f
62 changed files with 193 additions and 164 deletions

View File

@@ -522,7 +522,7 @@ class VideoDetailController extends GetxController
color: Theme.of(context)
.colorScheme
.onSurface
.withOpacity(0.7),
.withValues(alpha: 0.7),
),
),
)

View File

@@ -25,8 +25,11 @@ class ActionRowItem extends StatelessWidget {
Widget build(BuildContext context) {
return Material(
color: selectStatus
? Theme.of(context).colorScheme.primaryContainer.withOpacity(0.6)
: Theme.of(context).highlightColor.withOpacity(0.2),
? Theme.of(context)
.colorScheme
.primaryContainer
.withValues(alpha: 0.6)
: Theme.of(context).highlightColor.withValues(alpha: 0.2),
borderRadius: const BorderRadius.all(Radius.circular(30)),
clipBehavior: Clip.hardEdge,
child: InkWell(

View File

@@ -167,7 +167,7 @@ class _FavPanelState extends State<FavPanel> {
),
Divider(
height: 1,
color: Theme.of(context).disabledColor.withOpacity(0.08),
color: Theme.of(context).disabledColor.withValues(alpha: 0.08),
),
Padding(
padding: EdgeInsets.only(

View File

@@ -170,7 +170,7 @@ class _GroupPanelState extends State<GroupPanel> {
),
Divider(
height: 1,
color: Theme.of(context).disabledColor.withOpacity(0.08),
color: Theme.of(context).disabledColor.withValues(alpha: 0.08),
),
Padding(
padding: EdgeInsets.only(

View File

@@ -54,7 +54,7 @@ class MenuRow extends StatelessWidget {
{bool selectStatus = false}) {
return Material(
color: selectStatus
? Theme.of(context).highlightColor.withOpacity(0.2)
? Theme.of(context).highlightColor.withValues(alpha: 0.2)
: Colors.transparent,
borderRadius: const BorderRadius.all(Radius.circular(30)),
clipBehavior: Clip.hardEdge,
@@ -70,7 +70,7 @@ class MenuRow extends StatelessWidget {
border: Border.all(
color: selectStatus
? Colors.transparent
: Theme.of(context).highlightColor.withOpacity(0.2),
: Theme.of(context).highlightColor.withValues(alpha: 0.2),
),
),
child: Row(

View File

@@ -90,7 +90,7 @@ class ReplyItem extends StatelessWidget {
color: Theme.of(context)
.colorScheme
.onInverseSurface
.withOpacity(0.5),
.withValues(alpha: 0.5),
)
],
),
@@ -352,7 +352,10 @@ class ReplyItem extends StatelessWidget {
Icon(
Icons.reply,
size: 18,
color: Theme.of(context).colorScheme.outline.withOpacity(0.8),
color: Theme.of(context)
.colorScheme
.outline
.withValues(alpha: 0.8),
),
const SizedBox(width: 3),
Text(
@@ -460,7 +463,7 @@ class ReplyItem extends StatelessWidget {
color: Theme.of(context)
.colorScheme
.onSurface
.withOpacity(0.85),
.withValues(alpha: 0.85),
height: 1.6),
overflow: TextOverflow.ellipsis,
maxLines: 2,
@@ -539,7 +542,7 @@ class ReplyItem extends StatelessWidget {
color: Theme.of(context)
.colorScheme
.onSurface
.withOpacity(0.85),
.withValues(alpha: 0.85),
)),
TextSpan(
text: replyControl!.entryText!,

View File

@@ -101,7 +101,7 @@ class ReplyItemGrpc extends StatelessWidget {
color: Theme.of(context)
.colorScheme
.onInverseSurface
.withOpacity(0.5),
.withValues(alpha: 0.5),
)
],
),
@@ -349,7 +349,10 @@ class ReplyItemGrpc extends StatelessWidget {
Icon(
Icons.reply,
size: 18,
color: Theme.of(context).colorScheme.outline.withOpacity(0.8),
color: Theme.of(context)
.colorScheme
.outline
.withValues(alpha: 0.8),
),
const SizedBox(width: 3),
Text(
@@ -476,7 +479,7 @@ class ReplyItemGrpc extends StatelessWidget {
color: Theme.of(context)
.colorScheme
.onSurface
.withOpacity(0.85),
.withValues(alpha: 0.85),
height: 1.6),
overflow: TextOverflow.ellipsis,
maxLines: 2,
@@ -558,7 +561,7 @@ class ReplyItemGrpc extends StatelessWidget {
color: Theme.of(context)
.colorScheme
.onSurface
.withOpacity(0.85),
.withValues(alpha: 0.85),
),
),
TextSpan(

View File

@@ -306,7 +306,7 @@ class _ReplyPageState extends State<ReplyPage>
),
Divider(
height: 1,
color: Theme.of(context).dividerColor.withOpacity(0.1),
color: Theme.of(context).dividerColor.withValues(alpha: 0.1),
),
Container(
height: 52,

View File

@@ -195,7 +195,7 @@ class _VideoReplyNewDialogState extends State<VideoReplyNewDialog>
),
Divider(
height: 1,
color: Theme.of(context).dividerColor.withOpacity(0.1),
color: Theme.of(context).dividerColor.withValues(alpha: 0.1),
),
Container(
height: 52,

View File

@@ -136,7 +136,7 @@ class _VideoReplyReplyPanelState extends State<VideoReplyReplyPanel> {
),
Divider(
height: 1,
color: Theme.of(context).dividerColor.withOpacity(0.1),
color: Theme.of(context).dividerColor.withValues(alpha: 0.1),
),
Expanded(
child: refreshIndicator(
@@ -192,7 +192,7 @@ class _VideoReplyReplyPanelState extends State<VideoReplyReplyPanel> {
height: 20,
color: Theme.of(context)
.dividerColor
.withOpacity(0.1),
.withValues(alpha: 0.1),
thickness: 6,
);
} else if (index == 2) {

View File

@@ -726,7 +726,7 @@ class _VideoDetailPageState extends State<VideoDetailPage>
// child: Divider(
// indent: 12,
// endIndent: 12,
// color: Theme.of(context).dividerColor.withOpacity(0.06),
// color: Theme.of(context).dividerColor.withValues(alpha: 0.06),
// ),
// ),
// const RelatedVideoPanel(),
@@ -1112,7 +1112,7 @@ class _VideoDetailPageState extends State<VideoDetailPage>
border: Border(
bottom: BorderSide(
width: 1,
color: Theme.of(context).dividerColor.withOpacity(0.1),
color: Theme.of(context).dividerColor.withValues(alpha: 0.1),
),
),
),
@@ -1271,7 +1271,7 @@ class _VideoDetailPageState extends State<VideoDetailPage>
height: 1,
indent: 12,
endIndent: 12,
color: Theme.of(context).dividerColor.withOpacity(0.06),
color: Theme.of(context).dividerColor.withValues(alpha: 0.06),
),
),
),
@@ -1445,7 +1445,9 @@ class _VideoDetailPageState extends State<VideoDetailPage>
if (rawIndex % 2 == 1) {
return Divider(
height: 1,
color: Theme.of(context).dividerColor.withOpacity(0.1),
color: Theme.of(context)
.dividerColor
.withValues(alpha: 0.1),
);
}
int index = rawIndex ~/ 2;

View File

@@ -55,7 +55,9 @@ class AiDetail extends StatelessWidget {
if (modelResult!.outline!.isNotEmpty)
Divider(
height: 20,
color: Theme.of(context).dividerColor.withOpacity(0.1),
color: Theme.of(context)
.dividerColor
.withValues(alpha: 0.1),
thickness: 6,
)
],

View File

@@ -145,7 +145,7 @@ class _HeaderControlState extends State<HeaderControl> {
color: Theme.of(context)
.colorScheme
.onSecondaryContainer
.withOpacity(0.5),
.withValues(alpha: 0.5),
borderRadius:
const BorderRadius.all(Radius.circular(3))),
),