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

@@ -144,7 +144,8 @@ class ChatItem extends StatelessWidget {
style: TextStyle(
letterSpacing: 0.6,
height: 5,
color: Theme.of(context).colorScheme.outline.withOpacity(0.8),
color:
Theme.of(context).colorScheme.outline.withValues(alpha: 0.8),
),
);
case MsgType.text:
@@ -195,7 +196,7 @@ class ChatItem extends StatelessWidget {
style: TextStyle(
letterSpacing: 0.6,
height: 1.5,
color: textColor(context).withOpacity(0.6),
color: textColor(context).withValues(alpha: 0.6),
fontSize: 12,
),
),
@@ -246,7 +247,7 @@ class ChatItem extends StatelessWidget {
style: TextStyle(
letterSpacing: 0.6,
height: 1.5,
color: textColor(context).withOpacity(0.6),
color: textColor(context).withValues(alpha: 0.6),
fontSize: 12,
),
),
@@ -261,7 +262,7 @@ class ChatItem extends StatelessWidget {
color: Theme.of(context)
.colorScheme
.secondaryContainer
.withOpacity(0.4),
.withValues(alpha: 0.4),
borderRadius: const BorderRadius.only(
topLeft: Radius.circular(16),
topRight: Radius.circular(16),
@@ -343,7 +344,8 @@ class ChatItem extends StatelessWidget {
style: TextStyle(
letterSpacing: 0.6,
height: 1.5,
color: textColor(context).withOpacity(0.6),
color: textColor(context)
.withValues(alpha: 0.6),
fontSize: 12,
),
),
@@ -352,7 +354,8 @@ class ChatItem extends StatelessWidget {
style: TextStyle(
letterSpacing: 0.6,
height: 1.5,
color: textColor(context).withOpacity(0.6),
color: textColor(context)
.withValues(alpha: 0.6),
fontSize: 12,
),
),
@@ -428,11 +431,11 @@ class ChatItem extends StatelessWidget {
? Theme.of(context)
.colorScheme
.onPrimary
.withOpacity(0.8)
.withValues(alpha: 0.8)
: Theme.of(context)
.colorScheme
.onSecondaryContainer
.withOpacity(0.8)),
.withValues(alpha: 0.8)),
),
item.msgStatus == 1
? Text(
@@ -471,7 +474,7 @@ class SystemNotice extends StatelessWidget {
color: Theme.of(context)
.colorScheme
.secondaryContainer
.withOpacity(0.4),
.withValues(alpha: 0.4),
borderRadius: const BorderRadius.only(
topLeft: Radius.circular(16),
topRight: Radius.circular(16),
@@ -497,7 +500,10 @@ class SystemNotice extends StatelessWidget {
.copyWith(color: Theme.of(context).colorScheme.outline),
),
Divider(
color: Theme.of(context).colorScheme.primary.withOpacity(0.05),
color: Theme.of(context)
.colorScheme
.primary
.withValues(alpha: 0.05),
),
SelectableText(
content['text'],