chore: Fix dart deprecation messages

This commit is contained in:
PartyDonut 2025-01-05 13:53:59 +01:00
parent 607dea3de1
commit 39a7537116
81 changed files with 258 additions and 195 deletions

View file

@ -136,10 +136,10 @@ class _PhotoViewerControllsState extends ConsumerState<PhotoViewerControls> with
@override
Widget build(BuildContext context) {
final gradient = [
Colors.black.withOpacity(0.6),
Colors.black.withOpacity(0.3),
Colors.black.withOpacity(0.1),
Colors.black.withOpacity(0.0),
Colors.black.withValues(alpha: 0.6),
Colors.black.withValues(alpha: 0.3),
Colors.black.withValues(alpha: 0.1),
Colors.black.withValues(alpha: 0.0),
];
final padding = MediaQuery.of(context).padding;
@ -188,9 +188,12 @@ class _PhotoViewerControllsState extends ConsumerState<PhotoViewerControls> with
.textTheme
.titleMedium
?.copyWith(fontWeight: FontWeight.bold, shadows: [
BoxShadow(blurRadius: 1, spreadRadius: 1, color: Colors.black.withOpacity(0.7)),
BoxShadow(blurRadius: 4, spreadRadius: 4, color: Colors.black.withOpacity(0.4)),
BoxShadow(blurRadius: 20, spreadRadius: 6, color: Colors.black.withOpacity(0.2)),
BoxShadow(
blurRadius: 1, spreadRadius: 1, color: Colors.black.withValues(alpha: 0.7)),
BoxShadow(
blurRadius: 4, spreadRadius: 4, color: Colors.black.withValues(alpha: 0.4)),
BoxShadow(
blurRadius: 20, spreadRadius: 6, color: Colors.black.withValues(alpha: 0.2)),
]),
),
),

View file

@ -384,8 +384,8 @@ class _PhotoViewerScreenState extends ConsumerState<PhotoViewerScreen> with Widg
begin: Alignment.topCenter,
end: Alignment.bottomCenter,
colors: [
Colors.black.withOpacity(0.5),
Colors.black.withOpacity(0),
Colors.black.withValues(alpha: 0.5),
Colors.black.withValues(alpha: 0),
],
),
),

View file

@ -226,7 +226,8 @@ class _SimpleVideoPlayerState extends ConsumerState<SimpleVideoPlayer> with Wind
icon: Icon(
player.lastState.playing ? IconsaxBold.pause_circle : IconsaxBold.play_circle,
shadows: [
BoxShadow(blurRadius: 16, spreadRadius: 2, color: Colors.black.withOpacity(0.15))
BoxShadow(
blurRadius: 16, spreadRadius: 2, color: Colors.black.withValues(alpha: 0.15))
],
),
)