Skip to content

Commit eeb4505

Browse files
bcherrycloudwebrtc
andauthored
Don't fail analyze on deprecation warnings (#13)
* Don't fail analyze on deprecation warnings * no fatal infos * dart fmt. --------- Co-authored-by: cloudwebrtc <[email protected]>
1 parent ea3cb16 commit eeb4505

File tree

10 files changed

+15
-18
lines changed

10 files changed

+15
-18
lines changed

.github/workflows/build.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
- name: Import Sorter Check
4242
run: dart run import_sorter:main --no-comments --exit-if-changed
4343
- name: Dart Analyze Check
44-
run: flutter analyze
44+
run: flutter analyze --no-fatal-infos
4545

4646
build-for-android:
4747
name: Build for Flutter Android

lib/src/ui/widgets/participant/participant_status_bar.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ class ParticipantStatusBar extends StatelessWidget {
4949
var isScreenShare = trackCtx?.isScreenShare ?? false;
5050
return Container(
5151
padding: const EdgeInsets.symmetric(horizontal: 6),
52-
color: Colors.black.withValues(alpha: 0.6),
52+
color: Colors.black.withOpacity(0.6),
5353
child: Row(
5454
mainAxisAlignment: MainAxisAlignment.end,
5555
crossAxisAlignment: CrossAxisAlignment.center,

lib/src/ui/widgets/room/camera_switch_button.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@ class CameraSwitchButton extends StatelessWidget {
3232
Widget build(BuildContext context) {
3333
return ElevatedButton(
3434
style: ButtonStyle(
35-
backgroundColor:
36-
WidgetStateProperty.all(Colors.grey.withValues(alpha: 0.9)),
35+
backgroundColor: WidgetStateProperty.all(Colors.grey.withOpacity(0.9)),
3736
foregroundColor: WidgetStateProperty.all(Colors.white),
3837
overlayColor: WidgetStateProperty.all(Colors.grey),
3938
shape: WidgetStateProperty.all(const RoundedRectangleBorder(

lib/src/ui/widgets/room/chat_toggle.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class ChatToggleWidget extends StatelessWidget {
3636
return ElevatedButton(
3737
style: ButtonStyle(
3838
backgroundColor: WidgetStateProperty.all(
39-
isChatOpen ? LKColors.lkBlue : Colors.grey.withValues(alpha: 0.9)),
39+
isChatOpen ? LKColors.lkBlue : Colors.grey.withOpacity(0.9)),
4040
foregroundColor: WidgetStateProperty.all(Colors.white),
4141
overlayColor: WidgetStateProperty.all(
4242
isChatOpen ? LKColors.lkLightBlue : Colors.grey),

lib/src/ui/widgets/room/disconnect_button.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class DisconnectButtonWidget extends StatelessWidget {
4242
return ElevatedButton(
4343
style: ButtonStyle(
4444
backgroundColor: WidgetStateProperty.all(
45-
connected ? Colors.red : Colors.grey.withValues(alpha: 0.9)),
45+
connected ? Colors.red : Colors.grey.withOpacity(0.9)),
4646
foregroundColor: WidgetStateProperty.all(Colors.white),
4747
overlayColor:
4848
WidgetStateProperty.all(connected ? Colors.redAccent : Colors.grey),

lib/src/ui/widgets/room/media_device_select_button.dart

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,8 @@ class MediaDeviceSelectWidget extends StatelessWidget {
5353
return Row(mainAxisSize: MainAxisSize.min, children: [
5454
ElevatedButton(
5555
style: ButtonStyle(
56-
backgroundColor: WidgetStateProperty.all(deviceIsOpened
57-
? LKColors.lkBlue
58-
: Colors.grey.withValues(alpha: 0.9)),
56+
backgroundColor: WidgetStateProperty.all(
57+
deviceIsOpened ? LKColors.lkBlue : Colors.grey.withOpacity(0.9)),
5958
foregroundColor: WidgetStateProperty.all(Colors.white),
6059
overlayColor: WidgetStateProperty.all(
6160
deviceIsOpened ? LKColors.lkLightBlue : Colors.grey),
@@ -93,7 +92,7 @@ class MediaDeviceSelectWidget extends StatelessWidget {
9392
0, ((deviceList.isNotEmpty ? deviceList.length : 1) * -55.0)),
9493
style: ButtonStyle(
9594
backgroundColor:
96-
WidgetStateProperty.all(Colors.grey.withValues(alpha: 0.9)),
95+
WidgetStateProperty.all(Colors.grey.withOpacity(0.9)),
9796
foregroundColor: WidgetStateProperty.all(Colors.white),
9897
overlayColor: WidgetStateProperty.all(Colors.grey),
9998
elevation: WidgetStateProperty.all(20),

lib/src/ui/widgets/room/screenshare_toggle.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class ScreenShareToggleWidget extends StatelessWidget {
4242
style: ButtonStyle(
4343
backgroundColor: WidgetStateProperty.all(screenShareEnabled
4444
? LKColors.lkBlue
45-
: Colors.grey.withValues(alpha: 0.9)),
45+
: Colors.grey.withOpacity(0.9)),
4646
foregroundColor: WidgetStateProperty.all(Colors.white),
4747
overlayColor: WidgetStateProperty.all(
4848
screenShareEnabled ? LKColors.lkLightBlue : Colors.grey),

lib/src/ui/widgets/room/speaker_switch_button.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@ class SpeakerSwitchButton extends StatelessWidget {
3030
Widget build(BuildContext context) {
3131
return ElevatedButton(
3232
style: ButtonStyle(
33-
backgroundColor:
34-
WidgetStateProperty.all(Colors.grey.withValues(alpha: 0.9)),
33+
backgroundColor: WidgetStateProperty.all(Colors.grey.withOpacity(0.9)),
3534
foregroundColor: WidgetStateProperty.all(Colors.white),
3635
overlayColor: WidgetStateProperty.all(Colors.grey),
3736
shape: WidgetStateProperty.all(const RoundedRectangleBorder(

lib/src/ui/widgets/theme.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ class LiveKitTheme {
6060
// backgroundColor: WidgetStateProperty.all<Color>(accentColor),
6161
backgroundColor: WidgetStateProperty.resolveWith((states) {
6262
if (states.contains(WidgetState.disabled)) {
63-
return accentColor.withValues(alpha: 0.5);
63+
return accentColor.withOpacity(0.5);
6464
}
6565
return accentColor;
6666
}),
@@ -75,13 +75,13 @@ class LiveKitTheme {
7575
if (states.contains(WidgetState.selected)) {
7676
return accentColor;
7777
}
78-
return accentColor.withValues(alpha: 0.3);
78+
return accentColor.withOpacity(0.3);
7979
}),
8080
thumbColor: WidgetStateProperty.resolveWith((states) {
8181
if (states.contains(WidgetState.selected)) {
8282
return Colors.white;
8383
}
84-
return Colors.white.withValues(alpha: 0.3);
84+
return Colors.white.withOpacity(0.3);
8585
}),
8686
),
8787
dialogTheme: DialogTheme(
@@ -103,7 +103,7 @@ class LiveKitTheme {
103103
color: LKColors.lkBlue,
104104
),
105105
hintStyle: TextStyle(
106-
color: LKColors.lkBlue.withValues(alpha: .5),
106+
color: LKColors.lkBlue.withOpacity(0.5),
107107
),
108108
enabledBorder: InputBorder.none,
109109
focusedBorder: InputBorder.none,

lib/src/ui/widgets/track/track_stats_widget.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class TrackStatsWidget extends StatelessWidget {
2626
children: [
2727
trackCtx.showStatistics && stats.isNotEmpty
2828
? Container(
29-
color: Colors.black.withValues(alpha: 0.3),
29+
color: Colors.black.withOpacity(0.3),
3030
padding: const EdgeInsets.symmetric(
3131
vertical: 8,
3232
horizontal: 8,

0 commit comments

Comments
 (0)