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

@@ -15,7 +15,7 @@ class AbsenceDisplay extends StatelessWidget {
padding: const EdgeInsets.only(top: 5.0),
// padding: const EdgeInsets.symmetric(vertical: 4.0, horizontal: 6.0),
// decoration: BoxDecoration(
// color: Theme.of(context).scaffoldBackgroundColor.withOpacity(.2),
// color: Theme.of(context).scaffoldBackgroundColor.withValues(alpha: .2),
// borderRadius: BorderRadius.circular(12.0),
// ),
child: Row(children: [

View File

@@ -81,7 +81,7 @@ class AbsenceSubjectTile extends StatelessWidget {
// fontFamily: "monospace",
color:
getColorByPercentage(percentage, context: context)
.withOpacity(0.8),
.withValues(alpha: 0.8),
fontSize: 16.0,
fontWeight: FontWeight.w500,
),
@@ -109,5 +109,5 @@ Color getColorByPercentage(double percentage, {required BuildContext context}) {
color = AppColors.of(context).yellow;
}
return color.withOpacity(.8);
return color.withValues(alpha: .8);
}

View File

@@ -57,7 +57,7 @@ class AbsenceTile extends StatelessWidget {
width: 39,
decoration: BoxDecoration(
shape: BoxShape.circle,
color: !group ? color.withOpacity(.25) : null,
color: !group ? color.withValues(alpha: .25) : null,
),
child: Center(
child: Icon(justificationIcon(absence.state), color: color)),

View File

@@ -51,7 +51,7 @@ class AbsenceView extends StatelessWidget {
height: 44.0,
decoration: BoxDecoration(
shape: BoxShape.circle,
color: color.withOpacity(.25),
color: color.withValues(alpha: .25),
),
child: Center(
child: Icon(