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

@ -69,7 +69,7 @@ class _CarouselBannerState extends ConsumerState<CarouselBanner> {
begin: Alignment.bottomLeft,
end: Alignment.topCenter,
colors: [
ThemesData.of(context).dark.colorScheme.primaryContainer.withOpacity(0.85),
ThemesData.of(context).dark.colorScheme.primaryContainer.withValues(alpha: 0.85),
Colors.transparent,
],
),
@ -144,7 +144,7 @@ class _CarouselBannerState extends ConsumerState<CarouselBanner> {
child: Container(
decoration: BoxDecoration(
border: Border.all(
color: Colors.white.withOpacity(0.1),
color: Colors.white.withValues(alpha: 0.1),
width: 1.0,
),
borderRadius: border),

View file

@ -52,7 +52,7 @@ class ChapterRow extends ConsumerWidget {
child: Card(
elevation: 0,
shadowColor: Colors.transparent,
color: Theme.of(context).cardColor.withOpacity(0.4),
color: Theme.of(context).cardColor.withValues(alpha: 0.4),
child: Padding(
padding: const EdgeInsets.all(5),
child: Text(

View file

@ -12,7 +12,7 @@ class ChipButton extends ConsumerWidget {
@override
Widget build(BuildContext context, WidgetRef ref) {
return Card(
color: Theme.of(context).colorScheme.onSurface.withOpacity(0.15),
color: Theme.of(context).colorScheme.onSurface.withValues(alpha: 0.15),
shadowColor: Colors.transparent,
child: FlatButton(
onTap: onPressed,

View file

@ -35,7 +35,7 @@ class MediaHeader extends ConsumerWidget {
child: Material(
elevation: 30,
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(150)),
shadowColor: Colors.black.withOpacity(0.3),
shadowColor: Colors.black.withValues(alpha: 0.3),
color: Colors.transparent,
child: ConstrainedBox(
constraints: BoxConstraints(

View file

@ -67,6 +67,7 @@ class MediaPlayButton extends ConsumerWidget {
ButtonStyle(
backgroundColor: WidgetStatePropertyAll(Theme.of(context).colorScheme.primary),
foregroundColor: WidgetStatePropertyAll(Theme.of(context).colorScheme.onPrimary),
iconColor: WidgetStatePropertyAll(Theme.of(context).colorScheme.onPrimary),
),
Theme.of(context).colorScheme.onPrimary,
),

View file

@ -99,7 +99,7 @@ class _PosterImageState extends ConsumerState<PosterImage> {
shape: RoundedRectangleBorder(
side: BorderSide(
width: 1.0,
color: Colors.white.withOpacity(0.10),
color: Colors.white.withValues(alpha: 0.10),
),
borderRadius: FladderTheme.defaultShape.borderRadius,
),
@ -133,7 +133,7 @@ class _PosterImageState extends ConsumerState<PosterImage> {
if (widget.selected == true)
Container(
decoration: BoxDecoration(
color: Colors.black.withOpacity(0.15),
color: Colors.black.withValues(alpha: 0.15),
border: Border.all(width: 3, color: Theme.of(context).colorScheme.primary),
borderRadius: FladderTheme.defaultShape.borderRadius,
),
@ -191,7 +191,7 @@ class _PosterImageState extends ConsumerState<PosterImage> {
shadowColor: Colors.transparent,
child: LinearProgressIndicator(
minHeight: 7.5,
backgroundColor: Theme.of(context).colorScheme.onPrimary.withOpacity(0.5),
backgroundColor: Theme.of(context).colorScheme.onPrimary.withValues(alpha: 0.5),
value: poster.userData.progress / 100,
borderRadius: BorderRadius.circular(2),
),
@ -213,7 +213,7 @@ class _PosterImageState extends ConsumerState<PosterImage> {
//Hover color overlay
Container(
decoration: BoxDecoration(
color: Colors.black.withOpacity(0.55),
color: Colors.black.withValues(alpha: 0.55),
border: Border.all(width: 3, color: Theme.of(context).colorScheme.primary),
borderRadius: FladderTheme.defaultShape.borderRadius,
)),

View file

@ -231,7 +231,7 @@ class EpisodePoster extends ConsumerWidget {
alignment: Alignment.bottomCenter,
child: LinearProgressIndicator(
minHeight: 6,
backgroundColor: Colors.black.withOpacity(0.75),
backgroundColor: Colors.black.withValues(alpha: 0.75),
value: episode.userData.progress / 100,
),
),
@ -260,7 +260,7 @@ class EpisodePoster extends ConsumerWidget {
Icons.more_vert,
color: Colors.white,
shadows: [
Shadow(color: Colors.black.withOpacity(0.45), blurRadius: 8.0),
Shadow(color: Colors.black.withValues(alpha: 0.45), blurRadius: 8.0),
const Shadow(color: Colors.black, blurRadius: 16.0),
const Shadow(color: Colors.black, blurRadius: 32.0),
const Shadow(color: Colors.black, blurRadius: 64.0),

View file

@ -44,11 +44,12 @@ class _ExpandingOverviewState extends ConsumerState<ExpandingOverview> {
stops: const [0, 1],
colors: [
color,
color.withOpacity(!canExpand
? 1
: expanded
color.withValues(
alpha: !canExpand
? 1
: 0),
: expanded
? 1
: 0),
],
).createShader(bounds),
child: HtmlWidget(

View file

@ -141,12 +141,13 @@ class _MediaBannerState extends ConsumerState<MediaBanner> {
foregroundDecoration: BoxDecoration(
borderRadius: BorderRadius.circular(14),
border: Border.all(
color: Colors.white.withOpacity(0.10), strokeAlign: BorderSide.strokeAlignInside),
color: Colors.white.withValues(alpha: 0.10),
strokeAlign: BorderSide.strokeAlignInside),
gradient: LinearGradient(
begin: Alignment.bottomLeft,
end: Alignment.topCenter,
colors: [
overlayColor.withOpacity(0.85),
overlayColor.withValues(alpha: 0.85),
Colors.transparent,
],
),
@ -238,7 +239,7 @@ class _MediaBannerState extends ConsumerState<MediaBanner> {
maxLines: 2,
style: Theme.of(context).textTheme.titleMedium?.copyWith(
shadows: shadows,
color: Colors.white.withOpacity(0.75),
color: Colors.white.withValues(alpha: 0.75),
),
),
),

View file

@ -61,7 +61,7 @@ class PosterListItem extends ConsumerWidget {
height: 75 * ref.read(clientSettingsProvider.select((value) => value.posterSize)),
child: Container(
decoration: BoxDecoration(
color: Theme.of(context).colorScheme.primary.withOpacity(selected == true ? 0.25 : 0),
color: Theme.of(context).colorScheme.primary.withValues(alpha: selected == true ? 0.25 : 0),
borderRadius: BorderRadius.circular(6),
),
child: FlatButton(

View file

@ -60,7 +60,7 @@ class SeasonPoster extends ConsumerWidget {
padding: const EdgeInsets.all(4),
child: Container(
child: Card(
color: Theme.of(context).colorScheme.surface.withOpacity(0.65),
color: Theme.of(context).colorScheme.surface.withValues(alpha: 0.65),
child: Padding(
padding: const EdgeInsets.symmetric(vertical: 6, horizontal: 12),
child: Text(
@ -159,7 +159,7 @@ class SeasonPoster extends ConsumerWidget {
Icons.more_vert,
color: Colors.white,
shadows: [
Shadow(color: Colors.black.withOpacity(0.45), blurRadius: 8.0),
Shadow(color: Colors.black.withValues(alpha: 0.45), blurRadius: 8.0),
const Shadow(color: Colors.black, blurRadius: 16.0),
const Shadow(color: Colors.black, blurRadius: 32.0),
const Shadow(color: Colors.black, blurRadius: 64.0),