Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't fail analyze on deprecation warnings #13

Merged
merged 3 commits into from
Feb 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
- name: Import Sorter Check
run: dart run import_sorter:main --no-comments --exit-if-changed
- name: Dart Analyze Check
run: flutter analyze
run: flutter analyze --no-fatal-infos

build-for-android:
name: Build for Flutter Android
Expand Down
2 changes: 1 addition & 1 deletion lib/src/ui/widgets/participant/participant_status_bar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class ParticipantStatusBar extends StatelessWidget {
var isScreenShare = trackCtx?.isScreenShare ?? false;
return Container(
padding: const EdgeInsets.symmetric(horizontal: 6),
color: Colors.black.withValues(alpha: 0.6),
color: Colors.black.withOpacity(0.6),
child: Row(
mainAxisAlignment: MainAxisAlignment.end,
crossAxisAlignment: CrossAxisAlignment.center,
Expand Down
3 changes: 1 addition & 2 deletions lib/src/ui/widgets/room/camera_switch_button.dart
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ class CameraSwitchButton extends StatelessWidget {
Widget build(BuildContext context) {
return ElevatedButton(
style: ButtonStyle(
backgroundColor:
WidgetStateProperty.all(Colors.grey.withValues(alpha: 0.9)),
backgroundColor: WidgetStateProperty.all(Colors.grey.withOpacity(0.9)),
foregroundColor: WidgetStateProperty.all(Colors.white),
overlayColor: WidgetStateProperty.all(Colors.grey),
shape: WidgetStateProperty.all(const RoundedRectangleBorder(
Expand Down
2 changes: 1 addition & 1 deletion lib/src/ui/widgets/room/chat_toggle.dart
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class ChatToggleWidget extends StatelessWidget {
return ElevatedButton(
style: ButtonStyle(
backgroundColor: WidgetStateProperty.all(
isChatOpen ? LKColors.lkBlue : Colors.grey.withValues(alpha: 0.9)),
isChatOpen ? LKColors.lkBlue : Colors.grey.withOpacity(0.9)),
foregroundColor: WidgetStateProperty.all(Colors.white),
overlayColor: WidgetStateProperty.all(
isChatOpen ? LKColors.lkLightBlue : Colors.grey),
Expand Down
2 changes: 1 addition & 1 deletion lib/src/ui/widgets/room/disconnect_button.dart
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class DisconnectButtonWidget extends StatelessWidget {
return ElevatedButton(
style: ButtonStyle(
backgroundColor: WidgetStateProperty.all(
connected ? Colors.red : Colors.grey.withValues(alpha: 0.9)),
connected ? Colors.red : Colors.grey.withOpacity(0.9)),
foregroundColor: WidgetStateProperty.all(Colors.white),
overlayColor:
WidgetStateProperty.all(connected ? Colors.redAccent : Colors.grey),
Expand Down
7 changes: 3 additions & 4 deletions lib/src/ui/widgets/room/media_device_select_button.dart
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,8 @@ class MediaDeviceSelectWidget extends StatelessWidget {
return Row(mainAxisSize: MainAxisSize.min, children: [
ElevatedButton(
style: ButtonStyle(
backgroundColor: WidgetStateProperty.all(deviceIsOpened
? LKColors.lkBlue
: Colors.grey.withValues(alpha: 0.9)),
backgroundColor: WidgetStateProperty.all(
deviceIsOpened ? LKColors.lkBlue : Colors.grey.withOpacity(0.9)),
foregroundColor: WidgetStateProperty.all(Colors.white),
overlayColor: WidgetStateProperty.all(
deviceIsOpened ? LKColors.lkLightBlue : Colors.grey),
Expand Down Expand Up @@ -93,7 +92,7 @@ class MediaDeviceSelectWidget extends StatelessWidget {
0, ((deviceList.isNotEmpty ? deviceList.length : 1) * -55.0)),
style: ButtonStyle(
backgroundColor:
WidgetStateProperty.all(Colors.grey.withValues(alpha: 0.9)),
WidgetStateProperty.all(Colors.grey.withOpacity(0.9)),
foregroundColor: WidgetStateProperty.all(Colors.white),
overlayColor: WidgetStateProperty.all(Colors.grey),
elevation: WidgetStateProperty.all(20),
Expand Down
2 changes: 1 addition & 1 deletion lib/src/ui/widgets/room/screenshare_toggle.dart
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class ScreenShareToggleWidget extends StatelessWidget {
style: ButtonStyle(
backgroundColor: WidgetStateProperty.all(screenShareEnabled
? LKColors.lkBlue
: Colors.grey.withValues(alpha: 0.9)),
: Colors.grey.withOpacity(0.9)),
foregroundColor: WidgetStateProperty.all(Colors.white),
overlayColor: WidgetStateProperty.all(
screenShareEnabled ? LKColors.lkLightBlue : Colors.grey),
Expand Down
3 changes: 1 addition & 2 deletions lib/src/ui/widgets/room/speaker_switch_button.dart
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ class SpeakerSwitchButton extends StatelessWidget {
Widget build(BuildContext context) {
return ElevatedButton(
style: ButtonStyle(
backgroundColor:
WidgetStateProperty.all(Colors.grey.withValues(alpha: 0.9)),
backgroundColor: WidgetStateProperty.all(Colors.grey.withOpacity(0.9)),
foregroundColor: WidgetStateProperty.all(Colors.white),
overlayColor: WidgetStateProperty.all(Colors.grey),
shape: WidgetStateProperty.all(const RoundedRectangleBorder(
Expand Down
8 changes: 4 additions & 4 deletions lib/src/ui/widgets/theme.dart
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class LiveKitTheme {
// backgroundColor: WidgetStateProperty.all<Color>(accentColor),
backgroundColor: WidgetStateProperty.resolveWith((states) {
if (states.contains(WidgetState.disabled)) {
return accentColor.withValues(alpha: 0.5);
return accentColor.withOpacity(0.5);
}
return accentColor;
}),
Expand All @@ -75,13 +75,13 @@ class LiveKitTheme {
if (states.contains(WidgetState.selected)) {
return accentColor;
}
return accentColor.withValues(alpha: 0.3);
return accentColor.withOpacity(0.3);
}),
thumbColor: WidgetStateProperty.resolveWith((states) {
if (states.contains(WidgetState.selected)) {
return Colors.white;
}
return Colors.white.withValues(alpha: 0.3);
return Colors.white.withOpacity(0.3);
}),
),
dialogTheme: DialogTheme(
Expand All @@ -103,7 +103,7 @@ class LiveKitTheme {
color: LKColors.lkBlue,
),
hintStyle: TextStyle(
color: LKColors.lkBlue.withValues(alpha: .5),
color: LKColors.lkBlue.withOpacity(0.5),
),
enabledBorder: InputBorder.none,
focusedBorder: InputBorder.none,
Expand Down
2 changes: 1 addition & 1 deletion lib/src/ui/widgets/track/track_stats_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class TrackStatsWidget extends StatelessWidget {
children: [
trackCtx.showStatistics && stats.isNotEmpty
? Container(
color: Colors.black.withValues(alpha: 0.3),
color: Colors.black.withOpacity(0.3),
padding: const EdgeInsets.symmetric(
vertical: 8,
horizontal: 8,
Expand Down