You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+19-3Lines changed: 19 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@
8
8
9
9
Language: English | [中文简体](README-ZH.md)
10
10
11
-
An assets picker which looks like the one in WeChat, based on `photo_manager` for asset implementation, `extended_image` for image preview, `provider` to help controlling the state of the picker.
11
+
An **assets picker** which looks like the one in WeChat, based on `photo_manager` for asset implementation, `extended_image` for image preview, `provider` to help controlling the state of the picker.
12
12
13
13
## Category 🗂
14
14
@@ -32,13 +32,12 @@ An assets picker which looks like the one in WeChat, based on `photo_manager` fo
32
32
## TODO 📅
33
33
34
34
-[x] Image asset support
35
-
-[ ] Image editing (Cut/Rotate/Draw)
36
35
-[x] Video asset support
37
-
-[ ] Video editing support
38
36
-[ ] Audio asset support
39
37
-[ ] Single asset mode
40
38
-[x] i18n support
41
39
-[x] Custom text delegate support
40
+
-[x] Custom theming entirely
42
41
-[ ] Flutter For the Web support
43
42
44
43
## Screenshots 📸
@@ -155,3 +154,20 @@ AssetPicker.pickAssets(
155
154
});
156
155
```
157
156
157
+
### Create `AssetEntity` from `File` or `Uint8List` (rawData)
158
+
159
+
In order to combine this package with camera shooting or something related, there's a wordaround about how to create an `AssetEntity` with `File` or `Uint8List` object.
160
+
161
+
```dart
162
+
final File file = your_file; // Your file object
163
+
final Uint8List byteData = await file.readAsBytes(); // Convert to Uint8List
164
+
final AssetEntity imageEntity = await PhotoManager.editor.saveImage(byteData); // Saved in the device then create an AssetEntity
165
+
```
166
+
167
+
If you don't want to keep the asset in your device, just delete it after you complete with your process (upload, editing, etc).
168
+
169
+
```dart
170
+
final List<String> result = await PhotoManager.editor.deleteWithIds([entity.id]);
0 commit comments