- Pick image from gallery, camera.
- Support compress image.
- Support crop image circle, rectangle.
DeviceMediaServiceImpl()
.openPickImage(DeviceMediaSource.gallery,
needCompress: true, needCrop: _useCrop)
.then((value) {
setState(() {
image = value;
});
});
android:requestLegacyExternalStorage="true"
<activity
android:name="com.yalantis.ucrop.UCropActivity"
android:screenOrientation="portrait"
android:theme="@style/Theme.AppCompat.Light.NoActionBar"/>
<key>NSPhotoLibraryAddUsageDescription</key>
<string>Allow $(APP_NAME) access to your photo library to upload your profile picture?</string>
<key>NSCameraUsageDescription</key>
<string>Allow $(APP_NAME) to take photo for sharing</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>Allow $(APP_NAME) access to your photo library to upload your profile picture?</string>