Skip to content

Commit

Permalink
reverted back to withOpacity for backward compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
Brazol committed Dec 30, 2024
1 parent 84c060e commit 8f621a2
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 15 deletions.
3 changes: 2 additions & 1 deletion dogfooding/lib/app/app_content.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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),
),
Expand Down
3 changes: 2 additions & 1 deletion dogfooding/lib/screens/call_stats_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
18 changes: 12 additions & 6 deletions dogfooding/lib/screens/stats_latency_chart.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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)!,
],
),
Expand All @@ -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),
],
),
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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),
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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),
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,8 @@ class StreamVideoTheme extends ThemeExtension<StreamVideoTheme> {
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),
),
Expand Down Expand Up @@ -228,7 +229,8 @@ class StreamVideoTheme extends ThemeExtension<StreamVideoTheme> {
),
callingLabelTextStyle: TextStyle(
fontSize: 20,
color: colorTheme.barsBg.withValues(alpha: 0.6),
// ignore: deprecated_member_use
color: colorTheme.barsBg.withOpacity(0.6),
fontWeight: FontWeight.bold,
),
),
Expand Down Expand Up @@ -275,7 +277,8 @@ class StreamVideoTheme extends ThemeExtension<StreamVideoTheme> {
),
callingLabelTextStyle: TextStyle(
fontSize: 20,
color: colorTheme.barsBg.withValues(alpha: 0.6),
// ignore: deprecated_member_use
color: colorTheme.barsBg.withOpacity(0.6),
fontWeight: FontWeight.bold,
),
),
Expand Down

0 comments on commit 8f621a2

Please sign in to comment.