@@ -3,21 +3,21 @@ | |||
"packages": [ | |||
{ | |||
"name": "archive", | |||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/archive-2.0.11", | |||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/archive-2.0.13", | |||
"packageUri": "lib/", | |||
"languageVersion": "2.0" | |||
}, | |||
{ | |||
"name": "args", | |||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/args-1.5.2", | |||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/args-1.6.0", | |||
"packageUri": "lib/", | |||
"languageVersion": "2.0" | |||
"languageVersion": "2.3" | |||
}, | |||
{ | |||
"name": "async", | |||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/async-2.4.0", | |||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/async-2.4.1", | |||
"packageUri": "lib/", | |||
"languageVersion": "2.0" | |||
"languageVersion": "2.2" | |||
}, | |||
{ | |||
"name": "bloc", | |||
@@ -27,9 +27,9 @@ | |||
}, | |||
{ | |||
"name": "boolean_selector", | |||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/boolean_selector-1.0.5", | |||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/boolean_selector-2.0.0", | |||
"packageUri": "lib/", | |||
"languageVersion": "2.0" | |||
"languageVersion": "2.4" | |||
}, | |||
{ | |||
"name": "cached_network_image", | |||
@@ -39,9 +39,9 @@ | |||
}, | |||
{ | |||
"name": "charcode", | |||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/charcode-1.1.2", | |||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/charcode-1.1.3", | |||
"packageUri": "lib/", | |||
"languageVersion": "1.0" | |||
"languageVersion": "2.0" | |||
}, | |||
{ | |||
"name": "clock", | |||
@@ -51,7 +51,7 @@ | |||
}, | |||
{ | |||
"name": "collection", | |||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/collection-1.14.11", | |||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/collection-1.14.12", | |||
"packageUri": "lib/", | |||
"languageVersion": "2.0" | |||
}, | |||
@@ -87,7 +87,7 @@ | |||
}, | |||
{ | |||
"name": "crypto", | |||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/crypto-2.1.3", | |||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/crypto-2.1.4", | |||
"packageUri": "lib/", | |||
"languageVersion": "2.1" | |||
}, | |||
@@ -225,7 +225,7 @@ | |||
}, | |||
{ | |||
"name": "image", | |||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/image-2.1.4", | |||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/image-2.1.12", | |||
"packageUri": "lib/", | |||
"languageVersion": "2.0" | |||
}, | |||
@@ -321,7 +321,7 @@ | |||
}, | |||
{ | |||
"name": "pedantic", | |||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/pedantic-1.8.0+1", | |||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/pedantic-1.9.0", | |||
"packageUri": "lib/", | |||
"languageVersion": "2.1" | |||
}, | |||
@@ -363,9 +363,9 @@ | |||
}, | |||
{ | |||
"name": "provider", | |||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/provider-4.0.5+1", | |||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/provider-4.3.2+2", | |||
"packageUri": "lib/", | |||
"languageVersion": "2.2" | |||
"languageVersion": "2.7" | |||
}, | |||
{ | |||
"name": "pull_to_refresh", | |||
@@ -375,7 +375,7 @@ | |||
}, | |||
{ | |||
"name": "quiver", | |||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/quiver-2.0.5", | |||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/quiver-2.1.3", | |||
"packageUri": "lib/", | |||
"languageVersion": "2.0" | |||
}, | |||
@@ -453,9 +453,9 @@ | |||
}, | |||
{ | |||
"name": "source_span", | |||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/source_span-1.5.5", | |||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/source_span-1.7.0", | |||
"packageUri": "lib/", | |||
"languageVersion": "1.8" | |||
"languageVersion": "2.6" | |||
}, | |||
{ | |||
"name": "sqflite", | |||
@@ -495,9 +495,9 @@ | |||
}, | |||
{ | |||
"name": "synchronized", | |||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/synchronized-2.2.0", | |||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/synchronized-2.2.0+2", | |||
"packageUri": "lib/", | |||
"languageVersion": "2.6" | |||
"languageVersion": "2.8" | |||
}, | |||
{ | |||
"name": "tab_indicator_styler", | |||
@@ -513,9 +513,9 @@ | |||
}, | |||
{ | |||
"name": "test_api", | |||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/test_api-0.2.11", | |||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/test_api-0.2.15", | |||
"packageUri": "lib/", | |||
"languageVersion": "2.2" | |||
"languageVersion": "2.4" | |||
}, | |||
{ | |||
"name": "transformer_page_view", | |||
@@ -597,9 +597,9 @@ | |||
}, | |||
{ | |||
"name": "xml", | |||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/xml-3.5.0", | |||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/xml-3.6.1", | |||
"packageUri": "lib/", | |||
"languageVersion": "2.3" | |||
"languageVersion": "2.6" | |||
}, | |||
{ | |||
"name": "zhiying_comm", | |||
@@ -614,7 +614,7 @@ | |||
"languageVersion": "2.1" | |||
} | |||
], | |||
"generated": "2020-10-10T09:42:22.543230Z", | |||
"generated": "2020-10-13T01:47:29.095085Z", | |||
"generator": "pub", | |||
"generatorVersion": "2.7.2" | |||
"generatorVersion": "2.8.2" | |||
} |
@@ -5,6 +5,8 @@ source 'https://github.com/CocoaPods/Specs.git' | |||
# CocoaPods analytics sends network stats synchronously affecting flutter build latency. | |||
ENV['COCOAPODS_DISABLE_STATS'] = 'true' | |||
#use_frameworks! | |||
project 'Runner', { | |||
'Debug' => :debug, | |||
'Profile' => :release, | |||
@@ -137,7 +137,7 @@ PODS: | |||
- sqflite (0.0.1): | |||
- Flutter | |||
- FMDB (~> 2.7.2) | |||
- TOCropViewController (2.5.3) | |||
- TOCropViewController (2.5.4) | |||
- url_launcher (0.0.1): | |||
- Flutter | |||
- url_launcher_linux (0.0.1): | |||
@@ -217,11 +217,10 @@ SPEC REPOS: | |||
- UTDID | |||
- WindVane | |||
https://github.com/CocoaPods/Specs.git: | |||
- FMDB | |||
- mob_sharesdk | |||
- MOBFoundation | |||
- Reachability | |||
trunk: | |||
- FMDB | |||
- TOCropViewController | |||
EXTERNAL SOURCES: | |||
@@ -334,7 +333,7 @@ SPEC CHECKSUMS: | |||
shared_preferences_windows: 36b76d6f54e76ead957e60b49e2f124b4cd3e6ae | |||
sharesdk_plugin: de8d8b87c50d60017472c5da425db1acd2911e0a | |||
sqflite: 4001a31ff81d210346b500c55b17f4d6c7589dd0 | |||
TOCropViewController: 20a14b6a7a098308bf369e7c8d700dc983a974e6 | |||
TOCropViewController: 2a1ae1242600b1f2d996fd91a5268b2309a33b5c | |||
url_launcher: 6fef411d543ceb26efce54b05a0a40bfd74cbbef | |||
url_launcher_linux: ac237cb7a8058736e4aae38bdbcc748a4b394cc0 | |||
url_launcher_macos: fd7894421cd39320dce5f292fc99ea9270b2a313 | |||
@@ -346,6 +345,6 @@ SPEC CHECKSUMS: | |||
zhiying_base_widget: 064547d1dfe4a5832487f275cd4775d6da8f260c | |||
zhiying_comm: 0daef4a480f4f4dbea3e11b615f3264aafea924b | |||
PODFILE CHECKSUM: 1a8daf665c989cd04294c52f08548c3a236358d1 | |||
PODFILE CHECKSUM: b876ad7c3dca51c928ab9b8b08f46dd6a845c75e | |||
COCOAPODS: 1.9.3 |
@@ -282,7 +282,7 @@ class _GoodsShareImageState extends State<GoodsShareImage> | |||
Fluttertoast.showToast(msg: '保存失败'); | |||
} | |||
void _updateModel() async { | |||
Future<ShareDataModel> _updateModel() async { | |||
if (_isPosterSelected) { | |||
BuildContext buildContext = _globalKey.currentContext; | |||
if (null != buildContext) { | |||
@@ -298,11 +298,12 @@ class _GoodsShareImageState extends State<GoodsShareImage> | |||
_shareModel.poster = null; | |||
} | |||
_shareModel.content = _isContentSelected ? _content : ''; | |||
return _shareModel; | |||
} | |||
// 弹出分享框 | |||
void _showShareAlert() async { | |||
_updateModel(); | |||
await _updateModel(); | |||
List<String> images = List(); | |||
for (int index = 0; index < _style.customImage.length; index++) { | |||
if (_images.containsKey(index)) { | |||
@@ -3,6 +3,7 @@ import 'dart:ui'; | |||
import 'package:cached_network_image/cached_network_image.dart'; | |||
import 'package:flutter/material.dart'; | |||
import 'package:fluttertoast/fluttertoast.dart'; | |||
import 'package:permission_handler/permission_handler.dart'; | |||
import 'package:share_extend/share_extend.dart'; | |||
import 'package:sharesdk_plugin/sharesdk_plugin.dart'; | |||
@@ -10,6 +11,9 @@ import 'package:zhiying_base_widget/utils/image_download_util/image_download_uti | |||
import 'package:zhiying_base_widget/widgets/share/models/share_data_model.dart'; | |||
import 'package:zhiying_base_widget/widgets/share/models/share_icon_model.dart'; | |||
import 'package:zhiying_comm/zhiying_comm.dart'; | |||
// import 'package:image_gallery_saver/image_gallery_saver.dart'; | |||
import 'package:path_provider/path_provider.dart'; | |||
class ShareAlert extends StatelessWidget { | |||
final String skipIdentifier; | |||
@@ -226,6 +230,14 @@ class _ShareAlertContentState extends State<_ShareAlertContent> { | |||
SSDKMap params; | |||
if (widget.model.poster != null) { | |||
// 检查并请求权限 | |||
var status = await Permission.storage.status; | |||
if (status != PermissionStatus.granted) { | |||
status = await Permission.storage.request(); | |||
} | |||
if (status == PermissionStatus.denied) { | |||
Fluttertoast.showToast(msg: '暂无权限,分享失败'); | |||
return; | |||
} | |||
// PermissionStatus status = await PermissionHandler().checkPermissionStatus( | |||
// PermissionGroup.storage); | |||
// if (PermissionStatus.granted != status) { | |||
@@ -237,21 +249,17 @@ class _ShareAlertContentState extends State<_ShareAlertContent> { | |||
// final result = await ImageGallerySaver.saveImage(widget.model.poster); | |||
// var appDocDir = await getTemporaryDirectory(); | |||
// String savePath = appDocDir.path + "/temp.mp4"; | |||
// await Dio().download( | |||
// "http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4", savePath); | |||
// final result = await ImageGallerySaver.saveFile(savePath); | |||
// print(result); | |||
// List<String> paths = await ImageDownloadUtil.download([ | |||
// 'https://upload-images.jianshu.io/upload_images/19714621-fe7d422703eb7e70.jpeg?imageMogr2/auto-orient/strip|imageView2/1/w/360/h/240' | |||
// ]); | |||
// final result = await ImageGallerySaver.saveImage( | |||
// widget.model.poster, | |||
// quality: 60, | |||
// name: "hello"); | |||
// Logger.debug(result); | |||
// params = SSDKMap() | |||
// ..setGeneral( | |||
// widget.model.title, | |||
// widget.model.content, | |||
// [ | |||
// 'https://upload-images.jianshu.io/upload_images/19714621-fe7d422703eb7e70.jpeg?imageMogr2/auto-orient/strip|imageView2/1/w/360/h/240' | |||
// ], | |||
// widget.model.poster, | |||
// null, | |||
// null, | |||
// widget.model.url, | |||
@@ -31,6 +31,7 @@ dependencies: | |||
flutter_native_image: ^0.0.5 | |||
#字符检测 | |||
string_validator: 0.1.4 | |||
# image_gallery_saver: ^1.6.0 | |||
permission_handler: | |||
git: | |||