fixed deprecated warnings

This commit is contained in:
Marton Kiss
2025-01-31 10:24:37 +01:00
parent 67649cc5fd
commit b5ee1afe05
102 changed files with 755 additions and 557 deletions

View File

@@ -49,12 +49,12 @@ class MenuRenamedSubjects extends StatelessWidget {
style: TextStyle(
color: AppColors.of(context)
.text
.withOpacity(settings.renamedSubjectsEnabled ? 1.0 : .5)),
.withValues(alpha: settings.renamedSubjectsEnabled ? 1.0 : .5)),
),
leading: settings.renamedSubjectsEnabled
? const Icon(FeatherIcons.penTool)
: Icon(FeatherIcons.penTool,
color: AppColors.of(context).text.withOpacity(.25)),
color: AppColors.of(context).text.withValues(alpha: .25)),
trailingDivider: true,
trailing: Switch(
onChanged: (v) async {
@@ -200,7 +200,8 @@ class _ModifySubjectNamesState extends State<ModifySubjectNames> {
.name,
style: Theme.of(context).textTheme.titleSmall!.copyWith(
fontWeight: FontWeight.w700,
color: AppColors.of(context).text.withOpacity(0.75)),
color:
AppColors.of(context).text.withValues(alpha: 0.75)),
overflow: TextOverflow.ellipsis,
maxLines: 2,
textAlign: TextAlign.center,
@@ -330,7 +331,8 @@ class _ModifySubjectNamesState extends State<ModifySubjectNames> {
style: TextStyle(
fontWeight: FontWeight.w600,
fontSize: 18,
color: AppColors.of(context).text.withOpacity(.85),
color:
AppColors.of(context).text.withValues(alpha: .85),
),
),
),
@@ -414,7 +416,7 @@ class RenamedSubjectItem extends StatelessWidget {
onTap: () {},
leading: Icon(
SubjectIcon.resolveVariant(subject: subject, context: context),
color: AppColors.of(context).text.withOpacity(.75)),
color: AppColors.of(context).text.withValues(alpha: .75)),
title: InkWell(
onTap: modifyCallback,
child: Column(
@@ -425,7 +427,7 @@ class RenamedSubjectItem extends StatelessWidget {
style: TextStyle(
fontWeight: FontWeight.w500,
fontSize: 14,
color: AppColors.of(context).text.withOpacity(.75)),
color: AppColors.of(context).text.withValues(alpha: .75)),
maxLines: 1,
overflow: TextOverflow.ellipsis,
),
@@ -441,7 +443,7 @@ class RenamedSubjectItem extends StatelessWidget {
trailing: InkWell(
onTap: removeCallback,
child: Icon(FeatherIcons.trash,
color: AppColors.of(context).red.withOpacity(.75)),
color: AppColors.of(context).red.withValues(alpha: .75)),
),
);
}