File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change 2
2
/// [Author] Alex (https://github.com/AlexVincent525)
3
3
/// [Date] 2020/3/31 16:02
4
4
///
5
- import '../delegates/text_delegate .dart' ;
5
+ import 'constants .dart' ;
6
6
7
7
export '../delegates/sort_path_delegate.dart' ;
8
8
export '../delegates/text_delegate.dart' ;
@@ -16,4 +16,5 @@ class Constants {
16
16
const Constants ._();
17
17
18
18
static TextDelegate textDelegate = DefaultTextDelegate ();
19
+ static SortPathDelegate sortPathDelegate = SortPathDelegate .common;
19
20
}
Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ class AssetPickerProvider extends ChangeNotifier {
27
27
if (selectedAssets? .isNotEmpty ?? false ) {
28
28
_selectedAssets = List <AssetEntity >.from (selectedAssets);
29
29
}
30
+ Constants .sortPathDelegate = sortPathDelegate ?? SortPathDelegate .common;
30
31
Future <void >.delayed (routeDuration).then (
31
32
(dynamic _) async {
32
33
await getAssetPathList ();
@@ -212,7 +213,7 @@ class AssetPickerProvider extends ChangeNotifier {
212
213
);
213
214
214
215
/// Sort path using sort path delegate.
215
- sortPathDelegate.sort (_list);
216
+ Constants . sortPathDelegate.sort (_list);
216
217
217
218
for (final AssetPathEntity pathEntity in _list) {
218
219
// Use sync method to avoid unnecessary wait.
You can’t perform that action at this time.
0 commit comments