first commit
This commit is contained in:
14
untitled/lib/service/DownloadService.dart
Normal file
14
untitled/lib/service/DownloadService.dart
Normal file
@@ -0,0 +1,14 @@
|
||||
import 'package:dio/dio.dart';
|
||||
import 'package:peach/http/Dio.dart';
|
||||
|
||||
class DownloadService {
|
||||
|
||||
/// 下载图片
|
||||
static Future downImage({ String url, Map<String, dynamic> params}) async {
|
||||
return await HttpApi().get(
|
||||
url: url,
|
||||
params: params,
|
||||
options: Options(responseType: ResponseType.bytes)
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user