shareMediaMusic method
分享 - 音乐
Implementation
@override
Future<void> shareMediaMusic({
required int scene,
String? title,
String? description,
Uint8List? thumbData,
String? musicUrl,
String? musicDataUrl,
String? musicLowBandUrl,
String? musicLowBandDataUrl,
}) {
assert(title == null || title.length <= 512);
assert(description == null || description.length <= 1024);
assert(thumbData == null || thumbData.lengthInBytes <= 32 * 1024);
assert(
(musicUrl != null && musicUrl.length <= 10 * 1024) ||
(musicLowBandUrl != null && musicLowBandUrl.length <= 10 * 1024),
);
return methodChannel.invokeMethod<void>(
'shareMusic',
<String, dynamic>{
'scene': scene, // Scene
if (title != null) 'title': title,
if (description != null) 'description': description,
if (thumbData != null) 'thumbData': thumbData,
if (musicUrl != null) 'musicUrl': musicUrl,
if (musicDataUrl != null) 'musicDataUrl': musicDataUrl,
if (musicLowBandUrl != null) 'musicLowBandUrl': musicLowBandUrl,
if (musicLowBandDataUrl != null)
'musicLowBandDataUrl': musicLowBandDataUrl,
},
);
}