play method

void play(
  1. String url, {
  2. bool startAutomatically = true,
  3. bool isLocal = false,
  4. String? title,
  5. String? artist,
  6. String? album,
  7. String? imageUrl,
  8. Duration? startFrom,
})

Implementation

void play(
  String url, {
  bool startAutomatically = true,
  bool isLocal = false,
  String? title,
  String? artist,
  String? album,
  String? imageUrl,
  Duration? startFrom,
}) {
  _registerMethodCallHandler();
  _invokeNativeMethod(
    _nativeMethodPlay,
    arguments: <String, dynamic>{
      _nativeMethodPlayArgUrl: url,
      _nativeMethodPlayArgTitle: title,
      _nativeMethodPlayArgArtist: artist,
      _nativeMethodPlayArgAlbum: album,
      _nativeMethodPlayArgImageUrl: imageUrl,
      _nativeMethodPlayArgStartAutomatically: startAutomatically,
      _nativeMethodPlayArgStartFromMillis: startFrom != null ? startFrom.inMilliseconds : 0,
      _nativeMethodPlayArgIsLocal: isLocal,
    },
  );
}