Open AugustToko opened 3 years ago
当分享一个大型壁纸 > 3mb 就会出现明显的卡顿。
> 3mb
Future<void> shareWallpaper(Wallpaper wallpaper) async { final dir = Directory(wallpaper.getDirPath()); final pak = await WallpaperFileUtil.packWallpaper(dir); print('----------------------------------'); print(pak.path); print(pak.existsSync()); final newPath = (await getTemporaryDirectory()).path + Platform.pathSeparator + FileUtils.basename(pak.path); pak.renameSync(newPath); print('----------------------------------'); print(newPath); print(File(newPath)); if (pak != null && pak.existsSync()) { Share.shareFiles([newPath], text: '${wallpaper.name}\n${wallpaper.description}'); } }
当分享一个大型壁纸
> 3mb
就会出现明显的卡顿。