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

@@ -42,8 +42,10 @@ class NewGradesSurprise extends StatelessWidget {
child: Container(
decoration: BoxDecoration(boxShadow: [
BoxShadow(
color:
Theme.of(context).colorScheme.secondary.withOpacity(.5),
color: Theme.of(context)
.colorScheme
.secondary
.withValues(alpha: .5),
blurRadius: 18.0,
)
]),
@@ -59,7 +61,8 @@ class NewGradesSurprise extends StatelessWidget {
width: 85,
height: 15,
decoration: BoxDecoration(
color: AppColors.of(context).text.withOpacity(.85),
color:
AppColors.of(context).text.withValues(alpha: .85),
borderRadius: BorderRadius.circular(8.0),
),
),
@@ -78,7 +81,8 @@ class NewGradesSurprise extends StatelessWidget {
width: 125,
height: 10,
decoration: BoxDecoration(
color: AppColors.of(context).text.withOpacity(.45),
color:
AppColors.of(context).text.withValues(alpha: .45),
borderRadius: BorderRadius.circular(8.0),
),
),
@@ -97,7 +101,8 @@ class NewGradesSurprise extends StatelessWidget {
width: 25,
height: 25,
decoration: BoxDecoration(
color: AppColors.of(context).text.withOpacity(.45),
color:
AppColors.of(context).text.withValues(alpha: .45),
borderRadius: BorderRadius.circular(25.0),
),
),
@@ -110,7 +115,9 @@ class NewGradesSurprise extends StatelessWidget {
style: TextStyle(
shadows: [
Shadow(
color: AppColors.of(context).text.withOpacity(.2),
color: AppColors.of(context)
.text
.withValues(alpha: .2),
offset: const Offset(2, 2),
)
],
@@ -119,7 +126,7 @@ class NewGradesSurprise extends StatelessWidget {
text: "x",
style: TextStyle(
fontSize: 20.0,
color: AppColors.of(context).text.withOpacity(.5),
color: AppColors.of(context).text.withValues(alpha: .5),
fontWeight: FontWeight.w800,
),
)
@@ -127,7 +134,7 @@ class NewGradesSurprise extends StatelessWidget {
style: TextStyle(
fontWeight: FontWeight.w700,
fontSize: 28.0,
color: AppColors.of(context).text.withOpacity(.75),
color: AppColors.of(context).text.withValues(alpha: .75),
),
),
),

View File

@@ -134,9 +134,12 @@ class _SurpriseGradeState extends State<SurpriseGrade>
return FadeTransition(
opacity: _revealAnimFade,
child: Material(
color: Colors.black.withOpacity(.75),
color: Colors.black.withValues(alpha: .75),
child: Container(
color: Theme.of(context).colorScheme.secondary.withOpacity(.05),
color: Theme.of(context)
.colorScheme
.secondary
.withValues(alpha: .05),
child: Container(
decoration: const BoxDecoration(
gradient: RadialGradient(
@@ -223,12 +226,13 @@ class _SurpriseGradeState extends State<SurpriseGrade>
padding: const EdgeInsets.symmetric(
horizontal: 32.0, vertical: 20.0),
decoration: BoxDecoration(
color: Colors.white.withOpacity(.3),
color: Colors.white
.withValues(alpha: .3),
borderRadius:
BorderRadius.circular(24.0),
border: Border.all(
color: Colors.black
.withOpacity(.3),
.withValues(alpha: .3),
width: 1.0),
),
child: Row(
@@ -264,7 +268,8 @@ class _SurpriseGradeState extends State<SurpriseGrade>
.capital(),
style: TextStyle(
color: Colors.white
.withOpacity(.8),
.withValues(
alpha: .8),
fontWeight:
FontWeight.bold,
fontSize: 24.0,
@@ -285,7 +290,8 @@ class _SurpriseGradeState extends State<SurpriseGrade>
"${widget.grade.value.weight}%",
style: TextStyle(
color: Colors.white
.withOpacity(.7),
.withValues(
alpha: .7),
fontWeight:
FontWeight.w600,
fontSize: 20.0,
@@ -326,7 +332,7 @@ class _SurpriseGradeState extends State<SurpriseGrade>
child: Text(
"open_subtitle".i18n,
style: TextStyle(
color: Colors.white.withOpacity(.8),
color: Colors.white.withValues(alpha: .8),
fontWeight: FontWeight.w600,
fontSize: 24.0,
),
@@ -383,7 +389,7 @@ class _SurpriseGradeState extends State<SurpriseGrade>
context: context,
value:
widget.grade.value.value)
.withOpacity(.5),
.withValues(alpha: .5),
blurRadius: 24.0,
),
Shadow(
@@ -391,7 +397,7 @@ class _SurpriseGradeState extends State<SurpriseGrade>
context: context,
value:
widget.grade.value.value)
.withOpacity(.3),
.withValues(alpha: .3),
offset: const Offset(-3, -3),
),
],