From dc6b7678952b0c3861297bdff66efdb7e15f58f6 Mon Sep 17 00:00:00 2001 From: v7lin Date: Tue, 29 Mar 2022 11:05:26 +0800 Subject: [PATCH] publish --dry-run --- example/lib/main.dart | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/example/lib/main.dart b/example/lib/main.dart index d06cbf2..8fd248d 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -136,21 +136,21 @@ class _HomeState extends State { ListTile( title: const Text('网页分享'), onTap: () async { - final File file = await DefaultCacheManager().getSingleFile( - 'https://www.baidu.com/img/bd_logo1.png?where=super'); - final image.Image thumbnail = - image.decodeImage(file.readAsBytesSync())!; - Uint8List thumbData = thumbnail.getBytes(); - if (thumbData.length > 32 * 1024) { - thumbData = Uint8List.fromList(image.encodeJpg(thumbnail, - quality: 100 * 32 * 1024 ~/ thumbData.length)); - } - await Weibo.instance.shareWebpage( - title: 'title', - description: 'share webpage', - thumbData: thumbData.buffer.asUint8List(), - webpageUrl: 'https://www.baidu.com', - ); + // final File file = await DefaultCacheManager().getSingleFile( + // 'https://www.baidu.com/img/bd_logo1.png?where=super'); + // final image.Image thumbnail = + // image.decodeImage(file.readAsBytesSync())!; + // Uint8List thumbData = thumbnail.getBytes(); + // if (thumbData.length > 32 * 1024) { + // thumbData = Uint8List.fromList(image.encodeJpg(thumbnail, + // quality: 100 * 32 * 1024 ~/ thumbData.length)); + // } + // await Weibo.instance.shareWebpage( + // title: 'title', + // description: 'share webpage', + // thumbData: thumbData.buffer.asUint8List(), + // webpageUrl: 'https://www.baidu.com', + // ); }, ), ],