File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -71,6 +71,10 @@ After:
71
71
Future<void> switchPath([P? pathEntity]);
72
72
```
73
73
74
+ ### ` SortPathDelegate `
75
+
76
+ ` SortPathDelegate ` accepts a generic type ` Path ` now, and the type will be delivered to the ` sort ` method.
77
+
74
78
## 5.0.0
75
79
76
80
### Summary
Original file line number Diff line number Diff line change @@ -10,12 +10,13 @@ import 'package:photo_manager/photo_manager.dart';
10
10
/// Define [sort] to sort the asset path list.
11
11
/// Usually integrate with [List.sort] .
12
12
/// 通过定义 [sort] 方法对资源路径列表进行排序。通常使用 [List.sort] 。
13
- abstract class SortPathDelegate {
13
+ abstract class SortPathDelegate < Path > {
14
14
const SortPathDelegate ();
15
15
16
- void sort (List <AssetPathEntity > list);
16
+ void sort (List <Path > list);
17
17
18
- static const SortPathDelegate common = CommonSortPathDelegate ();
18
+ static const SortPathDelegate <AssetPathEntity > common =
19
+ CommonSortPathDelegate ();
19
20
}
20
21
21
22
/// Common sort path delegate.
@@ -24,7 +25,7 @@ abstract class SortPathDelegate {
24
25
/// This delegate will bring "Recent" (All photos), "Camera", "Screenshot(?s)"
25
26
/// to the front of the paths list.
26
27
/// 该实现会把“最近”、“相机”、“截图”排到列表头部。
27
- class CommonSortPathDelegate extends SortPathDelegate {
28
+ class CommonSortPathDelegate extends SortPathDelegate < AssetPathEntity > {
28
29
const CommonSortPathDelegate ();
29
30
30
31
@override
You can’t perform that action at this time.
0 commit comments