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

@@ -18,7 +18,7 @@ Widget addWidget(item, context, type, {floor = 1}) {
'ADDITIONAL_TYPE_COMMON': item.modules.moduleDynamic.additional.common,
};
Color bgColor = floor == 1
? Theme.of(context).dividerColor.withOpacity(0.08)
? Theme.of(context).dividerColor.withValues(alpha: 0.08)
: Theme.of(context).colorScheme.surface;
switch (type) {
case 'ADDITIONAL_TYPE_UGC':

View File

@@ -30,14 +30,14 @@ class DynamicPanel extends StatelessWidget {
// border: Border(
// bottom: BorderSide(
// width: 8,
// color: Theme.of(context).dividerColor.withOpacity(0.05),
// color: Theme.of(context).dividerColor.withValues(alpha: 0.05),
// ),
// ),
// ),
child: Material(
elevation: 0,
clipBehavior: Clip.hardEdge,
color: Theme.of(context).cardColor.withOpacity(0.5),
color: Theme.of(context).cardColor.withValues(alpha: 0.5),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(5),
),

View File

@@ -29,14 +29,14 @@ class DynamicPanelGrpc extends StatelessWidget {
// border: Border(
// bottom: BorderSide(
// width: 8,
// color: Theme.of(context).dividerColor.withOpacity(0.05),
// color: Theme.of(context).dividerColor.withValues(alpha: 0.05),
// ),
// ),
// ),
child: Material(
elevation: 0,
clipBehavior: Clip.hardEdge,
color: Theme.of(context).cardColor.withOpacity(0.5),
color: Theme.of(context).cardColor.withValues(alpha: 0.5),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(5),
),

View File

@@ -131,7 +131,7 @@ Widget forWard(item, context, ctr, source, {floor = 1}) {
// return Container(
// padding:
// const EdgeInsets.only(left: 10, top: 12, right: 10, bottom: 10),
// color: Theme.of(context).dividerColor.withOpacity(0.08),
// color: Theme.of(context).dividerColor.withValues(alpha: 0.08),
// child: articlePanel(item, context, floor: floor));
// 转发
case 'DYNAMIC_TYPE_FORWARD':
@@ -140,7 +140,7 @@ Widget forWard(item, context, ctr, source, {floor = 1}) {
child: Container(
padding:
const EdgeInsets.only(left: 15, top: 10, right: 15, bottom: 8),
color: Theme.of(context).dividerColor.withOpacity(0.08),
color: Theme.of(context).dividerColor.withValues(alpha: 0.08),
child: forWard(item.orig, context, ctr, source, floor: floor + 1),
),
);

View File

@@ -188,7 +188,7 @@ class _UpPanelState extends State<UpPanel> {
? Theme.of(context)
.colorScheme
.secondaryContainer
.withOpacity(0.7)
.withValues(alpha: 0.7)
: Theme.of(context).colorScheme.primary,
child: data.face != ''
? NetworkImgLayer(