Skip to content

Commit 8795c60

Browse files
authored
Merge pull request #17 from PicGo/dev
pre release v1.9.2+23
2 parents 8f4957d + 48e5fcf commit 8795c60

29 files changed

+880
-271
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Flutter-PicGo: 一个用于快速上传图片并获取图片URL链接的**手机
2121
- 七牛云 [v1.3+]
2222
- 阿里云OSS [v1.4+]
2323
- 腾讯云COS [v1.5+]
24-
- 牛图网 [v1.6+]
24+
- ~~牛图网(已无法使用)~~ [v1.6+]
2525
- 兰空 [v1.7+]
2626
- 又拍云 [v1.8+]
2727

android/app/build.gradle

+3
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@ android {
5050
targetSdkVersion 28
5151
versionCode flutterVersionCode.toInteger()
5252
versionName flutterVersionName
53+
54+
// support multidex
55+
multiDexEnabled true
5356
}
5457

5558
signingConfigs {

ios/Podfile.lock

+12-6
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@ PODS:
99
- FMDB (2.7.5):
1010
- FMDB/standard (= 2.7.5)
1111
- FMDB/standard (2.7.5)
12-
- image_picker (0.0.1):
13-
- Flutter
1412
- MTBBarcodeScanner (5.0.11)
1513
- package_info (0.0.1):
1614
- Flutter
1715
- path_provider (0.0.1):
1816
- Flutter
1917
- "permission_handler (5.0.1+1)":
2018
- Flutter
19+
- photo_manager (0.0.1):
20+
- Flutter
2121
- shared_preferences (0.0.1):
2222
- Flutter
2323
- sqflite (0.0.2):
@@ -26,18 +26,21 @@ PODS:
2626
- SwiftProtobuf (1.9.0)
2727
- url_launcher (0.0.1):
2828
- Flutter
29+
- video_player (0.0.1):
30+
- Flutter
2931

3032
DEPENDENCIES:
3133
- barcode_scan (from `.symlinks/plugins/barcode_scan/ios`)
3234
- Flutter (from `Flutter`)
3335
- flutter_local_notifications (from `.symlinks/plugins/flutter_local_notifications/ios`)
34-
- image_picker (from `.symlinks/plugins/image_picker/ios`)
3536
- package_info (from `.symlinks/plugins/package_info/ios`)
3637
- path_provider (from `.symlinks/plugins/path_provider/ios`)
3738
- permission_handler (from `.symlinks/plugins/permission_handler/ios`)
39+
- photo_manager (from `.symlinks/plugins/photo_manager/ios`)
3840
- shared_preferences (from `.symlinks/plugins/shared_preferences/ios`)
3941
- sqflite (from `.symlinks/plugins/sqflite/ios`)
4042
- url_launcher (from `.symlinks/plugins/url_launcher/ios`)
43+
- video_player (from `.symlinks/plugins/video_player/ios`)
4144

4245
SPEC REPOS:
4346
trunk:
@@ -52,35 +55,38 @@ EXTERNAL SOURCES:
5255
:path: Flutter
5356
flutter_local_notifications:
5457
:path: ".symlinks/plugins/flutter_local_notifications/ios"
55-
image_picker:
56-
:path: ".symlinks/plugins/image_picker/ios"
5758
package_info:
5859
:path: ".symlinks/plugins/package_info/ios"
5960
path_provider:
6061
:path: ".symlinks/plugins/path_provider/ios"
6162
permission_handler:
6263
:path: ".symlinks/plugins/permission_handler/ios"
64+
photo_manager:
65+
:path: ".symlinks/plugins/photo_manager/ios"
6366
shared_preferences:
6467
:path: ".symlinks/plugins/shared_preferences/ios"
6568
sqflite:
6669
:path: ".symlinks/plugins/sqflite/ios"
6770
url_launcher:
6871
:path: ".symlinks/plugins/url_launcher/ios"
72+
video_player:
73+
:path: ".symlinks/plugins/video_player/ios"
6974

7075
SPEC CHECKSUMS:
7176
barcode_scan: a5c27959edfafaa0c771905bad0b29d6d39e4479
7277
Flutter: 0e3d915762c693b495b44d77113d4970485de6ec
7378
flutter_local_notifications: 0c0b1ae97e741e1521e4c1629a459d04b9aec743
7479
FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a
75-
image_picker: 9c3312491f862b28d21ecd8fdf0ee14e601b3f09
7680
MTBBarcodeScanner: f453b33c4b7dfe545d8c6484ed744d55671788cb
7781
package_info: 873975fc26034f0b863a300ad47e7f1ac6c7ec62
7882
path_provider: abfe2b5c733d04e238b0d8691db0cfd63a27a93c
7983
permission_handler: eac8e15b4a1a3fba55b761d19f3f4e6b005d15b6
84+
photo_manager: f7c619c2cc8c2adb8d85c63363babac477de9c67
8085
shared_preferences: af6bfa751691cdc24be3045c43ec037377ada40d
8186
sqflite: 6d358c025f5b867b29ed92fc697fd34924e11904
8287
SwiftProtobuf: ecbec1be9036d15655f6b3443a1c4ea693c97932
8388
url_launcher: 6fef411d543ceb26efce54b05a0a40bfd74cbbef
89+
video_player: 9cc823b1d9da7e8427ee591e8438bfbcde500e6e
8490

8591
PODFILE CHECKSUM: 08e41981fcdc78ff11c898bc59c6c49635c114b3
8692

lib/api/tcyun_api.dart

+8-10
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,14 @@ class TcyunApi {
1111
static const String secretKey = 'secretKey';
1212
static const String secretId = 'secretId';
1313

14-
static Future postObject(String secretId, String secretKey, String bucket, String area, String ext, FormData formData) async {
14+
static Future postObject(String secretId, String secretKey, String bucket,
15+
String area, String ext, FormData formData) async {
1516
Response res = await NetUtils.getInstance().post(
16-
'https://$bucket.cos.$area.$BASE_URL/',
17-
data: formData,
18-
options: Options(
19-
extra: {TcyunApi.secretId: secretId, TcyunApi.secretKey: secretKey},
20-
contentType: 'image/$ext'
21-
)
22-
);
17+
'https://$bucket.cos.$area.$BASE_URL/',
18+
data: formData,
19+
options: Options(
20+
extra: {TcyunApi.secretId: secretId, TcyunApi.secretKey: secretKey},
21+
contentType: 'image/$ext'));
2322
return res.headers;
2423
}
2524

@@ -56,7 +55,7 @@ class TcyunApi {
5655
/// signkey
5756
var hmacsha1Signkey = Hmac(sha1, utf8.encode(secretKey));
5857
var signKey = hmacsha1Signkey.convert(utf8.encode(keyTime));
59-
// string to sign
58+
// string to sign
6059
var stringToSign = sha1.convert(utf8.encode(policy));
6160
// signature
6261
var hmacsha1Signature = Hmac(sha1, utf8.encode('$signKey'));
@@ -131,7 +130,6 @@ class TcyunInterceptor extends InterceptorsWrapper {
131130
}
132131
if (headers != null) {
133132
headers.forEach((key, value) {
134-
print('key = $key, value = $value');
135133
headerList += '${Uri.encodeComponent(key).toLowerCase()};';
136134
httpHeaders +=
137135
'${Uri.encodeComponent(key).toLowerCase()}=${Uri.encodeComponent(value)}&';

lib/components/manage_item.dart

+18-42
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
import 'package:cached_network_image/cached_network_image.dart';
1+
import 'package:extended_image/extended_image.dart';
22
import 'package:flutter/material.dart';
3+
import 'package:flutter_picgo/utils/extended.dart';
34
import 'package:path/path.dart';
45

56
typedef GestureTapCallback = void Function();
@@ -77,48 +78,23 @@ class ManageItem extends StatelessWidget {
7778
var imageSuffixs = ['png', 'bmp', 'jpeg', 'gif', 'jpg'];
7879
if (imageSuffixs.contains(suffix)) {
7980
return SizedBox(
80-
height: 50,
81-
width: 50,
82-
child: Card(
83-
clipBehavior: Clip.antiAlias,
84-
shape: RoundedRectangleBorder(
85-
borderRadius: BorderRadiusDirectional.circular(2)),
86-
child: CachedNetworkImage(
87-
imageUrl: this.url,
88-
fit: BoxFit.cover,
89-
placeholder: (context, url) => Center(
90-
child: Container(
91-
width: 10,
92-
height: 10,
93-
child: CircularProgressIndicator(
94-
strokeWidth: 3,
95-
),
96-
),
81+
height: 50,
82+
width: 50,
83+
child: Card(
84+
clipBehavior: Clip.antiAlias,
85+
shape: RoundedRectangleBorder(
86+
borderRadius: BorderRadiusDirectional.circular(2)),
87+
child: ExtendedImage.network(
88+
this.url,
89+
width: 50,
90+
height: 50,
91+
fit: BoxFit.cover,
92+
cache: true,
93+
border: Border.all(color: Colors.grey, width: 1.0),
94+
borderRadius: BorderRadius.all(Radius.circular(8)),
95+
loadStateChanged: (state) => defaultLoadStateChanged(state),
9796
),
98-
errorWidget: (context, url, error) {
99-
return Container(
100-
color: Colors.grey,
101-
child: Center(
102-
child: Column(
103-
mainAxisAlignment: MainAxisAlignment.center,
104-
children: <Widget>[
105-
Icon(
106-
Icons.error,
107-
size: 12,
108-
),
109-
SizedBox(height: 2),
110-
Text(
111-
'加载失败',
112-
style: TextStyle(fontSize: 8),
113-
)
114-
],
115-
),
116-
),
117-
);
118-
},
119-
),
120-
),
121-
);
97+
));
12298
} else {
12399
return buildCenterIcon(Icon(IconData(0xe654, fontFamily: 'iconfont')));
124100
}

0 commit comments

Comments
 (0)