From 8f621a2d953ef9e84503c5eba301872761d8827e Mon Sep 17 00:00:00 2001 From: Brazol Date: Mon, 30 Dec 2024 13:05:38 +0100 Subject: [PATCH] reverted back to withOpacity for backward compatibility --- dogfooding/lib/app/app_content.dart | 3 ++- dogfooding/lib/screens/call_stats_screen.dart | 3 ++- .../lib/screens/stats_latency_chart.dart | 18 ++++++++++++------ .../connection_quality_indicator.dart | 3 ++- .../call_participants/participant_label.dart | 3 ++- ...screen_share_call_participants_content.dart | 3 ++- .../lib/src/livestream/livestream_info.dart | 3 ++- .../lib/src/theme/stream_video_theme.dart | 9 ++++++--- 8 files changed, 30 insertions(+), 15 deletions(-) diff --git a/dogfooding/lib/app/app_content.dart b/dogfooding/lib/app/app_content.dart index 965738f4..e61eeeac 100644 --- a/dogfooding/lib/app/app_content.dart +++ b/dogfooding/lib/app/app_content.dart @@ -329,7 +329,8 @@ class _StreamDogFoodingAppContentState inactiveOptionElevation: 2, optionBackgroundColor: AppColorPalette.buttonSecondary, inactiveOptionBackgroundColor: - colorTheme.overlay.withValues(alpha: 0.4), + // ignore: deprecated_member_use + colorTheme.overlay.withOpacity(0.4), optionShape: const CircleBorder(), optionPadding: const EdgeInsets.all(14), ), diff --git a/dogfooding/lib/screens/call_stats_screen.dart b/dogfooding/lib/screens/call_stats_screen.dart index 85d2d844..b0e09570 100644 --- a/dogfooding/lib/screens/call_stats_screen.dart +++ b/dogfooding/lib/screens/call_stats_screen.dart @@ -275,7 +275,8 @@ class StatIndicator extends StatelessWidget { return Container( decoration: BoxDecoration( borderRadius: BorderRadius.circular(16), - color: indicatorData.$1.withValues(alpha: 0.16), + // ignore: deprecated_member_use + color: indicatorData.$1.withOpacity(0.16), ), padding: const EdgeInsets.all(8), child: Text( diff --git a/dogfooding/lib/screens/stats_latency_chart.dart b/dogfooding/lib/screens/stats_latency_chart.dart index 5bd86d79..6145b0c6 100644 --- a/dogfooding/lib/screens/stats_latency_chart.dart +++ b/dogfooding/lib/screens/stats_latency_chart.dart @@ -77,11 +77,13 @@ class StatsLatencyChart extends StatelessWidget { colors: [ ColorTween( begin: AppColorPalette.appGreen, - end: AppColorPalette.appGreen.withValues(alpha: 0.5)) + // ignore: deprecated_member_use + end: AppColorPalette.appGreen.withOpacity(0.5)) .lerp(0.2)!, ColorTween( begin: AppColorPalette.appGreen, - end: AppColorPalette.appGreen.withValues(alpha: 0.5)) + // ignore: deprecated_member_use + end: AppColorPalette.appGreen.withOpacity(0.5)) .lerp(0.2)!, ], ), @@ -97,15 +99,19 @@ class StatsLatencyChart extends StatelessWidget { ColorTween( begin: AppColorPalette.appGreen, end: - AppColorPalette.appGreen.withValues(alpha: 0.5)) + // ignore: deprecated_member_use + AppColorPalette.appGreen.withOpacity(0.5)) .lerp(0.2)! - .withValues(alpha: 0.1), + // ignore: deprecated_member_use + .withOpacity(0.1), ColorTween( begin: AppColorPalette.appGreen, end: - AppColorPalette.appGreen.withValues(alpha: 0.5)) + // ignore: deprecated_member_use + AppColorPalette.appGreen.withOpacity(0.5)) .lerp(0.2)! - .withValues(alpha: 0.1), + // ignore: deprecated_member_use + .withOpacity(0.1), ], ), ), diff --git a/packages/stream_video_flutter/lib/src/call_participants/indicators/connection_quality_indicator.dart b/packages/stream_video_flutter/lib/src/call_participants/indicators/connection_quality_indicator.dart index 56b50d06..8339ad15 100644 --- a/packages/stream_video_flutter/lib/src/call_participants/indicators/connection_quality_indicator.dart +++ b/packages/stream_video_flutter/lib/src/call_participants/indicators/connection_quality_indicator.dart @@ -27,7 +27,8 @@ class StreamConnectionQualityIndicator extends StatelessWidget { return DecoratedBox( decoration: BoxDecoration( - color: Colors.black.withValues(alpha: 0.85), + // ignore: deprecated_member_use + color: Colors.black.withOpacity(0.85), borderRadius: const BorderRadius.only( topLeft: Radius.circular(10), ), diff --git a/packages/stream_video_flutter/lib/src/call_participants/participant_label.dart b/packages/stream_video_flutter/lib/src/call_participants/participant_label.dart index e89fb88b..c86b3677 100644 --- a/packages/stream_video_flutter/lib/src/call_participants/participant_label.dart +++ b/packages/stream_video_flutter/lib/src/call_participants/participant_label.dart @@ -56,7 +56,8 @@ class StreamParticipantLabel extends StatelessWidget { return DecoratedBox( decoration: BoxDecoration( - color: Colors.black.withValues(alpha: 0.85), + // ignore: deprecated_member_use + color: Colors.black.withOpacity(0.85), borderRadius: const BorderRadius.only( topRight: Radius.circular(10), ), diff --git a/packages/stream_video_flutter/lib/src/call_participants/screen_share_call_participants_content.dart b/packages/stream_video_flutter/lib/src/call_participants/screen_share_call_participants_content.dart index e4fb6d83..9699050d 100644 --- a/packages/stream_video_flutter/lib/src/call_participants/screen_share_call_participants_content.dart +++ b/packages/stream_video_flutter/lib/src/call_participants/screen_share_call_participants_content.dart @@ -73,7 +73,8 @@ class ScreenShareCallParticipantsContent extends StatelessWidget { child: Container( padding: const EdgeInsets.all(8), decoration: BoxDecoration( - color: colorTheme.barsBg.withValues(alpha: 0.85), + // ignore: deprecated_member_use + color: colorTheme.barsBg.withOpacity(0.85), borderRadius: BorderRadius.circular(8), ), child: Row( diff --git a/packages/stream_video_flutter/lib/src/livestream/livestream_info.dart b/packages/stream_video_flutter/lib/src/livestream/livestream_info.dart index 1dfbd909..395e9f5c 100644 --- a/packages/stream_video_flutter/lib/src/livestream/livestream_info.dart +++ b/packages/stream_video_flutter/lib/src/livestream/livestream_info.dart @@ -79,7 +79,8 @@ class LivestreamInfo extends StatelessWidget { '${minutes.toString().padLeft(2, '0')}:${seconds.toString().padLeft(2, '0')}'; return ColoredBox( - color: Colors.black.withValues(alpha: 0.4), + // ignore: deprecated_member_use + color: Colors.black.withOpacity(0.4), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ diff --git a/packages/stream_video_flutter/lib/src/theme/stream_video_theme.dart b/packages/stream_video_flutter/lib/src/theme/stream_video_theme.dart index ea300563..9c84283c 100644 --- a/packages/stream_video_flutter/lib/src/theme/stream_video_theme.dart +++ b/packages/stream_video_flutter/lib/src/theme/stream_video_theme.dart @@ -111,7 +111,8 @@ class StreamVideoTheme extends ThemeExtension { inactiveOptionElevation: 2, optionBackgroundColor: Colors.white, inactiveOptionBackgroundColor: - colorTheme.overlay.withValues(alpha: 0.4), + // ignore: deprecated_member_use + colorTheme.overlay.withOpacity(0.4), optionShape: const CircleBorder(), optionPadding: const EdgeInsets.all(16), ), @@ -228,7 +229,8 @@ class StreamVideoTheme extends ThemeExtension { ), callingLabelTextStyle: TextStyle( fontSize: 20, - color: colorTheme.barsBg.withValues(alpha: 0.6), + // ignore: deprecated_member_use + color: colorTheme.barsBg.withOpacity(0.6), fontWeight: FontWeight.bold, ), ), @@ -275,7 +277,8 @@ class StreamVideoTheme extends ThemeExtension { ), callingLabelTextStyle: TextStyle( fontSize: 20, - color: colorTheme.barsBg.withValues(alpha: 0.6), + // ignore: deprecated_member_use + color: colorTheme.barsBg.withOpacity(0.6), fontWeight: FontWeight.bold, ), ),