Skip to content

Commit 5b44ceb

Browse files
committed
fix warnings, format
flutter analyze lib/src/player.dart: Color.red is deprecated, remove
1 parent e155062 commit 5b44ceb

File tree

6 files changed

+7
-15
lines changed

6 files changed

+7
-15
lines changed

lib/fvp.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import 'src/video_player_mdk.dart'
88

99
export 'src/controller.dart';
1010

11-
/// Registers this plugin as the default instance of [VideoPlayerPlatform]. Then your [VideoPlayer] will support all platforms.
11+
/// Registers this plugin as the default instance of VideoPlayerPlatform. Then your [VideoPlayer] will support all platforms.
1212
/// If registerWith is not called, the previous(usually official) implementation will be used when available.
1313
1414
/// [options] can be

lib/src/controller.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ extension FVPControllerExtensions on VideoPlayerController {
9494
}
9595

9696
/// Step forward or backward.
97-
/// Step forward if [frame] > 0, backward otherwise.
97+
/// Step forward if [frames] > 0, backward otherwise.
9898
Future<void> step({int frames = 1}) async {
9999
return _platform.step(textureId, frames);
100100
}

lib/src/media_info_dummy.dart

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,2 @@
11
/// A dummy class for web
2-
class MediaInfo {
3-
4-
}
2+
class MediaInfo {}

lib/src/player.dart

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ class Player {
173173

174174
/// Release current texture then create a new one for current [media], and update [textureId].
175175
///
176-
/// Texture will be created when media is loaded and [mediaInfo.video] is not empty.
176+
/// Texture will be created when media is loaded and mediaInfo.video is not empty.
177177
/// If both [width] and [height] are null, texture size is video frame size, otherwise is requested size.
178178
Future<int> updateTexture(
179179
{int? width, int? height, bool? tunnel, bool? fit}) async {
@@ -615,13 +615,6 @@ class Player {
615615
Pointer<Void>)>()(
616616
_player.ref.object, r, g, b, a, Pointer.fromAddress(0));
617617

618-
/// Set background color.
619-
/// https://github.com/wang-bin/mdk-sdk/wiki/Player-APIs#void-setbackgroundcolorfloat-r-float-g-float-b-float-a-void-vo_opaque--nullptr
620-
void setBackground(ui.Color c) => _player.ref.setBackgroundColor.asFunction<
621-
void Function(Pointer<mdkPlayer>, double, double, double, double,
622-
Pointer<Void>)>()(_player.ref.object, c.red / 255, c.green / 255,
623-
c.blue / 255, c.alpha / 255, Pointer.fromAddress(0));
624-
625618
/// Set a built-in video effect.
626619
/// https://github.com/wang-bin/mdk-sdk/wiki/Player-APIs#player-setvideoeffect-effect-const-float-values-void-vo_opaque--nullptr
627620
void setVideoEffect(VideoEffect effect, List<double> value) {

lib/src/video_player_dummy.dart

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ class MdkVideoPlayerPlatform {
1111
return false;
1212
}
1313

14-
MediaInfo? getMediaInfo(int textureId) { return null; }
14+
MediaInfo? getMediaInfo(int textureId) {
15+
return null;
16+
}
1517

1618
void setProperty(int textureId, String name, String value) {}
1719

lib/src/video_player_mdk.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ import 'media_info.dart';
1414

1515
import '../mdk.dart' as mdk;
1616

17-
1817
final _log = Logger('fvp');
1918

2019
class MdkVideoPlayer extends mdk.Player {

0 commit comments

Comments
 (0)