publish --dry-run
This commit is contained in:
parent
dea2af9918
commit
dc6b767895
@ -136,21 +136,21 @@ class _HomeState extends State<Home> {
|
|||||||
ListTile(
|
ListTile(
|
||||||
title: const Text('网页分享'),
|
title: const Text('网页分享'),
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
final File file = await DefaultCacheManager().getSingleFile(
|
// final File file = await DefaultCacheManager().getSingleFile(
|
||||||
'https://www.baidu.com/img/bd_logo1.png?where=super');
|
// 'https://www.baidu.com/img/bd_logo1.png?where=super');
|
||||||
final image.Image thumbnail =
|
// final image.Image thumbnail =
|
||||||
image.decodeImage(file.readAsBytesSync())!;
|
// image.decodeImage(file.readAsBytesSync())!;
|
||||||
Uint8List thumbData = thumbnail.getBytes();
|
// Uint8List thumbData = thumbnail.getBytes();
|
||||||
if (thumbData.length > 32 * 1024) {
|
// if (thumbData.length > 32 * 1024) {
|
||||||
thumbData = Uint8List.fromList(image.encodeJpg(thumbnail,
|
// thumbData = Uint8List.fromList(image.encodeJpg(thumbnail,
|
||||||
quality: 100 * 32 * 1024 ~/ thumbData.length));
|
// quality: 100 * 32 * 1024 ~/ thumbData.length));
|
||||||
}
|
// }
|
||||||
await Weibo.instance.shareWebpage(
|
// await Weibo.instance.shareWebpage(
|
||||||
title: 'title',
|
// title: 'title',
|
||||||
description: 'share webpage',
|
// description: 'share webpage',
|
||||||
thumbData: thumbData.buffer.asUint8List(),
|
// thumbData: thumbData.buffer.asUint8List(),
|
||||||
webpageUrl: 'https://www.baidu.com',
|
// webpageUrl: 'https://www.baidu.com',
|
||||||
);
|
// );
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
Loading…
Reference in New Issue
Block a user