shareWebpage method

  1. @override
Future<void> shareWebpage({
  1. required int scene,
  2. String? title,
  3. String? description,
  4. Uint8List? thumbData,
  5. required String webpageUrl,
})
override

分享 - 网页

Implementation

@override
Future<void> shareWebpage({
  required int scene,
  String? title,
  String? description,
  Uint8List? thumbData,
  required String webpageUrl,
}) {
  assert(title == null || title.length <= 512);
  assert(description == null || description.length <= 1024);
  assert(thumbData == null || thumbData.lengthInBytes <= 32 * 1024);
  assert(webpageUrl.length <= 10 * 1024);
  return methodChannel.invokeMethod<void>(
    'shareWebpage',
    <String, dynamic>{
      'scene': scene, // Scene
      if (title != null) 'title': title,
      if (description != null) 'description': description,
      if (thumbData != null) 'thumbData': thumbData,
      'webpageUrl': webpageUrl,
    },
  );
}