Skip to content

Commit 893cefd

Browse files
author
Illia Romanenko
committed
fix lint issues and deprecated calls, format
1 parent 35078f5 commit 893cefd

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

flutter_vlc_player/example/lib/single_tab.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -190,15 +190,15 @@ class _SingleTabState extends State<SingleTab> {
190190
hwAcc: HwAcc.FULL);
191191
break;
192192
case VideoType.file:
193-
Scaffold.of(context).showSnackBar(
193+
ScaffoldMessenger.of(context).showSnackBar(
194194
SnackBar(
195195
content: Text('Copying file to temporary storage...'),
196196
),
197197
);
198198
await Future.delayed(Duration(seconds: 1));
199199
var tempVideo = await _loadVideoToFs();
200200
await Future.delayed(Duration(seconds: 1));
201-
Scaffold.of(context).showSnackBar(
201+
ScaffoldMessenger.of(context).showSnackBar(
202202
SnackBar(
203203
content: Text('Now trying to play...'),
204204
),
@@ -207,7 +207,7 @@ class _SingleTabState extends State<SingleTab> {
207207
if (await tempVideo.exists()) {
208208
await _controller.setMediaFromFile(tempVideo);
209209
} else {
210-
Scaffold.of(context).showSnackBar(
210+
ScaffoldMessenger.of(context).showSnackBar(
211211
SnackBar(
212212
content: Text('File load error.'),
213213
),

flutter_vlc_player/example/lib/vlc_player_with_controls.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ class VlcPlayerWithControlsState extends State<VlcPlayerWithControls>
373373
}
374374

375375
void _togglePlaying() async {
376-
_controller.value.isPlaying
376+
_controller.value.isPlaying
377377
? await _controller.pause()
378378
: await _controller.play();
379379
}
@@ -510,7 +510,7 @@ class VlcPlayerWithControlsState extends State<VlcPlayerWithControls>
510510
);
511511
await _controller.castToRenderer(selectedCastDeviceName);
512512
} else {
513-
Scaffold.of(context)
513+
ScaffoldMessenger.of(context)
514514
.showSnackBar(SnackBar(content: Text('No Display Device Found!')));
515515
}
516516
}

flutter_vlc_player/lib/src/vlc_player_controller.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -846,7 +846,6 @@ class VlcPlayerController extends ValueNotifier<VlcPlayerValue> {
846846
/// [viewId] - the id of view that is generated by the platform
847847
/// This method will be called after the platform view has been created
848848
Future<void> onPlatformViewCreated(int viewId) async {
849-
if (viewId == null) return;
850849
_viewId = viewId;
851850
// do we need to initialize controller after view becomes ready?
852851
if (autoInitialize) {

0 commit comments

Comments
 (0)