|
@@ -1,7 +1,14 @@
|
1
|
1
|
import 'package:photo_manager/photo_manager.dart';
|
2
|
2
|
|
|
3
|
+part './sort_asset_delegate.dart';
|
|
4
|
+
|
|
5
|
+/// SortPathDelegate
|
3
|
6
|
abstract class SortDelegate {
|
4
|
|
- const SortDelegate();
|
|
7
|
+ final SortAssetDelegate assetDelegate;
|
|
8
|
+
|
|
9
|
+ const SortDelegate({
|
|
10
|
+ this.assetDelegate = const DefaultAssetDelegate(),
|
|
11
|
+ });
|
5
|
12
|
|
6
|
13
|
void sort(List<AssetPathEntity> list);
|
7
|
14
|
|
|
@@ -11,14 +18,18 @@ abstract class SortDelegate {
|
11
|
18
|
}
|
12
|
19
|
|
13
|
20
|
class DefaultSortDelegate extends SortDelegate {
|
14
|
|
- const DefaultSortDelegate();
|
|
21
|
+ const DefaultSortDelegate({
|
|
22
|
+ SortAssetDelegate assetDelegate = const DefaultAssetDelegate(),
|
|
23
|
+ }) : super(assetDelegate: assetDelegate);
|
15
|
24
|
|
16
|
25
|
@override
|
17
|
26
|
void sort(List<AssetPathEntity> list) {}
|
18
|
27
|
}
|
19
|
28
|
|
20
|
29
|
class CommonSortDelegate extends SortDelegate {
|
21
|
|
- const CommonSortDelegate();
|
|
30
|
+ const CommonSortDelegate({
|
|
31
|
+ SortAssetDelegate assetDelegate = const DefaultAssetDelegate(),
|
|
32
|
+ }) : super(assetDelegate: assetDelegate);
|
22
|
33
|
|
23
|
34
|
@override
|
24
|
35
|
void sort(List<AssetPathEntity> list) {
|