McPlayer class
McPlayer is a utility class for creating video player widgets from different sources.
It provides static methods for creating a McVideoPlayer widget for:
- Network Videos: Use the
networkmethod with a URL to play videos from the network. - Local Files: Use the
filemethod with a File object to play videos stored locally. - Assets: Use the
assetmethod with a path to play videos bundled with the app.
Example Usage:
McPlayer.network(url: 'https://example.com/video.mp4');
// For local file
McPlayer.file(file: File('/path/to/video.mp4'));
// For asset video
McPlayer.asset(path: 'assets/videos/video.mp4');
Constructors
- McPlayer()
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited