Skip to content

Commit 4685806

Browse files
authored
fix flutter analyzer. (#510)
1 parent 76f71a2 commit 4685806

File tree

12 files changed

+34
-35
lines changed

12 files changed

+34
-35
lines changed

example/lib/main.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ void main() async {
1818
WidgetsFlutterBinding.ensureInitialized();
1919

2020
if (lkPlatformIsDesktop()) {
21-
FlutterWindowClose.setWindowShouldCloseHandler(() async {
21+
await FlutterWindowClose.setWindowShouldCloseHandler(() async {
2222
await onWindowShouldClose?.call();
2323
return true;
2424
});
@@ -30,8 +30,8 @@ void main() async {
3030
class LiveKitExampleApp extends StatelessWidget {
3131
//
3232
const LiveKitExampleApp({
33-
Key? key,
34-
}) : super(key: key);
33+
super.key,
34+
});
3535

3636
@override
3737
Widget build(BuildContext context) => MaterialApp(

example/lib/pages/connect.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ import '../exts.dart';
1111
class ConnectPage extends StatefulWidget {
1212
//
1313
const ConnectPage({
14-
Key? key,
15-
}) : super(key: key);
14+
super.key,
15+
});
1616

1717
@override
1818
State<StatefulWidget> createState() => _ConnectPageState();

example/lib/pages/prejoin.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ class JoinArgs {
3636
class PreJoinPage extends StatefulWidget {
3737
const PreJoinPage({
3838
required this.args,
39-
Key? key,
40-
}) : super(key: key);
39+
super.key,
40+
});
4141
final JoinArgs args;
4242
@override
4343
State<StatefulWidget> createState() => _PreJoinPageState();

example/lib/pages/room.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ class RoomPage extends StatefulWidget {
1919
const RoomPage(
2020
this.room,
2121
this.listener, {
22-
Key? key,
23-
}) : super(key: key);
22+
super.key,
23+
});
2424

2525
@override
2626
State<StatefulWidget> createState() => _RoomPageState();

example/lib/widgets/controls.dart

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ class ControlsWidget extends StatefulWidget {
1818
const ControlsWidget(
1919
this.room,
2020
this.participant, {
21-
Key? key,
22-
}) : super(key: key);
21+
super.key,
22+
});
2323

2424
@override
2525
State<StatefulWidget> createState() => _ControlsWidgetState();
@@ -340,7 +340,7 @@ class _ControlsWidgetState extends State<ControlsWidget> {
340340
),
341341
onTap: () => _selectAudioInput(device),
342342
);
343-
}).toList()
343+
})
344344
];
345345
},
346346
)
@@ -384,7 +384,7 @@ class _ControlsWidgetState extends State<ControlsWidget> {
384384
),
385385
onTap: () => _selectAudioOutput(device),
386386
);
387-
}).toList()
387+
})
388388
];
389389
},
390390
),
@@ -433,7 +433,7 @@ class _ControlsWidgetState extends State<ControlsWidget> {
433433
),
434434
onTap: () => _selectVideoInput(device),
435435
);
436-
}).toList()
436+
})
437437
];
438438
},
439439
)

example/lib/widgets/no_video.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import 'package:livekit_example/theme.dart';
55

66
class NoVideoWidget extends StatelessWidget {
77
//
8-
const NoVideoWidget({Key? key}) : super(key: key);
8+
const NoVideoWidget({super.key});
99

1010
@override
1111
Widget build(BuildContext context) => Container(

example/lib/widgets/participant.dart

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ abstract class ParticipantWidget extends StatefulWidget {
3737

3838
const ParticipantWidget({
3939
this.quality = VideoQuality.MEDIUM,
40-
Key? key,
41-
}) : super(key: key);
40+
super.key,
41+
});
4242
}
4343

4444
class LocalParticipantWidget extends ParticipantWidget {
@@ -56,8 +56,8 @@ class LocalParticipantWidget extends ParticipantWidget {
5656
this.videoTrack,
5757
this.isScreenShare,
5858
this.showStatsLayer, {
59-
Key? key,
60-
}) : super(key: key);
59+
super.key,
60+
});
6161

6262
@override
6363
State<StatefulWidget> createState() => _LocalParticipantWidgetState();
@@ -78,8 +78,8 @@ class RemoteParticipantWidget extends ParticipantWidget {
7878
this.videoTrack,
7979
this.isScreenShare,
8080
this.showStatsLayer, {
81-
Key? key,
82-
}) : super(key: key);
81+
super.key,
82+
});
8383

8484
@override
8585
State<StatefulWidget> createState() => _RemoteParticipantWidgetState();
@@ -249,8 +249,8 @@ class RemoteTrackPublicationMenuWidget extends StatelessWidget {
249249
const RemoteTrackPublicationMenuWidget({
250250
required this.pub,
251251
required this.icon,
252-
Key? key,
253-
}) : super(key: key);
252+
super.key,
253+
});
254254

255255
@override
256256
Widget build(BuildContext context) => Material(
@@ -287,8 +287,8 @@ class RemoteTrackFPSMenuWidget extends StatelessWidget {
287287
const RemoteTrackFPSMenuWidget({
288288
required this.pub,
289289
required this.icon,
290-
Key? key,
291-
}) : super(key: key);
290+
super.key,
291+
});
292292

293293
@override
294294
Widget build(BuildContext context) => Material(
@@ -321,8 +321,8 @@ class RemoteTrackQualityMenuWidget extends StatelessWidget {
321321
const RemoteTrackQualityMenuWidget({
322322
required this.pub,
323323
required this.icon,
324-
Key? key,
325-
}) : super(key: key);
324+
super.key,
325+
});
326326

327327
@override
328328
Widget build(BuildContext context) => Material(

example/lib/widgets/participant_info.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ class ParticipantInfoWidget extends StatelessWidget {
2525
this.connectionQuality = ConnectionQuality.unknown,
2626
this.isScreenShare = false,
2727
this.enabledE2EE = false,
28-
Key? key,
29-
}) : super(key: key);
28+
super.key,
29+
});
3030

3131
@override
3232
Widget build(BuildContext context) => Container(

example/lib/widgets/participant_stats.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ enum StatsType {
1010
}
1111

1212
class ParticipantStatsWidget extends StatefulWidget {
13-
const ParticipantStatsWidget({Key? key, required this.participant})
14-
: super(key: key);
13+
const ParticipantStatsWidget({super.key, required this.participant});
1514
final Participant participant;
1615
@override
1716
State<StatefulWidget> createState() => _ParticipantStatsWidgetState();

example/lib/widgets/text_field.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ class LKTextField extends StatelessWidget {
66
const LKTextField({
77
required this.label,
88
this.ctrl,
9-
Key? key,
10-
}) : super(key: key);
9+
super.key,
10+
});
1111

1212
@override
1313
Widget build(BuildContext context) => Column(

0 commit comments

Comments
 (0)