taijuan / image_picker_flutter Goto Github PK
View Code? Open in Web Editor NEWImagePicker
License: Other
ImagePicker
License: Other
path.replaceAll() path为null了
Your library is awesome, it's very nice and complete
However there is a small problem here:
For devices with a large number of images, the load time of screen image selection is very large.
AndroidManifest.xml uses
android:name="io.flutter.app.FlutterApplication"
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Build failed due to use of deprecated Android v1 embedding.
/Users/hjc1/.pub-cache/hosted/pub.flutter-io.cn/image_picker_flutter-1.3.1/ios/Classes/ImagePickerFlutterPlugin.m:2:9: fatal error: 'image_picker_flutter/image_picker_flutter-Swift.h' file not found
#import <image_picker_flutter/image_picker_flutter-Swift.h>
Error output from Xcode build:
↳
2019-12-20 11:10:00.925 xcodebuild[76861:12042906] [MT] iPhoneConnect: 📱<DVTiOSDevice (0x7fc944b0dcc0), qiujie的 iPhone, iPhone, 13.1.3 (17A878), 7ce3d4082b95f0e10f4f00320e9623e44fd2e463> == Underlying device preparation errors ==
2019-12-20 11:10:00.925 xcodebuild[76861:12042906] [MT] iPhoneConnect: 📱<DVTiOSDevice (0x7fc944b0dcc0), qiujie的 iPhone, iPhone, 13.1.3 (17A878), 7ce3d4082b95f0e10f4f00320e9623e44fd2e463> -- Failed _shouldMakeReadyForDevelopment check even though device is not locked by passcode.
Domain: com.apple.platform.iphoneos
Code: 5
Failure Reason: allowsSecureServices: 1. isConnected: 0. Platform: <DVTPlatform:0x7fc942c3ef20:'com.apple.platform.iphoneos':<DVTFilePath:0x7fc942c3eea0:'/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform'>>. DTDKDeviceIdentifierIsIDID: 0
--
2019-12-20 11:10:00.925 xcodebuild[76861:12042906] [MT] iPhoneConnect: 📱<DVTiOSDevice (0x7fc944b0dcc0), qiujie的 iPhone, iPhone, 13.1.3 (17A878), 7ce3d4082b95f0e10f4f00320e9623e44fd2e463> == END: Underlying device preparation errors ==
2019-12-20 11:10:01.487 xcodebuild[76861:12042906] [MT] iPhoneConnect: 📱<DVTiOSDevice (0x7fc944b0dcc0), qiujie的 iPhone, iPhone, 13.1.3 (17A878), 7ce3d4082b95f0e10f4f00320e9623e44fd2e463> == Underlying device preparation errors ==
2019-12-20 11:10:01.487 xcodebuild[76861:12042906] [MT] iPhoneConnect: 📱<DVTiOSDevice (0x7fc944b0dcc0), qiujie的 iPhone, iPhone, 13.1.3 (17A878), 7ce3d4082b95f0e10f4f00320e9623e44fd2e463> -- Failed _shouldMakeReadyForDevelopment check even though device is not locked by passcode.
Domain: com.apple.platform.iphoneos
Code: 5
Failure Reason: allowsSecureServices: 1. isConnected: 0. Platform: <DVTPlatform:0x7fc942c3ef20:'com.apple.platform.iphoneos':<DVTFilePath:0x7fc942c3eea0:'/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform'>>. DTDKDeviceIdentifierIsIDID: 0
--
2019-12-20 11:10:01.488 xcodebuild[76861:12042906] [MT] iPhoneConnect: 📱<DVTiOSDevice (0x7fc944b0dcc0), qiujie的 iPhone, iPhone, 13.1.3 (17A878), 7ce3d4082b95f0e10f4f00320e9623e44fd2e463> == END: Underlying device preparation errors ==
** BUILD FAILED **
Xcode's output:
↳
/Users/tian/.pub-cache/hosted/pub.flutter-io.cn/image_picker_flutter-1.4.2/ios/Classes/SwiftImagePickerFlutterPlugin.swift:262:17: warning: instance method 'imagePickerController(_:didFinishPickingMediaWithInfo:)' nearly matches optional requirement 'imagePickerController(_:didFinishPickingMediaWithInfo:)' of protocol 'UIImagePickerControllerDelegate'
public func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [UIImagePickerController.InfoKey : Any]) {
^
/Users/tian/.pub-cache/hosted/pub.flutter-io.cn/image_picker_flutter-1.4.2/ios/Classes/SwiftImagePickerFlutterPlugin.swift:262:17: note: candidate has non-matching type '(UIImagePickerController, [UIImagePickerController.InfoKey : Any]) -> ()' (aka '(UIImagePickerController, Dictionary<NSString, Any>) -> ()')
public func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [UIImagePickerController.InfoKey : Any]) {
^
/Users/tian/.pub-cache/hosted/pub.flutter-io.cn/image_picker_flutter-1.4.2/ios/Classes/SwiftImagePickerFlutterPlugin.swift:262:17: note: move 'imagePickerController(_:didFinishPickingMediaWithInfo:)' to an extension to silence this warning
public func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [UIImagePickerController.InfoKey : Any]) {
^
UIKit.UIImagePickerControllerDelegate:8:19: note: requirement 'imagePickerController(_:didFinishPickingMediaWithInfo:)' declared here
optional func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [String : Any])
^
/Users/tian/.pub-cache/hosted/pub.flutter-io.cn/image_picker_flutter-1.4.2/ios/Classes/SwiftImagePickerFlutterPlugin.swift:236:35: error: 'jpegData(compressionQuality:)' has been renamed to 'UIImageJPEGRepresentation(_:_:)'
data = image?.jpegData(compressionQuality: 100) ?? nil
^~~~~~~~
UIImageJPEGRepresentation
UIKit.UIImage:60:17: note: 'jpegData(compressionQuality:)' was introduced in Swift 4.2
public func jpegData(compressionQuality: CGFloat) -> Data?
^
/Users/tian/.pub-cache/hosted/pub.flutter-io.cn/image_picker_flutter-1.4.2/ios/Classes/SwiftImagePickerFlutterPlugin.swift:263:42: warning: cast from 'Slice<Dictionary<UIImagePickerController.InfoKey, Any>>' (aka 'Slice<Dictionary<NSString, Any>>') to unrelated type 'String' always fails
let mediaType = info[.mediaType] as! String;
~~~~~~~~~~~~~~~~ ^ ~~~~~~
/Users/tian/.pub-cache/hosted/pub.flutter-io.cn/image_picker_flutter-1.4.2/ios/Classes/SwiftImagePickerFlutterPlugin.swift:263:29: error: ambiguous reference to member 'subscript'
let mediaType = info[.mediaType] as! String;
~~~~^~~~~~~~~~~~
Swift.Dictionary<τ_0_0, τ_0_1>:8:23: note: found this candidate
@inlinable public subscript(position: Dictionary<Key, Value>.Index) -> [Key : Value].Element { get }
^
Swift.Dictionary<τ_0_0, τ_0_1>:2:23: note: found this candidate
@inlinable public subscript(key: Key) -> Value? { get set }
^
Swift.Dictionary<τ_0_0, τ_0_1>:2:23: note: found this candidate
@inlinable public subscript(key: Key, default defaultValue: @autoclosure () -> Value) -> Value { get set }
^
Swift.Collection:2:23: note: found this candidate
@inlinable public subscript(bounds: Range<Self.Index>) -> Slice<Self> { get }
^
Swift.Collection:2:23: note: found this candidate
@inlinable public subscript<R>(r: R) -> Self.SubSequence where R : RangeExpression, Self.Index == R.Bound { get }
^
Swift.Collection:3:23: note: found this candidate
@inlinable public subscript(x: (UnboundedRange_) -> ()) -> Self.SubSequence { get }
^
/Users/tian/.pub-cache/hosted/pub.flutter-io.cn/image_picker_flutter-1.4.2/ios/Classes/SwiftImagePickerFlutterPlugin.swift:265:56: warning: cast from 'Slice<Dictionary<UIImagePickerController.InfoKey, Any>>' (aka 'Slice<Dictionary<NSString, Any>>') to unrelated type 'UIImage' always fails
let image:UIImage? = info[.originalImage] as? UIImage;
~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~
/Users/tian/.pub-cache/hosted/pub.flutter-io.cn/image_picker_flutter-1.4.2/ios/Classes/SwiftImagePickerFlutterPlugin.swift:265:56: warning: cast from 'Slice<Dictionary<UIImagePickerController.InfoKey, Any>>' (aka 'Slice<Dictionary<NSString, Any>>') to unrelated type 'UIImage' always fails
let image:UIImage? = info[.originalImage] as? UIImage;
~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~
/Users/tian/.pub-cache/hosted/pub.flutter-io.cn/image_picker_flutter-1.4.2/ios/Classes/SwiftImagePickerFlutterPlugin.swift:265:56: error: 'UIImage?' is not convertible to 'UIImage'
let image:UIImage? = info[.originalImage] as? UIImage;
~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
/Users/tian/.pub-cache/hosted/pub.flutter-io.cn/image_picker_flutter-1.4.2/ios/Classes/SwiftImagePickerFlutterPlugin.swift:274:51: warning: cast from 'Slice<Dictionary<UIImagePickerController.InfoKey, Any>>' (aka 'Slice<Dictionary<NSString, Any>>') to unrelated type 'NSURL' always fails
let videoUrl:NSURL? = info[.mediaURL] as? NSURL;
~~~~~~~~~~~~~~~ ^ ~~~~~
/Users/tian/.pub-cache/hosted/pub.flutter-io.cn/image_picker_flutter-1.4.2/ios/Classes/SwiftImagePickerFlutterPlugin.swift:274:51: warning: cast from 'Slice<Dictionary<UIImagePickerController.InfoKey, Any>>' (aka 'Slice<Dictionary<NSString, Any>>') to unrelated type 'NSURL' always fails
let videoUrl:NSURL? = info[.mediaURL] as? NSURL;
~~~~~~~~~~~~~~~ ^ ~~~~~
/Users/tian/.pub-cache/hosted/pub.flutter-io.cn/image_picker_flutter-1.4.2/ios/Classes/SwiftImagePickerFlutterPlugin.swift:274:51: error: 'NSURL?' is not convertible to 'NSURL'
let videoUrl:NSURL? = info[.mediaURL] as? NSURL;
能否既可以展示全部图片,也可以选择相册
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.