From 4685806b2f8cb6b5988be880eb4da82114e02237 Mon Sep 17 00:00:00 2001 From: CloudWebRTC Date: Mon, 6 May 2024 10:20:47 +0800 Subject: [PATCH] fix flutter analyzer. (#510) --- example/lib/main.dart | 6 +++--- example/lib/pages/connect.dart | 4 ++-- example/lib/pages/prejoin.dart | 4 ++-- example/lib/pages/room.dart | 4 ++-- example/lib/widgets/controls.dart | 10 ++++----- example/lib/widgets/no_video.dart | 2 +- example/lib/widgets/participant.dart | 24 +++++++++++----------- example/lib/widgets/participant_info.dart | 4 ++-- example/lib/widgets/participant_stats.dart | 3 +-- example/lib/widgets/text_field.dart | 4 ++-- ios/livekit_client.podspec | 2 +- macos/livekit_client.podspec | 2 +- 12 files changed, 34 insertions(+), 35 deletions(-) diff --git a/example/lib/main.dart b/example/lib/main.dart index 09cc265e..144d79e5 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -18,7 +18,7 @@ void main() async { WidgetsFlutterBinding.ensureInitialized(); if (lkPlatformIsDesktop()) { - FlutterWindowClose.setWindowShouldCloseHandler(() async { + await FlutterWindowClose.setWindowShouldCloseHandler(() async { await onWindowShouldClose?.call(); return true; }); @@ -30,8 +30,8 @@ void main() async { class LiveKitExampleApp extends StatelessWidget { // const LiveKitExampleApp({ - Key? key, - }) : super(key: key); + super.key, + }); @override Widget build(BuildContext context) => MaterialApp( diff --git a/example/lib/pages/connect.dart b/example/lib/pages/connect.dart index ff0695ee..4706dfca 100644 --- a/example/lib/pages/connect.dart +++ b/example/lib/pages/connect.dart @@ -11,8 +11,8 @@ import '../exts.dart'; class ConnectPage extends StatefulWidget { // const ConnectPage({ - Key? key, - }) : super(key: key); + super.key, + }); @override State createState() => _ConnectPageState(); diff --git a/example/lib/pages/prejoin.dart b/example/lib/pages/prejoin.dart index 2b02c44a..f5bf9cc4 100644 --- a/example/lib/pages/prejoin.dart +++ b/example/lib/pages/prejoin.dart @@ -36,8 +36,8 @@ class JoinArgs { class PreJoinPage extends StatefulWidget { const PreJoinPage({ required this.args, - Key? key, - }) : super(key: key); + super.key, + }); final JoinArgs args; @override State createState() => _PreJoinPageState(); diff --git a/example/lib/pages/room.dart b/example/lib/pages/room.dart index c68094e2..73bef2f1 100644 --- a/example/lib/pages/room.dart +++ b/example/lib/pages/room.dart @@ -19,8 +19,8 @@ class RoomPage extends StatefulWidget { const RoomPage( this.room, this.listener, { - Key? key, - }) : super(key: key); + super.key, + }); @override State createState() => _RoomPageState(); diff --git a/example/lib/widgets/controls.dart b/example/lib/widgets/controls.dart index 096a3460..73955041 100644 --- a/example/lib/widgets/controls.dart +++ b/example/lib/widgets/controls.dart @@ -18,8 +18,8 @@ class ControlsWidget extends StatefulWidget { const ControlsWidget( this.room, this.participant, { - Key? key, - }) : super(key: key); + super.key, + }); @override State createState() => _ControlsWidgetState(); @@ -340,7 +340,7 @@ class _ControlsWidgetState extends State { ), onTap: () => _selectAudioInput(device), ); - }).toList() + }) ]; }, ) @@ -384,7 +384,7 @@ class _ControlsWidgetState extends State { ), onTap: () => _selectAudioOutput(device), ); - }).toList() + }) ]; }, ), @@ -433,7 +433,7 @@ class _ControlsWidgetState extends State { ), onTap: () => _selectVideoInput(device), ); - }).toList() + }) ]; }, ) diff --git a/example/lib/widgets/no_video.dart b/example/lib/widgets/no_video.dart index 1bbdb103..9da2d0c4 100644 --- a/example/lib/widgets/no_video.dart +++ b/example/lib/widgets/no_video.dart @@ -5,7 +5,7 @@ import 'package:livekit_example/theme.dart'; class NoVideoWidget extends StatelessWidget { // - const NoVideoWidget({Key? key}) : super(key: key); + const NoVideoWidget({super.key}); @override Widget build(BuildContext context) => Container( diff --git a/example/lib/widgets/participant.dart b/example/lib/widgets/participant.dart index bb41dba3..7c6d529e 100644 --- a/example/lib/widgets/participant.dart +++ b/example/lib/widgets/participant.dart @@ -37,8 +37,8 @@ abstract class ParticipantWidget extends StatefulWidget { const ParticipantWidget({ this.quality = VideoQuality.MEDIUM, - Key? key, - }) : super(key: key); + super.key, + }); } class LocalParticipantWidget extends ParticipantWidget { @@ -56,8 +56,8 @@ class LocalParticipantWidget extends ParticipantWidget { this.videoTrack, this.isScreenShare, this.showStatsLayer, { - Key? key, - }) : super(key: key); + super.key, + }); @override State createState() => _LocalParticipantWidgetState(); @@ -78,8 +78,8 @@ class RemoteParticipantWidget extends ParticipantWidget { this.videoTrack, this.isScreenShare, this.showStatsLayer, { - Key? key, - }) : super(key: key); + super.key, + }); @override State createState() => _RemoteParticipantWidgetState(); @@ -249,8 +249,8 @@ class RemoteTrackPublicationMenuWidget extends StatelessWidget { const RemoteTrackPublicationMenuWidget({ required this.pub, required this.icon, - Key? key, - }) : super(key: key); + super.key, + }); @override Widget build(BuildContext context) => Material( @@ -287,8 +287,8 @@ class RemoteTrackFPSMenuWidget extends StatelessWidget { const RemoteTrackFPSMenuWidget({ required this.pub, required this.icon, - Key? key, - }) : super(key: key); + super.key, + }); @override Widget build(BuildContext context) => Material( @@ -321,8 +321,8 @@ class RemoteTrackQualityMenuWidget extends StatelessWidget { const RemoteTrackQualityMenuWidget({ required this.pub, required this.icon, - Key? key, - }) : super(key: key); + super.key, + }); @override Widget build(BuildContext context) => Material( diff --git a/example/lib/widgets/participant_info.dart b/example/lib/widgets/participant_info.dart index fc11603a..b9eba9da 100644 --- a/example/lib/widgets/participant_info.dart +++ b/example/lib/widgets/participant_info.dart @@ -25,8 +25,8 @@ class ParticipantInfoWidget extends StatelessWidget { this.connectionQuality = ConnectionQuality.unknown, this.isScreenShare = false, this.enabledE2EE = false, - Key? key, - }) : super(key: key); + super.key, + }); @override Widget build(BuildContext context) => Container( diff --git a/example/lib/widgets/participant_stats.dart b/example/lib/widgets/participant_stats.dart index 115d470c..24bd49e6 100644 --- a/example/lib/widgets/participant_stats.dart +++ b/example/lib/widgets/participant_stats.dart @@ -10,8 +10,7 @@ enum StatsType { } class ParticipantStatsWidget extends StatefulWidget { - const ParticipantStatsWidget({Key? key, required this.participant}) - : super(key: key); + const ParticipantStatsWidget({super.key, required this.participant}); final Participant participant; @override State createState() => _ParticipantStatsWidgetState(); diff --git a/example/lib/widgets/text_field.dart b/example/lib/widgets/text_field.dart index 8608e3fc..db9c42d6 100644 --- a/example/lib/widgets/text_field.dart +++ b/example/lib/widgets/text_field.dart @@ -6,8 +6,8 @@ class LKTextField extends StatelessWidget { const LKTextField({ required this.label, this.ctrl, - Key? key, - }) : super(key: key); + super.key, + }); @override Widget build(BuildContext context) => Column( diff --git a/ios/livekit_client.podspec b/ios/livekit_client.podspec index 54cb8048..74bcac08 100644 --- a/ios/livekit_client.podspec +++ b/ios/livekit_client.podspec @@ -16,5 +16,5 @@ Pod::Spec.new do |s| s.static_framework = true s.dependency 'Flutter' - s.dependency 'WebRTC-SDK', '114.5735.09' + s.dependency 'WebRTC-SDK', '114.5735.10' end diff --git a/macos/livekit_client.podspec b/macos/livekit_client.podspec index 5c3fd1f5..7e9104a4 100644 --- a/macos/livekit_client.podspec +++ b/macos/livekit_client.podspec @@ -16,5 +16,5 @@ Pod::Spec.new do |s| s.static_framework = true s.dependency 'FlutterMacOS' - s.dependency 'WebRTC-SDK', '114.5735.09' + s.dependency 'WebRTC-SDK', '114.5735.10' end