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

@@ -643,7 +643,7 @@ class AbsencesPageState extends State<AbsencesPage>
fontWeight: FontWeight.w500,
color: AppColors.of(context)
.text
.withOpacity(0.8),
.withValues(alpha: 0.8),
),
),
],

View File

@@ -98,7 +98,7 @@ class AverageSelectorState extends State<AverageSelector> {
avgDropItems[widget.value]!.i18n,
style: Theme.of(context).textTheme.titleSmall!.copyWith(
fontWeight: FontWeight.w600,
color: AppColors.of(context).text.withOpacity(0.65)),
color: AppColors.of(context).text.withValues(alpha: 0.65)),
),
const SizedBox(
width: 4,

View File

@@ -27,7 +27,7 @@ class FailWarning extends StatelessWidget {
children: [
Icon(
FeatherIcons.alertTriangle,
color: Colors.orange.withOpacity(.5),
color: Colors.orange.withValues(alpha: .5),
size: 20.0,
),
const SizedBox(width: 12.0),

View File

@@ -493,7 +493,7 @@ class _GradeSubjectViewState extends State<GradeSubjectView>
color: Theme.of(context)
.colorScheme
.primary
.withOpacity(.15),
.withValues(alpha: .15),
),
child: Icon(
FeatherIcons.flag,

View File

@@ -171,7 +171,7 @@ class GradeGraphState extends State<GradeGraph> {
VerticalLine(
x: x,
strokeWidth: 3.0,
color: AppColors.of(context).red.withOpacity(.75),
color: AppColors.of(context).red.withValues(alpha: .75),
label: VerticalLineLabel(
labelResolver: (_) => " ${"mid".i18n} ", // <- zwsp for padding
show: true,
@@ -196,7 +196,7 @@ class GradeGraphState extends State<GradeGraph> {
settings.graphClassAvg) {
extraLinesH.add(HorizontalLine(
y: widget.classAvg!,
color: AppColors.of(context).text.withOpacity(.75),
color: AppColors.of(context).text.withValues(alpha: .75),
));
}
@@ -244,10 +244,10 @@ class GradeGraphState extends State<GradeGraph> {
begin: Alignment.topCenter,
end: Alignment.bottomCenter,
colors: [
averageColor.withOpacity(0.7),
averageColor.withOpacity(0.3),
averageColor.withOpacity(0.2),
averageColor.withOpacity(0.1),
averageColor.withValues(alpha: 0.7),
averageColor.withValues(alpha: 0.3),
averageColor.withValues(alpha: 0.2),
averageColor.withValues(alpha: 0.1),
],
stops: const [0.1, 0.6, 0.8, 1],
),
@@ -274,16 +274,16 @@ class GradeGraphState extends State<GradeGraph> {
colors: [
AppColors.of(context)
.text
.withOpacity(0.7),
.withValues(alpha: 0.7),
AppColors.of(context)
.text
.withOpacity(0.3),
.withValues(alpha: 0.3),
AppColors.of(context)
.text
.withOpacity(0.2),
.withValues(alpha: 0.2),
AppColors.of(context)
.text
.withOpacity(0.1),
.withValues(alpha: 0.1),
],
stops: const [0.1, 0.6, 0.8, 1],
),
@@ -300,11 +300,11 @@ class GradeGraphState extends State<GradeGraph> {
horizontalInterval: 1,
// checkToShowVerticalLine: (_) => false,
// getDrawingHorizontalLine: (_) => FlLine(
// color: AppColors.of(context).text.withOpacity(.15),
// color: AppColors.of(context).text.withValues(alpha: .15),
// strokeWidth: 2,
// ),
// getDrawingVerticalLine: (_) => FlLine(
// color: AppColors.of(context).text.withOpacity(.25),
// color: AppColors.of(context).text.withValues(alpha: .25),
// strokeWidth: 2,
// ),
),
@@ -367,7 +367,7 @@ class GradeGraphState extends State<GradeGraph> {
style: TextStyle(
color: AppColors.of(context)
.text
.withOpacity(.75),
.withValues(alpha: .75),
fontWeight: FontWeight.bold,
fontSize: 14.0,
),
@@ -376,7 +376,7 @@ class GradeGraphState extends State<GradeGraph> {
// getTextStyles: (context, value) => TextStyle(
// color: AppColors.of(context)
// .text
// .withOpacity(.75),
// .withValues(alpha: .75),
// fontWeight: FontWeight.bold,
// fontSize: 14.0,
// ),

View File

@@ -114,7 +114,7 @@ class LiveCardStateA extends State<LiveCard> {
// context,
// useRootNavigator: true,
// builder: (context) => SlidingSheetDialog(
// color: Colors.black.withOpacity(0.99),
// color: Colors.black.withValues(alpha: 0.99),
// duration: const Duration(milliseconds: 400),
// scrollSpec: const ScrollSpec.bouncingScroll(),
// snapSpec: const SnapSpec(
@@ -162,7 +162,7 @@ class LiveCardStateA extends State<LiveCard> {
// color: Theme.of(context)
// .colorScheme
// .secondary
// .withOpacity(.85),
// .withValues(alpha: .85),
// fontStyle: liveCard.nextLesson!.subject.isRenamed &&
// settingsProvider.renamedSubjectsItalics
// ? FontStyle.italic
@@ -176,7 +176,7 @@ class LiveCardStateA extends State<LiveCard> {
// color: Theme.of(context)
// .colorScheme
// .secondary
// .withOpacity(.85),
// .withValues(alpha: .85),
// ),
// ),
// TextSpan(text: "first_lesson_3".i18n),
@@ -188,7 +188,7 @@ class LiveCardStateA extends State<LiveCard> {
// color: Theme.of(context)
// .colorScheme
// .secondary
// .withOpacity(.85),
// .withValues(alpha: .85),
// ),
// ),
// TextSpan(text: "first_lesson_4".i18n),
@@ -281,7 +281,7 @@ class LiveCardStateA extends State<LiveCard> {
color: Theme.of(context)
.colorScheme
.secondary
.withOpacity(.15),
.withValues(alpha: .15),
borderRadius: BorderRadius.circular(10.0),
),
child: Text(
@@ -294,7 +294,7 @@ class LiveCardStateA extends State<LiveCard> {
color: Theme.of(context)
.colorScheme
.secondary
.withOpacity(.9),
.withValues(alpha: .9),
),
),
),
@@ -469,7 +469,7 @@ class LiveCardStateA extends State<LiveCard> {
fontWeight: FontWeight.w500,
color: AppColors.of(context)
.text
.withOpacity(.75),
.withValues(alpha: .75),
height: 1.1,
),
),
@@ -547,7 +547,7 @@ class LiveCardStateA extends State<LiveCard> {
color: Theme.of(context)
.colorScheme
.tertiary
.withOpacity(.15),
.withValues(alpha: .15),
borderRadius:
BorderRadius.circular(10.0),
),
@@ -561,7 +561,7 @@ class LiveCardStateA extends State<LiveCard> {
color: Theme.of(context)
.colorScheme
.secondary
.withOpacity(.9),
.withValues(alpha: .9),
),
),
),
@@ -730,10 +730,11 @@ class LiveCardStateA extends State<LiveCard> {
fontSize: 16.5,
color: AppColors.of(context)
.text
.withOpacity(!liveCard
.nextLesson!.isEmpty
? 1.0
: 0.5),
.withValues(
alpha: !liveCard
.nextLesson!.isEmpty
? 1.0
: 0.5),
fontStyle: liveCard.nextLesson!
.subject.isRenamed &&
settingsProvider
@@ -752,7 +753,7 @@ class LiveCardStateA extends State<LiveCard> {
height: 1.0,
color: AppColors.of(context)
.text
.withOpacity(.75),
.withValues(alpha: .75),
),
maxLines: !(nextSubject == null &&
progressCurrent == null &&
@@ -830,7 +831,7 @@ class LiveCardStateA extends State<LiveCard> {
fontWeight: FontWeight.w500,
color: AppColors.of(context)
.text
.withOpacity(.9),
.withValues(alpha: .9),
),
),
],
@@ -899,7 +900,7 @@ class LiveCardStateA extends State<LiveCard> {
fontWeight: FontWeight.w500,
color: AppColors.of(context)
.text
.withOpacity(.75),
.withValues(alpha: .75),
height: 1.1,
),
),
@@ -977,7 +978,7 @@ class LiveCardStateA extends State<LiveCard> {
color: Theme.of(context)
.colorScheme
.tertiary
.withOpacity(.15),
.withValues(alpha: .15),
borderRadius:
BorderRadius.circular(10.0),
),
@@ -991,7 +992,7 @@ class LiveCardStateA extends State<LiveCard> {
color: Theme.of(context)
.colorScheme
.secondary
.withOpacity(.9),
.withValues(alpha: .9),
),
),
),

View File

@@ -132,7 +132,7 @@ class _LiveCardWidgetState extends State<LiveCardWidget> {
color: Theme.of(context)
.colorScheme
.secondary
.withOpacity(0.5),
.withValues(alpha: 0.5),
borderRadius: const BorderRadius.all(
Radius.circular(10),
),
@@ -220,8 +220,9 @@ class _LiveCardWidgetState extends State<LiveCardWidget> {
context)
.colorScheme
.secondary
.withOpacity(
.3),
.withValues(
alpha:
.3),
borderRadius:
BorderRadius
.circular(
@@ -267,7 +268,7 @@ class _LiveCardWidgetState extends State<LiveCardWidget> {
size: 26.0,
color: AppColors.of(context)
.text
.withOpacity(.75),
.withValues(alpha: .75),
),
),
],
@@ -283,7 +284,7 @@ class _LiveCardWidgetState extends State<LiveCardWidget> {
height: 1.0,
color: AppColors.of(context)
.text
.withOpacity(.75),
.withValues(alpha: .75),
),
maxLines:
!(widget.nextSubject == null &&
@@ -341,7 +342,8 @@ class _LiveCardWidgetState extends State<LiveCardWidget> {
color: Theme.of(context)
.colorScheme
.secondary
.withOpacity(.25),
.withValues(
alpha: .25),
borderRadius:
BorderRadius.circular(
4.0),
@@ -356,7 +358,8 @@ class _LiveCardWidgetState extends State<LiveCardWidget> {
color: Theme.of(context)
.colorScheme
.secondary
.withOpacity(.9),
.withValues(
alpha: .9),
),
),
),
@@ -366,7 +369,7 @@ class _LiveCardWidgetState extends State<LiveCardWidget> {
style: TextStyle(
color: AppColors.of(context)
.text
.withOpacity(.8),
.withValues(alpha: .8),
fontWeight: FontWeight.w600,
),
maxLines: 1,
@@ -393,7 +396,7 @@ class _LiveCardWidgetState extends State<LiveCardWidget> {
fontWeight: FontWeight.w500,
color: AppColors.of(context)
.text
.withOpacity(.75),
.withValues(alpha: .75),
),
),
),

View File

@@ -24,7 +24,8 @@ class SegmentedCountdownState extends State<SegmentedCountdown> {
children: [
Container(
decoration: BoxDecoration(
color: Theme.of(context).colorScheme.secondary.withOpacity(0.05),
color:
Theme.of(context).colorScheme.secondary.withValues(alpha: 0.05),
borderRadius: BorderRadius.circular(8.0),
),
padding: const EdgeInsets.symmetric(vertical: 2.0),
@@ -46,7 +47,7 @@ class SegmentedCountdownState extends State<SegmentedCountdown> {
style: TextStyle(
fontSize: 16.0,
fontWeight: FontWeight.w500,
color: AppColors.of(context).text.withOpacity(0.6),
color: AppColors.of(context).text.withValues(alpha: 0.6),
),
),
const SizedBox(
@@ -54,7 +55,8 @@ class SegmentedCountdownState extends State<SegmentedCountdown> {
),
Container(
decoration: BoxDecoration(
color: Theme.of(context).colorScheme.secondary.withOpacity(0.05),
color:
Theme.of(context).colorScheme.secondary.withValues(alpha: 0.05),
borderRadius: BorderRadius.circular(8.0),
),
padding: const EdgeInsets.symmetric(vertical: 2.0),
@@ -71,7 +73,10 @@ class SegmentedCountdownState extends State<SegmentedCountdown> {
if (diffMins.length == 2)
Container(
decoration: BoxDecoration(
color: Theme.of(context).colorScheme.secondary.withOpacity(0.05),
color: Theme.of(context)
.colorScheme
.secondary
.withValues(alpha: 0.05),
borderRadius: BorderRadius.circular(8.0),
),
padding: const EdgeInsets.symmetric(vertical: 2.0),
@@ -94,7 +99,7 @@ class SegmentedCountdownState extends State<SegmentedCountdown> {
style: TextStyle(
fontSize: 16.0,
fontWeight: FontWeight.w500,
color: AppColors.of(context).text.withOpacity(0.6),
color: AppColors.of(context).text.withValues(alpha: 0.6),
),
),
const SizedBox(
@@ -102,7 +107,8 @@ class SegmentedCountdownState extends State<SegmentedCountdown> {
),
Container(
decoration: BoxDecoration(
color: Theme.of(context).colorScheme.secondary.withOpacity(0.05),
color:
Theme.of(context).colorScheme.secondary.withValues(alpha: 0.05),
borderRadius: BorderRadius.circular(8.0),
),
padding: const EdgeInsets.symmetric(vertical: 2.0),
@@ -119,7 +125,10 @@ class SegmentedCountdownState extends State<SegmentedCountdown> {
if (diffSecs.length == 2)
Container(
decoration: BoxDecoration(
color: Theme.of(context).colorScheme.secondary.withOpacity(0.05),
color: Theme.of(context)
.colorScheme
.secondary
.withValues(alpha: 0.05),
borderRadius: BorderRadius.circular(8.0),
),
padding: const EdgeInsets.symmetric(vertical: 2.0),
@@ -142,7 +151,7 @@ class SegmentedCountdownState extends State<SegmentedCountdown> {
style: TextStyle(
fontSize: 16.0,
fontWeight: FontWeight.w500,
color: AppColors.of(context).text.withOpacity(0.6),
color: AppColors.of(context).text.withValues(alpha: 0.6),
),
),
],

View File

@@ -36,7 +36,8 @@ class FourRandomSlotParticle extends Particle {
final double relativeDistanceToMiddle;
FourRandomSlotParticle({required this.children, this.relativeDistanceToMiddle = 2.0});
FourRandomSlotParticle(
{required this.children, this.relativeDistanceToMiddle = 2.0});
@override
void paint(Canvas canvas, Size size, double progress, int seed) {
@@ -53,13 +54,17 @@ class FourRandomSlotParticle extends Particle {
Offset sideToOffset(int side, Size size, Random random) {
if (side == 0) {
return Offset(-random.nextDouble() * (size.width / 2), -random.nextDouble() * (size.height / 2));
return Offset(-random.nextDouble() * (size.width / 2),
-random.nextDouble() * (size.height / 2));
} else if (side == 1) {
return Offset(random.nextDouble() * (size.width / 2), -random.nextDouble() * (size.height / 2));
return Offset(random.nextDouble() * (size.width / 2),
-random.nextDouble() * (size.height / 2));
} else if (side == 2) {
return Offset(random.nextDouble() * (size.width / 2), random.nextDouble() * (size.height / 2));
return Offset(random.nextDouble() * (size.width / 2),
random.nextDouble() * (size.height / 2));
} else if (side == 3) {
return Offset(-random.nextDouble() * (size.width / 2), random.nextDouble() * (size.height / 2));
return Offset(-random.nextDouble() * (size.width / 2),
random.nextDouble() * (size.height / 2));
} else {
throw Exception();
}
@@ -148,9 +153,16 @@ class CircleMirror extends Particle {
final int numberOfParticles;
CircleMirror.builder({required this.particleBuilder, required this.initialRotation, required this.numberOfParticles});
CircleMirror.builder(
{required this.particleBuilder,
required this.initialRotation,
required this.numberOfParticles});
CircleMirror({required Particle child, required this.initialRotation, required this.numberOfParticles}) : particleBuilder = ((index) => child);
CircleMirror(
{required Particle child,
required this.initialRotation,
required this.numberOfParticles})
: particleBuilder = ((index) => child);
@override
void paint(Canvas canvas, Size size, double progress, seed) {
@@ -177,9 +189,15 @@ class RectangleMirror extends Particle {
final int numberOfParticles;
RectangleMirror.builder({required this.particleBuilder, required this.initialDistance, required this.numberOfParticles});
RectangleMirror.builder(
{required this.particleBuilder,
required this.initialDistance,
required this.numberOfParticles});
RectangleMirror({required Particle child, required this.initialDistance, required this.numberOfParticles})
RectangleMirror(
{required Particle child,
required this.initialDistance,
required this.numberOfParticles})
: particleBuilder = ((index) => child);
@override
@@ -191,14 +209,17 @@ class RectangleMirror extends Particle {
bool onHorizontalAxis = true;
int side = 0;
assert((distanceBetweenParticles * numberOfParticles).round() == totalLength.round());
assert((distanceBetweenParticles * numberOfParticles).round() ==
totalLength.round());
canvas.translate(-size.width / 2, -size.height / 2);
double currentDistance = initialDistance;
for (int i = 0; i < numberOfParticles; i++) {
while (true) {
if (onHorizontalAxis ? currentDistance > size.width : currentDistance > size.height) {
if (onHorizontalAxis
? currentDistance > size.width
: currentDistance > size.height) {
currentDistance -= onHorizontalAxis ? size.width : size.height;
onHorizontalAxis = !onHorizontalAxis;
side = (++side) % 4;
@@ -215,7 +236,8 @@ class RectangleMirror extends Particle {
});
} else if (side == 2) {
assert(onHorizontalAxis);
moveTo(canvas, size, 2, size.width - currentDistance, size.height, () {
moveTo(canvas, size, 2, size.width - currentDistance, size.height,
() {
particleBuilder(i).paint(canvas, size, progress, seed);
});
} else if (side == 3) {
@@ -233,7 +255,8 @@ class RectangleMirror extends Particle {
canvas.restore();
}
void moveTo(Canvas canvas, Size size, int side, double x, double y, VoidCallback painter) {
void moveTo(Canvas canvas, Size size, int side, double x, double y,
VoidCallback painter) {
canvas.save();
canvas.translate(x, y);
canvas.rotate(-atan2(size.width / 2 - x, size.height / 2 - y));
@@ -261,7 +284,9 @@ class PositionedParticle extends Particle {
/// Animates a childs position based on a Tween<Offset>
class AnimatedPositionedParticle extends Particle {
AnimatedPositionedParticle({required Offset begin, required Offset end, required this.child}) : offsetTween = Tween<Offset>(begin: begin, end: end);
AnimatedPositionedParticle(
{required Offset begin, required Offset end, required this.child})
: offsetTween = Tween<Offset>(begin: begin, end: end);
final Particle child;
@@ -270,7 +295,8 @@ class AnimatedPositionedParticle extends Particle {
@override
void paint(Canvas canvas, Size size, double progress, seed) {
canvas.save();
canvas.translate(offsetTween.lerp(progress).dx, offsetTween.lerp(progress).dy);
canvas.translate(
offsetTween.lerp(progress).dx, offsetTween.lerp(progress).dy);
child.paint(canvas, size, progress, seed);
canvas.restore();
}
@@ -335,7 +361,9 @@ class AnimatedRotationParticle extends Particle {
final Tween<double> rotation;
AnimatedRotationParticle({required this.child, required double begin, required double end}) : rotation = Tween<double>(begin: begin, end: end);
AnimatedRotationParticle(
{required this.child, required double begin, required double end})
: rotation = Tween<double>(begin: begin, end: end);
@override
void paint(Canvas canvas, Size size, double progress, int seed) {
@@ -362,7 +390,8 @@ class FadingRect extends Particle {
@override
void paint(Canvas canvas, Size size, double progress, seed) {
canvas.drawRect(Rect.fromLTWH(0.0, 0.0, width, height), Paint()..color = color.withOpacity(1 - progress));
canvas.drawRect(Rect.fromLTWH(0.0, 0.0, width, height),
Paint()..color = color.withValues(alpha: 1 - progress));
}
}
@@ -375,7 +404,8 @@ class FadingCircle extends Particle {
@override
void paint(Canvas canvas, Size size, double progress, seed) {
canvas.drawCircle(Offset.zero, radius, Paint()..color = color.withOpacity(1 - progress));
canvas.drawCircle(Offset.zero, radius,
Paint()..color = color.withValues(alpha: 1 - progress));
}
}
@@ -394,7 +424,11 @@ class FadingTriangle extends Particle {
/// This is the factor of how much bigger then length than the width is
final double heightToBaseFactor;
FadingTriangle({required this.variation, required this.color, required this.baseSize, required this.heightToBaseFactor});
FadingTriangle(
{required this.variation,
required this.color,
required this.baseSize,
required this.heightToBaseFactor});
@override
void paint(Canvas canvas, Size size, double progress, int seed) {
@@ -403,7 +437,8 @@ class FadingTriangle extends Particle {
path.lineTo(baseSize * variation, baseSize * heightToBaseFactor);
path.lineTo(baseSize, 0.0);
path.close();
canvas.drawPath(path, Paint()..color = color.withOpacity(1 - progress));
canvas.drawPath(
path, Paint()..color = color.withValues(alpha: 1 - progress));
}
}
@@ -418,7 +453,12 @@ class FadingSnake extends Particle {
final Color color;
FadingSnake({required this.width, required this.segmentLength, required this.segments, required this.curvyness, required this.color});
FadingSnake(
{required this.width,
required this.segmentLength,
required this.segments,
required this.curvyness,
required this.color});
@override
void paint(Canvas canvas, Size size, double progress, int seed) {
@@ -426,10 +466,12 @@ class FadingSnake extends Particle {
canvas.rotate(pi / 6);
Path path = Path();
for (int i = 0; i < segments; i++) {
path.quadraticBezierTo(curvyness * i, segmentLength * (i + 1), curvyness * (i + 1), segmentLength * (i + 1));
path.quadraticBezierTo(curvyness * i, segmentLength * (i + 1),
curvyness * (i + 1), segmentLength * (i + 1));
}
for (int i = segments - 1; i >= 0; i--) {
path.quadraticBezierTo(curvyness * (i + 1), segmentLength * i - curvyness, curvyness * i, segmentLength * i - curvyness);
path.quadraticBezierTo(curvyness * (i + 1), segmentLength * i - curvyness,
curvyness * i, segmentLength * i - curvyness);
}
path.close();
canvas.drawPath(path, Paint()..color = color);

View File

@@ -128,7 +128,8 @@ class SendMessageSheetState extends State<SendMessageSheet> {
.join(),
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,

View File

@@ -57,7 +57,10 @@ class AddNoteScreenState extends State<AddNoteScreen> {
decoration: BoxDecoration(
border: Border(
top: BorderSide(
color: Theme.of(context).colorScheme.secondary.withOpacity(0.1),
color: Theme.of(context)
.colorScheme
.secondary
.withValues(alpha: 0.1),
width: 1.1,
),
),
@@ -178,7 +181,10 @@ class AddNoteScreenState extends State<AddNoteScreen> {
}
},
child: Container(
color: Theme.of(context).colorScheme.secondary.withOpacity(0.2),
color: Theme.of(context)
.colorScheme
.secondary
.withValues(alpha: 0.2),
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Stack(
@@ -196,8 +202,8 @@ class AddNoteScreenState extends State<AddNoteScreen> {
data: IconThemeData(
color:
Theme.of(context).brightness == Brightness.light
? Colors.black.withOpacity(.5)
: Colors.white.withOpacity(.3),
? Colors.black.withValues(alpha: .5)
: Colors.white.withValues(alpha: .3),
),
child: const Icon(
FeatherIcons.check,

View File

@@ -55,8 +55,10 @@ class NoteViewScreenState extends State<NoteViewScreen> {
AddNoteScreen(initialNote: widget.note)));
},
child: Container(
color:
Theme.of(context).colorScheme.secondary.withOpacity(0.2),
color: Theme.of(context)
.colorScheme
.secondary
.withValues(alpha: 0.2),
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Stack(
@@ -74,8 +76,8 @@ class NoteViewScreenState extends State<NoteViewScreen> {
data: IconThemeData(
color:
Theme.of(context).brightness == Brightness.light
? Colors.black.withOpacity(.5)
: Colors.white.withOpacity(.3),
? Colors.black.withValues(alpha: .5)
: Colors.white.withValues(alpha: .3),
),
child: const Icon(
FeatherIcons.edit,
@@ -105,7 +107,10 @@ class NoteViewScreenState extends State<NoteViewScreen> {
Navigator.of(context).pop();
},
child: Container(
color: Theme.of(context).colorScheme.secondary.withOpacity(0.2),
color: Theme.of(context)
.colorScheme
.secondary
.withValues(alpha: 0.2),
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Stack(
@@ -123,8 +128,8 @@ class NoteViewScreenState extends State<NoteViewScreen> {
data: IconThemeData(
color:
Theme.of(context).brightness == Brightness.light
? Colors.black.withOpacity(.5)
: Colors.white.withOpacity(.3),
? Colors.black.withValues(alpha: .5)
: Colors.white.withValues(alpha: .3),
),
child: const Icon(
FeatherIcons.trash2,

View File

@@ -173,7 +173,10 @@ class NotesScreenState extends State<NotesScreen> {
SoonAlert.show(context: context);
},
child: Container(
color: Theme.of(context).colorScheme.secondary.withOpacity(0.2),
color: Theme.of(context)
.colorScheme
.secondary
.withValues(alpha: 0.2),
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Stack(
@@ -191,8 +194,8 @@ class NotesScreenState extends State<NotesScreen> {
data: IconThemeData(
color:
Theme.of(context).brightness == Brightness.light
? Colors.black.withOpacity(.5)
: Colors.white.withOpacity(.3),
? Colors.black.withValues(alpha: .5)
: Colors.white.withValues(alpha: .3),
),
child: const Icon(
FeatherIcons.search,
@@ -225,7 +228,10 @@ class NotesScreenState extends State<NotesScreen> {
builder: (context) => const AddNoteScreen()));
},
child: Container(
color: Theme.of(context).colorScheme.secondary.withOpacity(0.2),
color: Theme.of(context)
.colorScheme
.secondary
.withValues(alpha: 0.2),
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Stack(
@@ -243,8 +249,8 @@ class NotesScreenState extends State<NotesScreen> {
data: IconThemeData(
color:
Theme.of(context).brightness == Brightness.light
? Colors.black.withOpacity(.5)
: Colors.white.withOpacity(.3),
? Colors.black.withValues(alpha: .5)
: Colors.white.withValues(alpha: .3),
),
child: const Icon(
FeatherIcons.plus,

View File

@@ -63,14 +63,14 @@ class _DayTitleState extends State<DayTitle> {
textStyle: TextStyle(
color: AppColors.of(context)
.text
.withOpacity(opacity),
.withValues(alpha: opacity),
fontSize: 32.0,
fontWeight: FontWeight.bold),
)
: TextStyle(
color: AppColors.of(context)
.text
.withOpacity(opacity),
.withValues(alpha: opacity),
fontSize: 32.0,
fontWeight: FontWeight.bold),
),

View File

@@ -120,7 +120,7 @@ class _FSTimetableState extends State<FSTimetable> {
if (lessons.isEmpty) continue;
if (index == 0 && dayIndex >= 0) {
// if (index == 0 || dayIndex >=0) {
// if (index == 0 || dayIndex >=0) {
columns.add(
SizedBox(
width: colw,
@@ -157,13 +157,14 @@ class _FSTimetableState extends State<FSTimetable> {
Icon(
FeatherIcons.slash,
size: 18.0,
color: AppColors.of(context).text.withOpacity(.3),
color: AppColors.of(context).text.withValues(alpha: .3),
),
const SizedBox(width: 8.0),
Text(
"Lyukas óra",
style: TextStyle(
color: AppColors.of(context).text.withOpacity(.3),
color:
AppColors.of(context).text.withValues(alpha: .3),
),
),
],
@@ -205,7 +206,9 @@ class _FSTimetableState extends State<FSTimetable> {
subject: lsn.subject,
),
size: 18.0,
color: AppColors.of(context).text.withOpacity(.7),
color: AppColors.of(context)
.text
.withValues(alpha: .7),
),
const SizedBox(width: 8.0),
Expanded(
@@ -231,7 +234,9 @@ class _FSTimetableState extends State<FSTimetable> {
child: Text(
lsn.room,
style: TextStyle(
color: AppColors.of(context).text.withOpacity(.5),
color: AppColors.of(context)
.text
.withValues(alpha: .5),
overflow: TextOverflow.ellipsis,
),
),
@@ -251,4 +256,4 @@ class _FSTimetableState extends State<FSTimetable> {
),
);
}
}
}

View File

@@ -585,7 +585,8 @@ class TimetablePageState extends State<TimetablePage>
color: Theme.of(context)
.colorScheme
.secondary
.withOpacity(0.25),
.withValues(
alpha: 0.25),
),
borderRadius:
BorderRadius.circular(
@@ -615,8 +616,9 @@ class TimetablePageState extends State<TimetablePage>
color: AppColors.of(
context)
.text
.withOpacity(
0.90),
.withValues(
alpha:
0.90),
),
child: Text(
'break'.i18n,
@@ -661,8 +663,8 @@ class TimetablePageState extends State<TimetablePage>
context)
.colorScheme
.secondary
.withOpacity(
.5),
.withValues(
alpha: .5),
size: 10.0,
)
],
@@ -775,11 +777,11 @@ class TimetablePageState extends State<TimetablePage>
// Label
labelPadding: EdgeInsets.zero,
labelColor:
AppColors.of(context).text.withOpacity(0.9),
AppColors.of(context).text.withValues(alpha: 0.9),
unselectedLabelColor: Theme.of(context)
.colorScheme
.secondary
.withOpacity(0.25)
.withValues(alpha: 0.25)
.withAlpha(100),
// Indicator
indicatorSize: TabBarIndicatorSize.tab,
@@ -791,15 +793,15 @@ class TimetablePageState extends State<TimetablePage>
// border: Border.all(
// color: AppColors.of(context)
// .text
// .withOpacity(0.90)),
// .withValues(alpha: 0.90)),
// color: Theme.of(context)
// .colorScheme
// .secondary
// .withOpacity(0.25),
// .withValues(alpha: 0.25),
borderRadius: BorderRadius.circular(16.0),
),
overlayColor: WidgetStateProperty.all(
const Color(0x00000000)),
overlayColor:
WidgetStateProperty.all(const Color(0x00000000)),
// Tabs
padding: const EdgeInsets.symmetric(
vertical: 6.0, horizontal: 24.0),
@@ -823,7 +825,7 @@ class TimetablePageState extends State<TimetablePage>
color: Theme.of(context)
.colorScheme
.secondary
.withOpacity(0.25)
.withValues(alpha: 0.25)
.withAlpha(100)),
),
Text(
@@ -851,7 +853,7 @@ class TimetablePageState extends State<TimetablePage>
color: Theme.of(context)
.colorScheme
.secondary
.withOpacity(0.25)
.withValues(alpha: 0.25)
.withAlpha(100),
),
),