瀏覽代碼

更新商品分享模板

tags/0.0.1
Weller 4 年之前
父節點
當前提交
c57b102c67
共有 5 個檔案被更改,包括 48 行新增17 行删除
  1. +6
    -6
      example/ios/Podfile.lock
  2. +4
    -0
      example/ios/Runner-Bridging-Header.h
  3. +13
    -0
      example/ios/Runner.xcodeproj/project.pbxproj
  4. +24
    -10
      lib/pages/favorite_page.dart
  5. +1
    -1
      pubspec.yaml

+ 6
- 6
example/ios/Podfile.lock 查看文件

@@ -38,8 +38,6 @@ PODS:
- TOCropViewController (~> 2.5.2)
- image_picker (0.0.1):
- Flutter
- image_save (0.0.1):
- Flutter
- jdsdk (0.0.1):
- Flutter
- mtopSDK (3.0.0.3-BC)
@@ -54,6 +52,8 @@ PODS:
- path_provider_windows (0.0.1):
- Flutter
- Reachability (3.2)
- save_image (0.0.1):
- Flutter
- securityGuard (5.4.191)
- shared_preferences (0.0.1):
- Flutter
@@ -106,13 +106,13 @@ DEPENDENCIES:
- fluttertoast (from `.symlinks/plugins/fluttertoast/ios`)
- image_cropper (from `.symlinks/plugins/image_cropper/ios`)
- image_picker (from `.symlinks/plugins/image_picker/ios`)
- image_save (from `.symlinks/plugins/image_save/ios`)
- jdsdk (from `.symlinks/plugins/jdsdk/ios`)
- package_info (from `.symlinks/plugins/package_info/ios`)
- path_provider (from `.symlinks/plugins/path_provider/ios`)
- path_provider_linux (from `.symlinks/plugins/path_provider_linux/ios`)
- path_provider_macos (from `.symlinks/plugins/path_provider_macos/ios`)
- path_provider_windows (from `.symlinks/plugins/path_provider_windows/ios`)
- save_image (from `.symlinks/plugins/save_image/ios`)
- shared_preferences (from `.symlinks/plugins/shared_preferences/ios`)
- shared_preferences_linux (from `.symlinks/plugins/shared_preferences_linux/ios`)
- shared_preferences_macos (from `.symlinks/plugins/shared_preferences_macos/ios`)
@@ -167,8 +167,6 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/image_cropper/ios"
image_picker:
:path: ".symlinks/plugins/image_picker/ios"
image_save:
:path: ".symlinks/plugins/image_save/ios"
jdsdk:
:path: ".symlinks/plugins/jdsdk/ios"
package_info:
@@ -181,6 +179,8 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/path_provider_macos/ios"
path_provider_windows:
:path: ".symlinks/plugins/path_provider_windows/ios"
save_image:
:path: ".symlinks/plugins/save_image/ios"
shared_preferences:
:path: ".symlinks/plugins/shared_preferences/ios"
shared_preferences_linux:
@@ -227,7 +227,6 @@ SPEC CHECKSUMS:
FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a
image_cropper: 3c16d7651730ffe85897f5a1c4e2547e6b54989a
image_picker: 9c3312491f862b28d21ecd8fdf0ee14e601b3f09
image_save: 66ab41fa2c60bc9569e55563ea287cced7b79fd1
jdsdk: 2ca38c7e3a2dfb0f3641425f8fd1e8d20357693f
mtopSDK: d6fdf81730342a69be920b576541c7bb81a683d5
package_info: 873975fc26034f0b863a300ad47e7f1ac6c7ec62
@@ -236,6 +235,7 @@ SPEC CHECKSUMS:
path_provider_macos: f760a3c5b04357c380e2fddb6f9db6f3015897e0
path_provider_windows: a2b81600c677ac1959367280991971cb9a1edb3b
Reachability: 33e18b67625424e47b6cde6d202dce689ad7af96
save_image: 1d4bdcb69832f573215c0e2971fe9e572dfc1c84
securityGuard: 9c04c44a3b663f36e15064042abfc107fa07133c
shared_preferences: af6bfa751691cdc24be3045c43ec037377ada40d
shared_preferences_linux: afefbfe8d921e207f01ede8b60373d9e3b566b78


+ 4
- 0
example/ios/Runner-Bridging-Header.h 查看文件

@@ -0,0 +1,4 @@
//
// Use this file to import your target's public headers that you would like to expose to Swift.
//


+ 13
- 0
example/ios/Runner.xcodeproj/project.pbxproj 查看文件

@@ -59,6 +59,7 @@
97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
9F2FEDAD2520C194002374CF /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = "<group>"; };
9FFCE2F7251ADE0600F4F353 /* yw_1222_baichuan.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = yw_1222_baichuan.jpg; sourceTree = "<group>"; };
9FFCE2FB251ADE0600F4F353 /* 1.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = 1.png; sourceTree = "<group>"; };
9FFCE2FC251ADE0600F4F353 /* 2.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = 2.png; sourceTree = "<group>"; };
@@ -102,6 +103,7 @@
9740EEB21CF90195004384FC /* Debug.xcconfig */,
7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
9740EEB31CF90195004384FC /* Generated.xcconfig */,
9F2FEDAD2520C194002374CF /* Runner-Bridging-Header.h */,
);
name = Flutter;
sourceTree = "<group>";
@@ -232,6 +234,7 @@
97C146ED1CF9000F007C117D = {
CreatedOnToolsVersion = 7.3.1;
DevelopmentTeam = 3EC5G67BTK;
LastSwiftMigration = 1130;
ProvisioningStyle = Manual;
};
};
@@ -445,6 +448,7 @@
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
DEVELOPMENT_TEAM = 3EC5G67BTK;
@@ -463,6 +467,8 @@
PRODUCT_BUNDLE_IDENTIFIER = cn.zhios.zhiying;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = cn.zhios.zhiying_dev;
SWIFT_OBJC_BRIDGING_HEADER = "Runner-Bridging-Header.h";
SWIFT_VERSION = 5.0;
VERSIONING_SYSTEM = "apple-generic";
};
name = Profile;
@@ -579,6 +585,7 @@
baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
DEVELOPMENT_TEAM = 3EC5G67BTK;
@@ -597,6 +604,9 @@
PRODUCT_BUNDLE_IDENTIFIER = cn.zhios.zhiying;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = cn.zhios.zhiying_dev;
SWIFT_OBJC_BRIDGING_HEADER = "Runner-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
VERSIONING_SYSTEM = "apple-generic";
};
name = Debug;
@@ -606,6 +616,7 @@
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
DEVELOPMENT_TEAM = 3EC5G67BTK;
@@ -624,6 +635,8 @@
PRODUCT_BUNDLE_IDENTIFIER = cn.zhios.zhiying;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = cn.zhios.zhiying_dev;
SWIFT_OBJC_BRIDGING_HEADER = "Runner-Bridging-Header.h";
SWIFT_VERSION = 5.0;
VERSIONING_SYSTEM = "apple-generic";
};
name = Release;


+ 24
- 10
lib/pages/favorite_page.dart 查看文件

@@ -3,9 +3,9 @@ import 'dart:ui' as ui;

import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
import 'package:zhiying_comm/zhiying_comm.dart';
import 'package:zhiying_base_widget/template/goods_share_template/goods_share_template.dart';
import 'package:image_save/image_save.dart';
import 'package:zhiying_comm/zhiying_comm.dart';
import 'package:save_image/save_image.dart';

class FavoritePage extends StatefulWidget {
@override
@@ -26,8 +26,11 @@ class _FavoritePageState extends State<FavoritePage> {
Container(
width: 100,
height: 200,
child: Transform.scale(
scale: 0.2, child: GoodsShareTemplate(key: globalKey)),
child: Transform.scale(scale: 0.2, child:
RepaintBoundary(
key: globalKey,
child: GoodsShareTemplate()
),),
),
FlatButton(
child: Icon(Icons.add),
@@ -47,14 +50,25 @@ class _FavoritePageState extends State<FavoritePage> {
// var response = await Dio().get(
// "https://ss0.baidu.com/94o3dSag_xI4khGko9WTAnF6hhy/image/h%3D300/sign=a62e824376d98d1069d40a31113eb807/838ba61ea8d3fd1fc9c7b6853a4e251f94ca5f46.jpg",
// options: Options(responseType: ResponseType.bytes));
bool success = await ImageSave.saveImageToSandbox(
byteData.buffer.asUint8List(), "demo.png");
print('${success}');
// final _imageSaver = ImageSaver();
// final success = await _imageSaver.saveImages(
// imageBytes: byteData.buffer.asUint8List()
// );
// final success = await ImageGallerySaver.saveImage(
// byteData.buffer.asUint8List(),
// quality: 80,
// name: "hello");
// bool success = await ImageSave.saveImageToSandbox(
// byteData.buffer.asUint8List(), "demo.png");
// print('${success}');
// print(result);
bool isSaveSuccess =
await SaveImage.save(
imageBytes: byteData.buffer.asUint8List());
print(isSaveSuccess ? "save success" : 'save fail');
}
cache(err) {
Logger.error(err);
}
} catch (err) {
Logger.error(err);
}
},
)


+ 1
- 1
pubspec.yaml 查看文件

@@ -19,7 +19,7 @@ dependencies:
image_picker: ^0.6.7+3
tab_indicator_styler: 1.0.0
connectivity: ^0.4.9+3
image_save: ^3.1.1
save_image: ^1.0.1
image_cropper:
git:
url: 'http://192.168.0.138:3000/FnuoOS_Flutter_Components/Image_Cropper.git'


Loading…
取消
儲存