s
This commit is contained in:
parent
2a103f5018
commit
a7dcfb660b
@ -2,27 +2,39 @@ PODS:
|
|||||||
- Flutter (1.0.0)
|
- Flutter (1.0.0)
|
||||||
- flutter_keyboard_visibility (0.0.1):
|
- flutter_keyboard_visibility (0.0.1):
|
||||||
- Flutter
|
- Flutter
|
||||||
|
- image_gallery_saver (1.5.0):
|
||||||
|
- Flutter
|
||||||
- path_provider_foundation (0.0.1):
|
- path_provider_foundation (0.0.1):
|
||||||
- Flutter
|
- Flutter
|
||||||
- FlutterMacOS
|
- FlutterMacOS
|
||||||
|
- permission_handler_apple (9.1.1):
|
||||||
|
- Flutter
|
||||||
|
|
||||||
DEPENDENCIES:
|
DEPENDENCIES:
|
||||||
- Flutter (from `Flutter`)
|
- Flutter (from `Flutter`)
|
||||||
- flutter_keyboard_visibility (from `.symlinks/plugins/flutter_keyboard_visibility/ios`)
|
- flutter_keyboard_visibility (from `.symlinks/plugins/flutter_keyboard_visibility/ios`)
|
||||||
|
- image_gallery_saver (from `.symlinks/plugins/image_gallery_saver/ios`)
|
||||||
- path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`)
|
- path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`)
|
||||||
|
- permission_handler_apple (from `.symlinks/plugins/permission_handler_apple/ios`)
|
||||||
|
|
||||||
EXTERNAL SOURCES:
|
EXTERNAL SOURCES:
|
||||||
Flutter:
|
Flutter:
|
||||||
:path: Flutter
|
:path: Flutter
|
||||||
flutter_keyboard_visibility:
|
flutter_keyboard_visibility:
|
||||||
:path: ".symlinks/plugins/flutter_keyboard_visibility/ios"
|
:path: ".symlinks/plugins/flutter_keyboard_visibility/ios"
|
||||||
|
image_gallery_saver:
|
||||||
|
:path: ".symlinks/plugins/image_gallery_saver/ios"
|
||||||
path_provider_foundation:
|
path_provider_foundation:
|
||||||
:path: ".symlinks/plugins/path_provider_foundation/darwin"
|
:path: ".symlinks/plugins/path_provider_foundation/darwin"
|
||||||
|
permission_handler_apple:
|
||||||
|
:path: ".symlinks/plugins/permission_handler_apple/ios"
|
||||||
|
|
||||||
SPEC CHECKSUMS:
|
SPEC CHECKSUMS:
|
||||||
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
|
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
|
||||||
flutter_keyboard_visibility: 0339d06371254c3eb25eeb90ba8d17dca8f9c069
|
flutter_keyboard_visibility: 0339d06371254c3eb25eeb90ba8d17dca8f9c069
|
||||||
|
image_gallery_saver: 259eab68fb271cfd57d599904f7acdc7832e7ef2
|
||||||
path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46
|
path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46
|
||||||
|
permission_handler_apple: e76247795d700c14ea09e3a2d8855d41ee80a2e6
|
||||||
|
|
||||||
PODFILE CHECKSUM: 819463e6a0290f5a72f145ba7cde16e8b6ef0796
|
PODFILE CHECKSUM: 819463e6a0290f5a72f145ba7cde16e8b6ef0796
|
||||||
|
|
||||||
|
|||||||
@ -24,4 +24,8 @@ class ImgCategoryPageController extends GetxController {
|
|||||||
void goScanView(var index,var dataModel){
|
void goScanView(var index,var dataModel){
|
||||||
Get.toNamed(AppRoutes.imgscanpage, arguments: {"index":index,"dataModel":dataModel});
|
Get.toNamed(AppRoutes.imgscanpage, arguments: {"index":index,"dataModel":dataModel});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Future < void> saveImgToAlbum(String imgUrl) async {
|
||||||
|
await DownloadManager.saveNetworkImage(imgUrl);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@ -92,6 +92,7 @@ class ImgCategoryPageView extends GetView<ImgCategoryPageController> {
|
|||||||
|
|
||||||
IconButton(onPressed:() {
|
IconButton(onPressed:() {
|
||||||
print("设置壁纸");
|
print("设置壁纸");
|
||||||
|
controller.saveImgToAlbum(imgUrl);
|
||||||
|
|
||||||
}, icon: Icon(Icons.wallpaper),color: Colors.white,),
|
}, icon: Icon(Icons.wallpaper),color: Colors.white,),
|
||||||
],
|
],
|
||||||
|
|||||||
@ -40,7 +40,7 @@ class DownloadManager {
|
|||||||
// }
|
// }
|
||||||
|
|
||||||
//从网络保存至相册
|
//从网络保存至相册
|
||||||
static void saveNetworkImage(String urlStr) async {
|
static Future<void> saveNetworkImage(String urlStr) async {
|
||||||
var httpClient = HttpClient();
|
var httpClient = HttpClient();
|
||||||
var reqiest = await httpClient.getUrl(Uri.parse(urlStr));
|
var reqiest = await httpClient.getUrl(Uri.parse(urlStr));
|
||||||
var response = await reqiest.close();
|
var response = await reqiest.close();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user